/* ============ GLOBAL DESIGN POLISH ============
   - prefers-reduced-motion overrides
   - print stylesheet for receipts / invoices
   - focus-visible improvements
   - empty state baseline
   Drop into any page with: <link rel="stylesheet" href="/assets/polish.css">
   or <style>@import url('polish.css');</style>.
*/

/* Reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visible — keyboard accessibility */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid #B85F66;
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #B85F66;
  outline-offset: 2px;
}

/* Print styles — clean receipts / invoices */
@media print {
  /* Hide chrome */
  .topbar, .hdr, .hdr-main, .side, .nav, .burger, .mobile-menu, .global-foot, .foot,
  .cta-foot, .final-cta, .cta-section, .hero-trust, .topbar-plan, .tb-status, .tb-bell, .tb-icon,
  .icon-bell, .live-indicator, .notif-drawer, .drawer, .drawer-backdrop, .up-backdrop, .up-sheet,
  .lo-backdrop, .lo-sheet, #colomor-toast-stack, #colomor-cookies {
    display: none !important;
  }
  /* Reset layout for print */
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 11pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .app, .main, .page, .shell, .panel-host, .card {
    display: block !important;
    grid-template-columns: 1fr !important;
    background: #FFFFFF !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
  /* Headers */
  h1 { font-size: 24pt; margin-bottom: 12pt; }
  h2 { font-size: 16pt; margin-bottom: 8pt; }
  h3 { font-size: 13pt; }
  /* Tables — bookings, invoices */
  table.dt { width: 100%; border-collapse: collapse; }
  table.dt th, table.dt td { padding: 6pt 8pt; border-bottom: 0.5pt solid #999; }
  /* Force colors in invoices */
  .tag, .status-tag { border: 0.5pt solid #999; background: transparent !important; color: #000 !important; }
  /* Page break helpers */
  .print-page-break { page-break-after: always; }
  .no-print { display: none !important; }
  /* Show URL after links */
  a[href]:not([href^="#"]):not([href^="javascript:"])::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #666;
  }
}

/* Empty state baseline */
.empty-state {
  text-align: center;
  padding: 56px 32px;
  border: 1.5px dashed var(--border, #E5E2DA);
  border-radius: 14px;
  background: var(--bg-soft, #EFEBE3);
  color: var(--muted, #6B6B66);
}
.empty-state .ic {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--bg-white, #FFFFFF);
  color: var(--tertiary, #8B7E5E);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.empty-state h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text, #0F0F0E);
  margin-bottom: 6px;
  letter-spacing: -0.012em;
}
.empty-state p { font-size: 13.5px; line-height: 1.5; max-width: 380px; margin: 0 auto 18px; }
.empty-state .btn {
  display: inline-flex; gap: 7px; align-items: center;
  background: var(--ink, #0F0F0E); color: var(--bone, #EDE9DF);
  padding: 9px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
}
.empty-state .btn:hover { opacity: 0.92; }

/* Form validation helpers */
.field input.invalid, .field textarea.invalid, .field select.invalid {
  border-color: #B85F66 !important;
  background: rgba(184,95,102,0.04) !important;
}
.field input.valid, .field textarea.valid, .field select.valid {
  border-color: #6F8060 !important;
}
.field .err-msg {
  display: none;
  margin-top: 6px;
  font-size: 11.5px;
  color: #B85F66;
  font-weight: 600;
}
.field input.invalid ~ .err-msg, .field textarea.invalid ~ .err-msg, .field select.invalid ~ .err-msg {
  display: block;
}
.field .ok-msg {
  display: none;
  margin-top: 6px;
  font-size: 11.5px;
  color: #6F8060;
  font-weight: 600;
}
.field input.valid ~ .ok-msg, .field textarea.valid ~ .ok-msg, .field select.valid ~ .ok-msg {
  display: block;
}

/* Skeleton loader */
@keyframes skeleton-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, var(--bg-soft, #EFEBE3) 0%, #F4F1E9 50%, var(--bg-soft, #EFEBE3) 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; opacity: 0.7; }
}

/* ============ RTL SUPPORT (Arabic) ============
   Applied automatically when <html dir="rtl">.
   Flips layouts that depend on left/right positioning.
*/

/* Reverse flexbox direction for horizontal bars */
[dir="rtl"] .topbar,
[dir="rtl"] .clinic-bar,
[dir="rtl"] .hdr-main,
[dir="rtl"] .nav,
[dir="rtl"] .hdr-right,
[dir="rtl"] .hero-eyebrow-v2,
[dir="rtl"] .sec-eyebrow,
[dir="rtl"] .proof-row,
[dir="rtl"] .hero-modes,
[dir="rtl"] .search-pills {
  flex-direction: row-reverse;
}

/* Text alignment for body content */
[dir="rtl"] body,
[dir="rtl"] .hero-left,
[dir="rtl"] .sub,
[dir="rtl"] .sec-sub,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] .sec-heading {
  text-align: right;
}

/* Center-aligned section eyebrows stay centered */
[dir="rtl"] .sec-eyebrow,
[dir="rtl"] .hero-eyebrow-v2 {
  text-align: center;
}

/* Section headings with mixed content keep flow right-to-left */
[dir="rtl"] .sec-heading {
  text-align: right;
}

/* Arrows in CTAs (→) should flip to ← visually */
[dir="rtl"] .search-btn svg,
[dir="rtl"] .pill svg,
[dir="rtl"] .cta-primary svg,
[dir="rtl"] .btn-talk svg,
[dir="rtl"] .clinic-bar .pill svg,
[dir="rtl"] .mm-cta svg {
  transform: scaleX(-1);
}

/* Search box: input padding flip */
[dir="rtl"] .search-box .ico {
  right: auto;
  left: 16px;
}
[dir="rtl"] .search-box input {
  padding-right: 16px;
  padding-left: 50px;
  text-align: right;
}

/* Dropdown checkmarks on the left in RTL */
[dir="rtl"] .dropdown-item .check {
  margin-left: 0;
  margin-right: auto;
}

/* Country dropdown flag on the right in RTL */
[dir="rtl"] .dropdown-item .flag,
[dir="rtl"] .selector-btn .flag {
  margin-right: 0;
  margin-left: 8px;
}

/* Logo wordmark stays LTR (brand consistency) */
[dir="rtl"] .lm-word {
  direction: ltr;
  text-align: left;
  unicode-bidi: embed;
}

/* Footer grid items align right */
[dir="rtl"] .footer-grid h4,
[dir="rtl"] .footer-grid div {
  text-align: right;
}

/* Hero CTA buttons - keep icon on logical right (visual left in RTL) */
[dir="rtl"] .btn-talk .green-dot {
  margin-right: 0;
  margin-left: 8px;
}

/* Arabic typography — use Noto Sans Arabic for better rendering */
[dir="rtl"] body,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] p,
[dir="rtl"] button,
[dir="rtl"] input {
  font-family: 'Noto Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* Maintain LTR for technical terms shown in Arabic context */
[dir="rtl"] .lang-chip-sm,
[dir="rtl"] [data-lang],
[dir="rtl"] .lm-word,
[dir="rtl"] .flag-mini + span,
[dir="rtl"] code {
  direction: ltr;
  unicode-bidi: embed;
}


/* ============================================================
   SHARED HEADER COMPONENTS — country & language dropdowns
   Used across all pages via assets/locale-switcher.js
   ============================================================ */
.selector-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-white);
  color: var(--text);
  position: relative;
  font-weight: 500;
  transition: border-color 0.15s;
}
.selector-btn:hover { border-color: var(--text); }
.selector-btn .chev { font-size: 10px; opacity: 0.45; }
.divider-v { width: 1px; height: 24px; background: var(--border); margin: 0 6px; }
.btn {
  padding: 11px 20px;
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 600;
  border-radius: 6px;
  transition: opacity 0.15s, background 0.15s;
}
.btn-outline {
  background: var(--bg-white);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--text); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { opacity: 0.88; }

/* FLAGS */
.flag, .flag-mini {
  display: inline-block;
  flex-shrink: 0;
  border: 0.5px solid rgba(0,0,0,0.06);
  background-size: cover;
  background-position: center;
  border-radius: 2px;
}
.flag { width: 18px; height: 13px; }
.flag-mini { width: 15px; height: 11px; }
.flag-us { background: linear-gradient(to bottom, #B22234 50%, #FFFFFF 50%); }
.flag-tr { background: #E30A17; }
.flag-ae { background: linear-gradient(to right, #00732F 25%, #FFF 25% 50%, #000 50% 75%, #EF3340 75%); }
.flag-gb { background: linear-gradient(to right, #002868 33%, #FFF 33% 66%, #BF0A30 66%); }
.flag-de { background: linear-gradient(to bottom, #000 33%, #DD0000 33% 66%, #FFCE00 66%); }
.flag-at { background: linear-gradient(to bottom, #ED2939 33%, #FFFFFF 33% 66%, #ED2939 66%); }
.flag-fr { background: linear-gradient(to right, #002395 33%, #FFFFFF 33% 66%, #ED2939 66%); }
.flag-es { background: linear-gradient(to right, #AA151B 33%, #F1BF00 33% 66%, #AA151B 66%); }
.flag-it { background: linear-gradient(to right, #009246 33%, #FFFFFF 33% 66%, #CE2B37 66%); }
.flag-sa { background: #006C35; }
.flag-eg { background: linear-gradient(to bottom, #CE1126 33%, #FFFFFF 33% 66%, #000000 66%); }
.flag-th { background: linear-gradient(to bottom, #ED1C24 50%, #FFFFFF 50%); }
.flag-mx { background: linear-gradient(to right, #006847 33%, #FFFFFF 33% 66%, #CE1126 66%); }
.flag-jp { background: #FFFFFF; position: relative; }
.flag-jp::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #BC002D;
}
.flag-mini.flag-jp::after { width: 5px; height: 5px; }

/* DROPDOWN */
.dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(15,15,14,0.1), 0 2px 4px rgba(15,15,14,0.04);
  min-width: 280px;
  z-index: 100;
  overflow: hidden;
  display: none;
  text-align: left;
}
.dropdown.open { display: block; }
.dropdown-head {
  padding: 13px 16px 10px;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 0.5px solid var(--border-soft);
  font-weight: 600;
}
.dropdown-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.1s;
  font-weight: 500;
}
.dropdown-item:hover { background: var(--bg); }
.dropdown-item.selected { background: rgba(111,128,96,0.08); }
.dropdown-item .check { margin-left: auto; color: var(--sage); font-weight: 700; }
.dropdown-item .name { flex: 1; }
.dropdown-item .meta { font-size: 12px; color: var(--muted); font-weight: 400; }
.dropdown-footer {
  padding: 11px 16px;
  background: var(--bg);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  border-top: 0.5px solid var(--border-soft);
}
.dropdown-footer .acc { color: var(--sage); font-weight: 600; }


/* ============================================================
   UNIFIED HEADER — ana sayfa pattern
   Topbar + clinic-bar + hdr-main + brand + nav + buttons + mobile-menu
   Loaded by every public page so headers look identical to home.
   ============================================================ */
/* LOGO MARK — eşkenar üçgen, 3 nokta */
.lm { display: inline-flex; align-items: center; gap: 11px; }
.lm-mark { position: relative; flex-shrink: 0; }
.lm-mark .d { position: absolute; border-radius: 50%; }
.lm-mark .d1 { background: #B85F66; }
.lm-mark .d2 { background: #6F8060; }
.lm-mark .d3 { background: #A8864F; }

/* Header logo: mark 36×30, dots 11×11 */
.lm.hdr .lm-mark { width: 36px; height: 30px; }
.lm.hdr .lm-mark .d { width: 11px; height: 11px; }
.lm.hdr .lm-mark .d1 { top: 0; left: 12.5px; }
.lm.hdr .lm-mark .d2 { bottom: 0; left: 0; }
.lm.hdr .lm-mark .d3 { bottom: 0; right: 0; }
.lm.hdr .lm-word {
  font-family: 'Inter', sans-serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 1;
  color: #0F0F0E;
}
.lm.hdr .lm-word .o1 { color: #B85F66; }
.lm.hdr .lm-word .o2 { color: #6F8060; }
.lm.hdr .lm-word .o3 { color: #A8864F; }
.lm.hdr .lm-block { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.lm.hdr .lm-tag {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8B7E5E;
  font-weight: 600;
  line-height: 1;
}

/* Footer logo: mark 30×25, dots 9×9, light text */
.lm.ftr .lm-mark { width: 30px; height: 25px; }
.lm.ftr .lm-mark .d { width: 9px; height: 9px; }
.lm.ftr .lm-mark .d1 { top: 0; left: 10.5px; background: #D89299; }
.lm.ftr .lm-mark .d2 { bottom: 0; left: 0; background: #9DAA8A; }
.lm.ftr .lm-mark .d3 { bottom: 0; right: 0; background: #C5A574; }
.lm.ftr .lm-word {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 1;
  color: #EDE9DF;
}
.lm.ftr .lm-word .o1 { color: #D89299; }
.lm.ftr .lm-word .o2 { color: #9DAA8A; }
.lm.ftr .lm-word .o3 { color: #C5A574; }
.lm.ftr .lm-block { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.lm.ftr .lm-tag {
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #C5A574;
  font-weight: 600;
  line-height: 1;
}

/* TOPBAR */
.topbar {
  background: var(--ink);
  color: rgba(237,233,223,0.9);
  padding: 12px 36px;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-weight: 500;
}
.topbar .live { display: flex; align-items: center; gap: 9px; }
.topbar .brand-tag { letter-spacing: 0.22em; font-size: 11px; opacity: 0.7; }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.dot { animation: pulseDot 1.6s ease-in-out infinite; }

/* CLINIC CTA */
.clinic-bar {
  background: var(--bg-white);
  padding: 14px 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  border-bottom: 0.5px solid var(--border);
  flex-wrap: wrap;
}
.clinic-bar .text { font-size: 14.5px; line-height: 1.3; color: var(--text-soft); }
.clinic-bar strong { font-weight: 600; color: var(--text); }
.clinic-bar .accent { color: var(--amber); font-weight: 500; }
.clinic-bar .pill {
  font-size: 12px;
  letter-spacing: 0.16em;
  background: var(--ink);
  color: var(--bg);
  padding: 9px 16px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: opacity 0.15s;
}
.clinic-bar .pill:hover { opacity: 0.85; }

/* HEADER */
.hdr-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(248, 246, 242, 0.92);
  gap: 20px;
  flex-wrap: wrap;
}
.brand { cursor: pointer; display: block; }
.nav { display: flex; gap: 32px; }
.nav a {
  font-size: 14.5px;
  color: var(--muted);
  padding-bottom: 4px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  font-weight: 500;
}
.nav a:hover, .nav a.active { color: var(--text); border-bottom-color: var(--text); }
.hdr-right { display: flex; gap: 10px; align-items: center; }

/* Mobile burger + drawer */
.burger { display: none; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-white); align-items: center; justify-content: center; cursor: pointer; margin-left: 4px; }
.burger span { display: block; width: 18px; height: 2px; background: var(--text); position: relative; transition: transform .22s ease, background .15s; }
.burger span::before, .burger span::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text); transition: transform .22s ease; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger.open span { background: transparent; }
.burger.open span::before { top: 0; transform: rotate(45deg); }
.burger.open span::after { top: 0; transform: rotate(-45deg); }
.mobile-menu { position: fixed; inset: 0; background: var(--ink); color: var(--bone); z-index: 1000; display: flex; flex-direction: column; padding: 90px 32px 40px; opacity: 0; visibility: hidden; transition: opacity .25s; }
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a { display: block; padding: 18px 0; font-size: 22px; letter-spacing: -0.014em; border-bottom: 1px solid rgba(237,233,223,0.10); color: var(--bone); text-decoration: none; }
.mobile-menu a:hover { color: #D89299; }
.mobile-menu .mm-cta { margin-top: 28px; background: var(--bone); color: var(--ink); padding: 14px 22px; border-radius: 9px; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-bottom: none; }
.mobile-menu .mm-foot { margin-top: auto; padding-top: 22px; font-size: 12px; color: rgba(237,233,223,0.45); letter-spacing: 0.04em; }

.divider-v { width: 1px; height: 24px; background: var(--border); margin: 0 6px; }
.btn {
  padding: 11px 20px;
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 600;
  border-radius: 6px;
  transition: opacity 0.15s, background 0.15s;
}
.btn-outline {
  background: var(--bg-white);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--text); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { opacity: 0.88; }

/* Mobile responsive — hide nav on small screens */
@media (max-width: 760px) {
  .hdr-main .nav { display: none; }
  .clinic-bar { display: none; }
  .topbar { font-size: 10px; padding: 8px 16px; }
  .topbar .live, .topbar .brand-tag { display: none; }
}

/* Tablet & smaller — hide some hdr-right buttons */
@media (max-width: 920px) {
  .hdr-right .btn-outline { display: none; }
}

/* Show burger only on mobile */
@media (max-width: 760px) {
  .burger { display: inline-flex !important; }
  .hdr-right .selector-btn, .hdr-right .divider-v, .hdr-right .btn { display: none; }
}
