/* ════════════════════════════════════════════
   popup.css — Yes Smile / Dental Consultation
   By Productive Digital · productiveagency.com
   ════════════════════════════════════════════ */

/* ── Variables (shared with form.css) ── */
:root {
  --dcf-blue:        #2D5BE3;
  --dcf-blue-dark:   #1e44c7;
  --dcf-blue-deep:   #1535a8;
  --dcf-blue-light:  #EEF2FD;
  --dcf-blue-mid:    #C7D4F9;
  --dcf-pink:        #E8356D;
  --dcf-white:       #ffffff;
  --dcf-radius:      12px;
  --dcf-radius-sm:   8px;
  --dcf-font:        'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --dcf-font-ar:     'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

/* ════════════════════════════════
   HEADER BUTTON WRAPPER
   Floats the button into the top-right
   of the viewport — works on most themes.
   For nav integration ask your theme dev
   to hook into the header template.
════════════════════════════════ */
#dcf-header-btn-wrap {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 9999;
}

/* RTL: flip to left */
html[dir="rtl"] #dcf-header-btn-wrap,
body.rtl        #dcf-header-btn-wrap {
  right: auto;
  left: 20px;
}

/* ════════════════════════════════
   TRIGGER BUTTON  (header + inline)
════════════════════════════════ */
.dcf-trigger-btn,
.dcf-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--dcf-blue) 0%, var(--dcf-blue-dark) 100%);
  color: var(--dcf-white);
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--dcf-font);
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, box-shadow .2s, transform .15s;
  box-shadow: 0 4px 16px rgba(45,91,227,.38);
  line-height: 1.4;
}
.dcf-trigger-btn:hover,
.dcf-header-btn:hover {
  background: linear-gradient(135deg, var(--dcf-blue-dark) 0%, var(--dcf-blue-deep) 100%);
  box-shadow: 0 6px 22px rgba(45,91,227,.52);
  transform: translateY(-1px);
  color: var(--dcf-white);
}
.dcf-trigger-btn:active,
.dcf-header-btn:active { transform: translateY(0); }

.dcf-btn-icon { font-size: 16px; line-height: 1; }

/* ════════════════════════════════
   FLOATING BUTTON  (fixed bottom-right)
════════════════════════════════ */
.dcf-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--dcf-blue) 0%, var(--dcf-blue-dark) 100%);
  color: var(--dcf-white);
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--dcf-font);
  box-shadow: 0 6px 24px rgba(45,91,227,.50);
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
  animation: dcfBounceIn .55s .9s both;
}
.dcf-floating-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(45,91,227,.60);
}
.dcf-float-icon { font-size: 18px; line-height: 1; }

/* RTL: flip to left */
html[dir="rtl"] .dcf-floating-btn,
body.rtl        .dcf-floating-btn {
  right: auto;
  left: 24px;
  font-family: var(--dcf-font-ar);
}

/* pulse ring */
.dcf-floating-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  border: 2px solid var(--dcf-blue);
  animation: dcfPulse 2.6s ease-out infinite;
  opacity: 0;
  pointer-events: none;
}

@keyframes dcfBounceIn {
  0%   { opacity: 0; transform: scale(.35) translateY(40px); }
  65%  { transform: scale(1.07) translateY(-6px); }
  100% { opacity: 1; transform: scale(1)    translateY(0); }
}
@keyframes dcfPulse {
  0%   { transform: scale(1);    opacity: .65; }
  100% { transform: scale(1.45); opacity: 0;   }
}

/* ════════════════════════════════
   OVERLAY BACKDROP
════════════════════════════════ */
.dcf-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,16,50,.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}
.dcf-overlay.dcf-open {
  display: flex;
  animation: dcfFadeIn .22s ease;
}
@keyframes dcfFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ════════════════════════════════
   MODAL SHELL
════════════════════════════════ */
.dcf-modal {
  position: relative;
  background: var(--dcf-white);
  border-radius: 20px;
  width: 100%;
  max-width: 660px;
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 28px 70px rgba(8,16,50,.30);
  animation: dcfSlideUp .3s cubic-bezier(.22,.68,0,1.15);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--dcf-blue-mid) transparent;
}
.dcf-modal::-webkit-scrollbar       { width: 4px; }
.dcf-modal::-webkit-scrollbar-thumb { background: var(--dcf-blue-mid); border-radius: 99px; }

@keyframes dcfSlideUp {
  from { opacity: 0; transform: translateY(32px) scale(.96); }
  to   { opacity: 1; transform: translateY(0)     scale(1);  }
}

/* ── Blue header bar ── */
.dcf-modal-header {
  background: linear-gradient(135deg, var(--dcf-blue) 0%, var(--dcf-blue-dark) 100%);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 20px 20px 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}
.dcf-modal-header-title {
  color: var(--dcf-white);
  font-family: var(--dcf-font);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dcf-header-icon { font-size: 18px; flex-shrink: 0; }

/* close × button */
.dcf-modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.38);
  background: rgba(255,255,255,.14);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dcf-white);
  font-size: 15px;
  line-height: 1;
  transition: background .15s, border-color .15s;
  padding: 0;
  flex-shrink: 0;
  margin-left: 12px;
}
.dcf-modal-close-btn:hover {
  background: rgba(255,255,255,.26);
  border-color: rgba(255,255,255,.65);
}

/* Strip card shadow from nested form */
.dcf-modal .dcf-wrapper {
  box-shadow: none !important;
  border-radius: 0 !important;
  border: none !important;
  padding-top: 26px;
}

/* ════════════════════════════════
   MOBILE — bottom sheet + safe area
════════════════════════════════ */
@media (max-width: 600px) {

  /* Header button: hide on small screens (floating btn is enough) */
  #dcf-header-btn-wrap { display: none; }

  /* Overlay sticks to bottom */
  .dcf-overlay {
    align-items: flex-end;
    padding: 0;
  }

  /* Sheet slides up from bottom */
  .dcf-modal {
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    animation: dcfSheetUp .32s cubic-bezier(.22,.68,0,1.1);
    /* iOS safe area bottom */
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .dcf-modal-header {
    border-radius: 22px 22px 0 0;
  }

  /* Drag handle pill */
  .dcf-modal::before {
    content: '';
    display: block;
    position: sticky;
    top: 0;
    width: 38px;
    height: 4px;
    background: rgba(255,255,255,.45);
    border-radius: 99px;
    margin: 0 auto;
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
  }

  @keyframes dcfSheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  /* Floating button: smaller on mobile */
  .dcf-floating-btn {
    bottom: 18px;
    right: 16px;
    padding: 11px 18px;
    font-size: 13px;
  }
  html[dir="rtl"] .dcf-floating-btn,
  body.rtl        .dcf-floating-btn {
    right: auto;
    left: 16px;
  }
}

/* Very small screens: floating btn becomes icon-only circle */
@media (max-width: 380px) {
  .dcf-floating-btn .dcf-float-label { display: none; }
  .dcf-floating-btn {
    padding: 14px;
    border-radius: 50%;
    bottom: 16px;
    right: 14px;
  }
  html[dir="rtl"] .dcf-floating-btn,
  body.rtl        .dcf-floating-btn {
    right: auto;
    left: 14px;
  }
  .dcf-floating-btn::before { border-radius: 50%; }
}
