/* sharelink.css — merged drop-in styles */

/* Trigger button */
button.sharelink-btn{
  color:#fff;
  background:#4d90fe;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: .2px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);

  /* mobile tap polish */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button.sharelink-btn:active{
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}

/* keyboard focus only */
button.sharelink-btn:focus{ outline: 0; }
button.sharelink-btn:focus-visible{
  outline: 2px solid rgba(255,255,255,.85);
  outline-offset: 2px;
}

/* Big pre-call button (auto-scales per viewport; prevents “too big on laptop”) */


/* Disabled styling */
.sharelink-btn--big:disabled{
  border: 7px solid #999999;
  background-color: #cccccc;
  color: #666666;
  box-shadow: none;
}

/* Timed “hard reset” override to defeat sticky pressed/hover visuals */
.sharelink-resetting{
  background: #4d90fe !important;
  transform: translateY(0) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.18) !important;
  filter: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* Modal overlay */
.sharelink-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.70);
  display: none;
  z-index: 900;
}

/* Modal */
.sharelink-modal{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: min(550px, calc(100vw - 16px));
  max-width: 350px;
  background: #fff;
  border-radius: 30px;
  padding: 44px 16px 22px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  display: none;
  z-index: 1000;
}

.sharelink-modal[aria-hidden="false"],
.sharelink-overlay[aria-hidden="false"]{
  display: block;
  animation: sharelink-fade .15s ease;
}

@keyframes sharelink-fade{
  from{ opacity: 0; }
  to{ opacity: 1; }
}

.sharelink-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.sharelink-close::before,
.sharelink-close::after{
  content: "";
  position: absolute;
  top: 5px;
  left: 16px;
  width: 2px;
  height: 24px;
  background: #848484;
}

.sharelink-close::before{ transform: rotate(45deg); }
.sharelink-close::after{ transform: rotate(-45deg); }

.sharelink-actions{
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 8px;
}

.sharelink-action{
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: none;
  background: #f3f4f6;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .12s ease, background .12s ease;

  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.sharelink-hint{
  margin-top: 14px;
  text-align: center;
  color: #666;
  font-size: 13px;
  min-height: 18px;
}

/* IMPORTANT: hover styles ONLY on hover-capable devices */
@media (hover: hover) and (pointer: fine) {
  button.sharelink-btn:hover,
  .sharelink-btn--big:hover{
    background:#0d2244;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,.22);
  }

  .sharelink-action:hover{
    background: #e7e9ee;
    transform: translateY(-1px);
  }
}
/* --- FINAL OVERRIDES: keep Share Link button centered + not overly wide --- */
.sharelink-center{
  width: 100%;
  display: flex;  
  justify-content: center;          /* already, but re-assert */
}

/* Big pre-call button (balanced for desktop + mobile) */
.sharelink-btn--big{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* --- FINAL: hard-center the pre-call big Share Link button, regardless of parent offsets --- */
/* Big pre-call Share Link button */
button.sharelink-btn.sharelink-btn--big{
  position: fixed !important;
  left: 50% !important;
  bottom: 24px !important;
  translate: -50% 0 !important;
  margin: 0 !important;

  /* Size (phone/default) */
  width: clamp(220px, 40vw, 280px);
  max-width: calc(100vw - 32px);

  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.1;
  font-weight: 600;

  padding: 10px 14px !important;
  border-radius: 12px !important;

  border: none;
  color: #fff;
  background: #4d90fe;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;

  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;

  z-index: 2000;
}

/* Tablet bump (iPad, etc.) */
@media (min-width: 768px) {
  button.sharelink-btn.sharelink-btn--big{
    /* width: clamp(280px, 32vw, 420px); removed clamp due to edge case boundary in which 
       the border radius was not visible
       width: clamp(280px, 32vw, 420px); 
    */
    width: 29vw;         /* “preferred” */
    min-width: 280px;    /* clamp lower bound */
    max-width: 420px;    /* clamp upper bound */

    font-size: 18px;
    padding: 12px 18px !important;
  }
}

/* In case you have any "layout helper" class applied */
button.sharelink-btn.sharelink-btn--big.sharelink-btn--layout{
  position: fixed !important;
  left: 50% !important;
  bottom: 24px !important;
  translate: -50% 0 !important;   /* keep same centering method */
  transform: none !important;      /* prevent old translateX hack */
}

@media (hover: hover) and (pointer: fine) {
  button.sharelink-btn.sharelink-btn--big:hover{
    background:#0d2244;
    box-shadow: 0 6px 16px rgba(0,0,0,.22);
  }
}