/* Full-screen overlay */
/*#wc-fob-modal .fob-modal-overlay {*/
/*  position: fixed; top:0; left:0;*/
/*  width:100%; height:100%;*/
/*  background: rgba(0,0,0,0.6);*/
/*  z-index: 9998;*/
/*}*/

/* ── Modal root: variables (also used in admin preview) ── */
#wc-fob-modal,
.fob-modal-preview-context {
  --fob-primary: #8b5cf6;
  --fob-primary-rgb: 139, 92, 246;
  --fob-primary-dark: #6d28d9;
  --fob-whatsapp: #25d366;
  --fob-whatsapp-rgb: 37, 211, 102;
  --fob-messenger: #0084ff;
  --fob-messenger-rgb: 0, 132, 255;
}

/* ── Overlay: glass ── */
#wc-fob-modal .fob-modal-overlay,
.fob-modal-preview-context .fob-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  animation: fobFadeInOverlay .3s forwards;
}

/* ── Modal container: glass (match button style) ── */
#wc-fob-modal .fob-modal-content,
.fob-modal-preview-context .fob-modal-content {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  width: 90%;
  max-width: 400px;
  padding: 2rem 2rem 1.75rem;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
  z-index: 9999;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  opacity: 0;
  animation: fobSlideIn .4s 0.1s forwards;
  font-family: "Hind Siliguri", sans-serif;
  font-weight: 500;
}

/* Preview context (admin): content in flow, no fixed/transform */
.fob-modal-preview-context .fob-modal-content {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  opacity: 1;
  animation: none;
  z-index: auto;
}

/* ── Close: glass badge style (match buttons) ── */
#wc-fob-modal .fob-modal-close,
.fob-modal-preview-context .fob-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 1rem;
  color: #475569;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#wc-fob-modal .fob-modal-close:hover,
.fob-modal-preview-context .fob-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.15);
  color: #1e293b;
  transform: scale(1.05);
}
#wc-fob-modal .fob-modal-close:focus,
.fob-modal-preview-context .fob-modal-close:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--fob-primary-rgb), 0.25);
}

/* ── Title: glass-style block (match modal tone) ── */
#wc-fob-modal .fob-modal-title,
.fob-modal-preview-context .fob-modal-title {
  margin: 0;
  padding: 0 2rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1e293b;
  letter-spacing: -0.02em;
}

/* ── Message: subtle glass tint (match button alpha style) ── */
#wc-fob-modal .fob-modal-message,
.fob-modal-preview-context .fob-modal-message {
  margin: 0;
  padding: 1rem 1.1rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #475569;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  text-align: center;
}

/* ── Buttons: 2 rows, Call width = WhatsApp + Messenger combined ── */
#wc-fob-modal .fob-modal-buttons,
.fob-modal-preview-context .fob-modal-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: fit-content;
  margin: 0 auto;
}

/* When both WhatsApp and Messenger are missing: Call (only button) takes full modal width */
#wc-fob-modal .fob-modal-buttons:not(:has(.fob-btn-whatsapp)):not(:has(.fob-btn-messenger)),
.fob-modal-preview-context .fob-modal-buttons:not(:has(.fob-btn-whatsapp)):not(:has(.fob-btn-messenger)) {
  width: 100%;
  max-width: 100%;
}

#wc-fob-modal .fob-modal-buttons:not(:has(.fob-btn-whatsapp)):not(:has(.fob-btn-messenger)) .fob-modal-buttons-row-2 .fob-modal-btn,
.fob-modal-preview-context .fob-modal-buttons:not(:has(.fob-btn-whatsapp)):not(:has(.fob-btn-messenger)) .fob-modal-buttons-row-2 .fob-modal-btn {
  width: 100%;
  min-width: 0;
}

/* Row 1: two buttons define column widths; row uses contents so children participate in grid */
#wc-fob-modal .fob-modal-buttons-row-1,
.fob-modal-preview-context .fob-modal-buttons-row-1 {
  display: contents;
}

/* When only one of WhatsApp/Messenger is set: that button takes full width of row */
#wc-fob-modal .fob-modal-buttons-row-1 > .fob-modal-btn:only-child,
.fob-modal-preview-context .fob-modal-buttons-row-1 > .fob-modal-btn:only-child {
  grid-column: 1 / -1;
}

/* Row 2: Call button spans both columns = same total width as row 1 */
#wc-fob-modal .fob-modal-buttons-row-2,
.fob-modal-preview-context .fob-modal-buttons-row-2 {
  grid-column: 1 / -1;
}

#wc-fob-modal .fob-modal-buttons-row-2 .fob-modal-btn,
.fob-modal-preview-context .fob-modal-buttons-row-2 .fob-modal-btn {
  width: 100%;
  box-sizing: border-box;
}

/* Base: glass badge button */
#wc-fob-modal .fob-modal-btn,
.fob-modal-preview-context .fob-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#wc-fob-modal .fob-modal-btn i,
.fob-modal-preview-context .fob-modal-btn i {
  font-size: 1.15rem;
}

/* WhatsApp: green glass */
#wc-fob-modal .fob-btn-whatsapp,
.fob-modal-preview-context .fob-btn-whatsapp {
  background: rgba(var(--fob-whatsapp-rgb), 0.18);
  color: #0d8050;
  border-color: rgba(var(--fob-whatsapp-rgb), 0.35);
}
#wc-fob-modal .fob-btn-whatsapp:hover,
.fob-modal-preview-context .fob-btn-whatsapp:hover {
  background: rgba(var(--fob-whatsapp-rgb), 0.3);
  color: #065f3a;
  border-color: rgba(var(--fob-whatsapp-rgb), 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(var(--fob-whatsapp-rgb), 0.25);
}

/* Messenger: blue glass */
#wc-fob-modal .fob-btn-messenger,
.fob-modal-preview-context .fob-btn-messenger {
  background: rgba(var(--fob-messenger-rgb), 0.18);
  color: #0066cc;
  border-color: rgba(var(--fob-messenger-rgb), 0.35);
}
#wc-fob-modal .fob-btn-messenger:hover,
.fob-modal-preview-context .fob-btn-messenger:hover {
  background: rgba(var(--fob-messenger-rgb), 0.3);
  color: #004999;
  border-color: rgba(var(--fob-messenger-rgb), 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(var(--fob-messenger-rgb), 0.25);
}

/* Call: plugin primary glass, full width */
#wc-fob-modal .fob-btn-call,
.fob-modal-preview-context .fob-btn-call {
  background: rgba(var(--fob-primary-rgb), 0.18);
  color: var(--fob-primary-dark);
  border-color: rgba(var(--fob-primary-rgb), 0.35);
}
#wc-fob-modal .fob-btn-call:hover,
.fob-modal-preview-context .fob-btn-call:hover {
  background: rgba(var(--fob-primary-rgb), 0.3);
  color: #5b21b6;
  border-color: rgba(var(--fob-primary-rgb), 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(var(--fob-primary-rgb), 0.25);
}

#wc-fob-modal .fob-modal-btn-call-full,
.fob-modal-preview-context .fob-modal-btn-call-full {
  width: 100%;
}
#wc-fob-modal .fob-call-phone-text,
.fob-modal-preview-context .fob-call-phone-text {
  font-weight: 600;
}

/* Responsive: single column so Call still matches row above */
@media (max-width: 380px) {
  #wc-fob-modal .fob-modal-content,
  .fob-modal-preview-context .fob-modal-content {
    padding: 1.5rem;
    border-radius: 16px;
  }
  #wc-fob-modal .fob-modal-buttons,
  .fob-modal-preview-context .fob-modal-buttons {
    grid-template-columns: 1fr;
    width: 100%;
  }
  #wc-fob-modal .fob-modal-buttons-row-2 .fob-modal-btn,
  .fob-modal-preview-context .fob-modal-buttons-row-2 .fob-modal-btn {
    width: 100%;
  }
  #wc-fob-modal .fob-modal-btn,
  .fob-modal-preview-context .fob-modal-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* ── Animations ── */
@keyframes fobFadeInOverlay {
  to { opacity: 1; }
}
@keyframes fobSlideIn {
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}
