/* Arabia Residence — shared chrome (header lang pill + footer switchers + RTL) */

/* Header language pill — sits to the right of "Book a Stay" */
.lang-pill { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px 7px 11px; border-radius: 9999px; background: transparent; border: 1px solid rgba(0,0,0,0.12); color: #181818; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; cursor: pointer; transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.16s ease; }
.lang-pill:hover { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.22); }
.lang-pill.is-open { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.30); }
.lang-pill-icon { width: 14px; height: 14px; opacity: 0.78; }
.lang-pill-caret { width: 10px; height: 10px; opacity: 0.55; transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1); }
.lang-pill.is-open .lang-pill-caret { transform: rotate(180deg); }
.lang-pill-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 180px; background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; box-shadow: 0 14px 36px rgba(16,28,50,0.14), 0 2px 8px rgba(16,28,50,0.06); padding: 6px; list-style: none; margin: 0; opacity: 0; pointer-events: none; transform: translateY(6px) scale(0.97); transform-origin: top right; transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1); z-index: 70; text-align: left; }
.lang-pill.is-open .lang-pill-menu { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.lang-pill-menu li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #444; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.14s ease, color 0.14s ease; }
.lang-pill-menu li:hover { background: rgba(0,0,0,0.04); color: #181818; }
.lang-pill-menu li.is-active { background: rgba(0,175,108,0.10); color: #00AF6C; }
.lang-pill-sub { font-size: 11px; font-weight: 700; color: rgba(0,0,0,0.40); letter-spacing: 0.04em; }
.lang-pill-menu li.is-active .lang-pill-sub { color: #00AF6C; }

[dir="rtl"] .lang-pill-menu { right: auto; left: 0; transform-origin: top left; }

/* Footer switchers */
.foot-switch-group { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.foot-switch { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px 7px 11px; border-radius: 9999px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10); color: rgba(255,255,255,0.85); font-size: 12px; font-weight: 500; cursor: pointer; transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease; }
.foot-switch:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: #fff; }
.foot-switch.is-open { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.22); color: #fff; }
.foot-switch-icon { width: 14px; height: 14px; opacity: 0.85; }
.foot-switch-label { letter-spacing: -0.005em; }
.foot-switch-caret { width: 11px; height: 11px; opacity: 0.6; transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1); }
.foot-switch.is-open .foot-switch-caret { transform: rotate(180deg); }
.foot-switch-menu { position: absolute; bottom: calc(100% + 8px); right: 0; min-width: 180px; background: #181818; border: 1px solid rgba(255,255,255,0.10); border-radius: 12px; box-shadow: 0 12px 36px rgba(0,0,0,0.45); padding: 6px; list-style: none; margin: 0; opacity: 0; pointer-events: none; transform: translateY(6px) scale(0.97); transform-origin: bottom right; transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1); z-index: 30; text-align: left; }
.foot-switch.is-open .foot-switch-menu { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.foot-switch-menu li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 8px; color: rgba(255,255,255,0.80); font-size: 13px; cursor: pointer; transition: background 0.14s ease, color 0.14s ease; }
.foot-switch-menu li:hover { background: rgba(255,255,255,0.06); color: #fff; }
.foot-switch-menu li.is-active { background: rgba(0,175,108,0.15); color: #00C77A; }
.foot-switch-sub { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.40); letter-spacing: 0.04em; }
.foot-switch-menu li.is-active .foot-switch-sub { color: #00C77A; }

[dir="rtl"] .foot-switch-menu { right: auto; left: 0; transform-origin: bottom left; }

/* Arabic body font */
html[lang="ar"] body, html[dir="rtl"] body { font-family: 'Cairo', 'Noto Naskh Arabic', system-ui, -apple-system, sans-serif; }

/* Generic RTL flips */
[dir="rtl"] .price-badge { left: 12px; right: auto; }
[dir="rtl"] .heart-btn { left: 12px; right: auto; }
[dir="rtl"] .absolute.top-3.left-3 { right: 12px; left: auto; }
[dir="rtl"] .carousel-prev { left: auto; right: 8px; }
[dir="rtl"] .carousel-next { right: auto; left: 8px; }
[dir="rtl"] .carousel-prev svg, [dir="rtl"] .carousel-next svg { transform: scaleX(-1); }

/* RTL text alignment — flip left-aligned text to right-aligned where natural */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .text-left,
[dir="rtl"] [class*="text-left"] { text-align: right !important; }
[dir="rtl"] .text-right,
[dir="rtl"] [class*="text-right"] { text-align: left !important; }
[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea { text-align: right; }
[dir="rtl"] .review-head { flex-direction: row-reverse; }
[dir="rtl"] .review-stars { margin-left: 0 !important; margin-right: auto !important; }

/* RTL: flip directional SVG arrow icons that point forward (right) */
[dir="rtl"] .carousel-next svg,
[dir="rtl"] .carousel-prev svg,
[dir="rtl"] [data-flip-rtl] svg { transform: scaleX(-1); }
[dir="rtl"] .ari-modal__head-actions { flex-direction: row-reverse; }
[dir="rtl"] .ari-modal__header { flex-direction: row-reverse; }
[dir="rtl"] .trip-pop-header { flex-direction: row-reverse; }
[dir="rtl"] .trip-pop-footer { flex-direction: row-reverse; }
[dir="rtl"] .pill-logo { left: auto; right: 24px; }
@media (max-width: 900px) {
  [dir="rtl"] .pill-logo { right: 16px; left: auto; }
}

/* Ensure list items and labels read right-to-left */
[dir="rtl"] .where-list .where-opt,
[dir="rtl"] .home-where-opt { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .home-where-sub,
[dir="rtl"] .where-sub { text-align: right; }
[dir="rtl"] .field-label,
[dir="rtl"] .trip-edit-label,
[dir="rtl"] .trip-edit-value { text-align: right; }
[dir="rtl"] .float-field label { left: auto; right: 14px; }
[dir="rtl"] .float-field-caret { left: 14px; right: auto; }
[dir="rtl"] .float-field--select select { padding-right: 14px; padding-left: 40px; }

/* Tabular numerics inside Arabic should still flow LTR */
[dir="rtl"] .price-row,
[dir="rtl"] .price-total { direction: ltr; text-align: start; }
[dir="rtl"] .price-row > span:first-child,
[dir="rtl"] .price-total > span:first-child { direction: rtl; }

/* Lift floating WhatsApp button above cookie banner whenever it's visible */
.wa-float { transition: bottom 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease; }
body:has(#cookie-consent:not([style*="display: none"])) .wa-float { bottom: 108px !important; }
@media (max-width: 640px) {
  body:has(#cookie-consent:not([style*="display: none"])) .wa-float { bottom: 140px !important; }
}

/* ===== RTL fixes — full-site Arabic sweep (2026-06-22) ===== */
/* Promo banner dismiss button -> left edge in RTL */
[dir="rtl"] #promo-banner button[aria-label] { right: auto; left: 1rem; }
/* Header dropdown menus (Help / account) anchored right-0 -> flip to the left */
[dir="rtl"] header .group .absolute.right-0 { right: auto; left: 0; }
/* Generic top-corner overlays on cards (badges/hearts) */
[dir="rtl"] .property-card .left-3 { left: auto; right: 0.75rem; }
[dir="rtl"] .property-card .right-3 { right: auto; left: 0.75rem; }
/* Search bar segment labels + the vertical divider */
[dir="rtl"] .search-bar .text-left { text-align: right; }
[dir="rtl"] .search-bar .lg\:border-r { border-right: 0; border-left: 1px solid #f3f4f6; }
/* "Where" destination option rows */
[dir="rtl"] .home-where-opt { text-align: right; }
/* Calendar month-nav chevrons mirror in RTL */
[dir="rtl"] #home-cal-prev svg, [dir="rtl"] #home-cal-next svg { transform: scaleX(-1); }
/* Left-aligned content columns (about / newsletter / footer) -> right in RTL */
[dir="rtl"] .about-card .lg\:text-left,
[dir="rtl"] footer .lg\:text-left { text-align: right; }
/* Floating WhatsApp button + its tooltip move to the left in RTL */
[dir="rtl"] .wa-float { right: auto; left: 24px; }
[dir="rtl"] .wa-tip { right: auto; left: calc(100% + 14px); }
/* Forward "→" arrow glyphs inside CTAs mirror in RTL */
[dir="rtl"] .about-cta svg { transform: scaleX(-1); }
/* Keep Latin/number runs (prices, phone numbers) reading left-to-right inside RTL */
[dir="rtl"] [class*="price"], [dir="rtl"] .ltr-num { unicode-bidi: isolate; }

/* ===== Mobile app shell (phones ≤768px only — desktop untouched) ===== */
#app-bottom-nav, #m-profile-btn { display: none; }
@media (max-width: 768px) {
  #app-bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: rgba(255,255,255,0.97); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid rgba(16,28,50,0.08); box-shadow: 0 -2px 14px rgba(16,28,50,0.07);
    padding: 7px 2px calc(7px + env(safe-area-inset-bottom, 0px));
  }
  #app-bottom-nav .abn-item {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 3px 2px; min-height: 46px; color: #767c84; font-size: 10px; font-weight: 600;
    text-decoration: none; letter-spacing: -0.01em; -webkit-tap-highlight-color: transparent;
    transition: color 0.18s ease, transform 0.12s ease;
  }
  #app-bottom-nav .abn-item .abn-ic { display: inline-flex; }
  #app-bottom-nav .abn-item .abn-ic svg { width: 23px; height: 23px; display: block; }
  #app-bottom-nav .abn-item .abn-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  #app-bottom-nav .abn-item.is-active { color: #00AF6C; }
  #app-bottom-nav .abn-item:active { transform: scale(0.93); }

  body { padding-bottom: 64px; }                 /* clear the fixed tab bar */
  #promo-banner { display: none !important; }     /* drop the desktop promo strip on phones */
  header #menu-toggle { display: none !important; } /* hamburger replaced by the tab bar */
  #m-profile-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; color: #181818; border-radius: 9999px; -webkit-tap-highlight-color: transparent; }
  #m-profile-btn:active { background: rgba(16,28,50,0.06); }
  #m-profile-btn svg { width: 25px; height: 25px; }

  #cookie-consent { bottom: 64px !important; }     /* sit above the tab bar */
  .wa-float { bottom: 80px !important; }           /* float above the tab bar */
  body:has(#cookie-consent:not([style*="display: none"])) .wa-float { bottom: 152px !important; }
}
