/* ==========================================================================
   LIKIDY SHARED CSS (Excluding Billing)
   ========================================================================== */

/* FOUC FIX: hide multilingual content until setLang chooses one */
html.lang-loading [data-lang],
html.lang-loading footer,
html.lang-loading .lang-switch { display: none !important; }

:root{
  --primary:#74d5b3;
  --primary-dark:#5fc2a0;
  --bg:#f2fbf8;
  --text:#111;
  --muted:#666;
}

html { direction: ltr; }
html[dir="rtl"] { direction: rtl; }
html[dir="rtl"] .header-inner { direction: rtl; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Cairo", "Tajawal", "Geeza Pro", "Arial", sans-serif;
  color: #1a1a1a;
  line-height: 1.6;
  background: linear-gradient(to bottom, #f2fbf8, #ffffff);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* Global safety for Arabic shaping */
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4,
html[dir="rtl"] .visual-title, html[dir="rtl"] .visual-label, html[dir="rtl"] .ls-section-title {
  letter-spacing: 0 !important;
}
html[dir="rtl"] .visual-label { text-transform: none; font-weight: 500; }

/* ===== HEADER ===== */
header {
  height: 100px; padding: 0 24px; position: sticky; top: 0; z-index: 1300;
  background: rgba(116, 213, 179, 0.45); box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.25); display: block;
}
.header-inner {
  max-width: 1080px; margin: auto; width: 100%; height: 100%;
  display: flex; justify-content: space-between; align-items: center; position: relative;
}
header:hover .slogan { opacity: 1; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo { height: 52px; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12)); }
.slogan {
  position: absolute; left: 50%; transform: translateX(-50%);
  height: 160px; opacity: 0.85; transition: opacity 0.3s ease; pointer-events: none;
}
.slogan[data-lang="ar"] { transform: translateX(-50%) translateY(5px); }
.header-right-group { display: flex; align-items: center; }

/* ===== LANG BUTTONS ===== */
.lang-switch { display:flex; flex-direction: column; gap:4px; }
.lang-switch button {
  background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 500;
  color: #1a1a1a; cursor: pointer; backdrop-filter: blur(6px); transition: all 0.2s ease;
}
.lang-switch button:hover {
  transform: translateY(-1px) scale(1.02); background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 16px rgba(116, 213, 179, 0.2);
}
.lang-switch button:focus { outline: none; box-shadow: 0 0 0 2px rgba(116,213,179,0.6); }
.lang-switch button.active {
  background: rgba(255,255,255,0.85); box-shadow: 0 4px 12px rgba(116,213,179,0.15);
  transform: scale(1.02);
}

/* ===== BASE CONTENT CONTAINERS ===== */
.container { padding: 40px 20px 32px; }
@media (max-width: 600px) { .container { padding: 20px 12px; } }
.card {
  background: rgba(255,255,255,0.85); border-radius: 20px; padding: 32px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.04);
  max-width: 860px; margin: auto;
}
h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.5px; }
h2 { font-size: 22px; font-weight: 600; margin-top: 32px; }
p { color: #555; }
ul { padding-inline-start: 20px; }
li { margin-bottom: 6px; }
.hidden, [data-lang] { display: none; }

/* ===== FOOTER ===== */
.footer {
  margin-top: 60px; padding: 22px 20px 40px; color: #1a1a1a;
  background: rgba(116, 213, 179, 0.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid rgba(0,0,0,0.08); box-shadow: 0 -10px 30px rgba(0,0,0,0.03);
}
.footer-inner { max-width: 1100px; margin: auto; position: relative; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.footer-left { text-align: left; flex-shrink: 0; }
.store-buttons { display: flex; flex-direction: row; align-items: center; gap: 12px; }
.store-buttons img { height: 42px; width: auto; display: block; cursor: pointer; transition: transform 0.2s ease; }
.store-buttons img:hover { transform: scale(1.03); }
.footer-right { display: flex; width: 100%; flex-direction: column; align-items: flex-end; gap: 6px; }
.footer-topline { display: flex; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: nowrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 0; }
.footer-links a { margin: 0; font-size: 13px; color: #1a1a1a; text-decoration: none; opacity: 0.7; transition: opacity 0.2s ease; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
.footer-contact { font-size: 13px; margin: 0; opacity: 0.8; white-space: nowrap; }
.footer-contact a { color: #1a1a1a; text-decoration: none; font-weight: 500; }
.footer-contact a:hover { text-decoration: underline; }
.footer-social { display: flex; justify-content: flex-end; gap: 16px; margin: 0; }
.footer-social a {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,0.9); box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  color: #1a1a1a; transition: all 0.25s ease;
}
.footer-social a:hover { transform: translateY(-2px) scale(1.03); background: #74d5b3; color: white; box-shadow: 0 10px 25px rgba(116,213,179,0.4); }
.footer-social svg { width: 20px; height: 20px; }
.footer-copy { position: absolute; left: 50%; transform: translateX(-50%); bottom: 6px; font-size: 12px; opacity: 0.6; margin: 0; text-align: center; }

@media (max-width: 768px) {
  .footer-grid { flex-direction: column; align-items: center; gap: 20px; }
  .footer-left { text-align: center; }
  .store-buttons { flex-direction: row; justify-content: center; gap: 10px; }
  .store-buttons img { height: 34px; }
  .footer-right { align-items: center; text-align: center; gap: 8px; }
  .footer-topline { flex-direction: row; justify-content: center; gap: 10px; flex-wrap: wrap; }
  .footer-links { justify-content: center; }
  .footer-social { justify-content: center; }
  .footer-contact { white-space: normal; }
  .footer-copy { position: static; transform: none; margin-top: 10px; }
}

/* ===== UI CONTROLS (Back to top, Skip link, Cookie link) ===== */
#backToTop {
  position: fixed; bottom: 24px; inset-inline-end: 24px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.4); color: #1a1a1a; cursor: pointer; opacity: 0;
  pointer-events: none; transition: all 0.25s ease; z-index: 1000;
}
#backToTop:hover { transform: translateY(-2px); background: rgba(255,255,255,0.85); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
#backToTop.show { opacity: 1; pointer-events: auto; }

.skip-link {
  position: absolute; top: -100px; left: 0; background: #74d5b3; color: #fff;
  padding: 12px 20px; font-weight: 600; text-decoration: none; z-index: 2147483647; transition: top 0.2s ease;
}
.skip-link:focus { top: 0; outline: 3px solid #5fc2a0; outline-offset: 2px; }

.lcc-footer-link {
  background: none; border: none; padding: 0; margin: 0; font-family: inherit; font-size: 13px;
  color: #1a1a1a; text-decoration: none; opacity: 0.7; cursor: pointer; transition: opacity 0.2s ease;
}
.lcc-footer-link:hover { opacity: 1; text-decoration: underline; }

/* ===== MENU ===== */
.menu-btn {
  width: 30px; height: 22px; display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer; z-index: 1200; background: transparent; border: none; padding: 0; margin: 0;
  -webkit-appearance: none; appearance: none; font: inherit; color: inherit;
}
.menu-btn:focus { outline: 3px solid #5fc2a0; outline-offset: 4px; border-radius: 2px; }
.menu-btn:focus:not(:focus-visible) { outline: none; }
.menu-btn span { height: 2.5px; width: 100%; background: #1a1a1a; border-radius: 2px; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); }

#overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.25); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity 0.35s ease; z-index: 1350;
}
#overlay.active { opacity: 1; pointer-events: auto; }

.side-menu {
  position: fixed; top: 0; left: 0; height: 100%; width: 280px; background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.18), inset -1px 0 0 rgba(255,255,255,0.4);
  transform: translateX(-100%); transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  padding-top: 140px; z-index: 1400;
}
.side-menu.no-transition { transition: none !important; }
.side-menu.open { transform: translateX(0); }
.side-menu a {
  display: block; min-height: 48px; display: flex; align-items: center; position: relative;
  padding: 18px 28px; font-size: 16px; font-weight: 500; color: #1a1a1a; text-decoration: none;
  border-radius: 12px; margin: 6px 12px; transition: all 0.25s ease;
}
.side-menu a.active { background: rgba(116,213,179,0.25); color: #0f766e; font-weight: 600; }
.side-menu a.active::before {
  content: ""; position: absolute; inset-inline-start: 8px; width: 4px; height: 60%;
  background: #74d5b3; border-radius: 4px;
}
.side-menu a:hover { background: rgba(116,213,179,0.18); transform: translateX(4px); }
.side-menu a:active { transform: scale(0.98); }
.menu-divider { height: 1px; margin: 16px 20px; background: rgba(0,0,0,0.08); }

html[dir="rtl"] .side-menu { left: auto; right: 0; transform: translateX(100%); }
html[dir="rtl"] .side-menu.open { transform: translateX(0); }

/* ===== LIKIDY SEARCH ===== */
.likidy-search-trigger { display: none; } 
.ls-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255,255,255,0.25); border-radius: 999px;
  cursor: pointer; color: #1a1a1a; backdrop-filter: blur(6px); transition: all 0.2s ease; margin-right: 10px; padding: 0;
}
.ls-icon-btn:hover { transform: translateY(-1px) scale(1.04); background: rgba(255, 255, 255, 0.5); box-shadow: 0 6px 16px rgba(116, 213, 179, 0.2); }
.ls-icon-btn:focus { outline: none; box-shadow: 0 0 0 2px rgba(116,213,179,0.6); }
.ls-icon-btn svg { width: 16px; height: 16px; }
html[dir="rtl"] .ls-icon-btn { margin-right: 0; margin-left: 10px; }

.ls-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.3); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  z-index: 9998; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease;
}
.ls-overlay.active { opacity: 1; visibility: visible; }
.ls-modal {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%) translateY(-16px);
  width: 92%; max-width: 560px; z-index: 9999; opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease; margin-top: min(16vh, 120px);
}
.ls-modal.active { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.ls-box {
  background: rgba(255,255,255,0.97); border-radius: 16px; box-shadow: 0 12px 50px rgba(0,0,0,0.14), 0 0 0 1px rgba(0,0,0,0.04);
  overflow: hidden; backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
}
.ls-input-row { display: flex; align-items: center; padding: 14px 18px; gap: 12px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.ls-input-row .ls-icon { width: 18px; height: 18px; color: var(--primary-dark); flex-shrink: 0; }
.ls-input { flex: 1; border: none; outline: none; background: transparent; font-size: 16px; font-family: inherit; color: #1a1a1a; }
.ls-input::placeholder { color: #aaa; }
.ls-clear {
  width: 26px; height: 26px; border: none; background: rgba(0,0,0,0.05); border-radius: 50%;
  cursor: pointer; display: none; align-items: center; justify-content: center; flex-shrink: 0;
}
.ls-clear svg { width: 11px; height: 11px; color: #666; }
.ls-clear.visible { display: flex; }
.ls-esc { font-size: 11px; color: #aaa; padding: 3px 7px; background: rgba(0,0,0,0.04); border-radius: 5px; font-weight: 500; cursor: pointer; border: 1px solid rgba(0,0,0,0.06); flex-shrink: 0; }
.ls-results { max-height: 380px; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.ls-results::-webkit-scrollbar { width: 5px; }
.ls-results::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 3px; }
.ls-section-title { font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: #aaa; padding: 8px 12px 4px; }
.ls-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; text-decoration: none; color: inherit; transition: background 0.2s ease; animation: lsFadeIn 0.15s ease forwards; }
.ls-item:hover, .ls-item.selected { background: rgba(116,213,179,0.1); }
.ls-item.selected { background: rgba(116,213,179,0.16); }
.ls-item-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.ls-item-icon.ic-home { background: linear-gradient(135deg,#74d5b3,#4fc49a); }
.ls-item-icon.ic-about { background: linear-gradient(135deg,#74a3d5,#5b8cc4); }
.ls-item-icon.ic-contact { background: linear-gradient(135deg,#d5a374,#c4935b); }
.ls-item-icon.ic-faq { background: linear-gradient(135deg,#d574b3,#c45ba0); }
.ls-item-icon.ic-privacy { background: linear-gradient(135deg,#8b74d5,#7a5bc4); }
.ls-item-icon.ic-terms { background: linear-gradient(135deg,#d5c474,#c4b35b); }
.ls-item-icon.ic-safety { background: linear-gradient(135deg,#5b8a6f,#4a7259); }
.ls-item-icon.ic-billing { background: linear-gradient(135deg,#74c4d5,#5bb3c4); }
.ls-item-body { flex: 1; min-width: 0; }
.ls-item-title { font-size: 14px; font-weight: 500; color: #1a1a1a; line-height: 1.3; }
.ls-item-title mark, .ls-item-desc mark { background-color: rgba(116,213,179,0.45) !important; color: inherit !important; padding: 1px 2px; border-radius: 2px; }
.ls-item-desc { font-size: 12px; color: #555; line-height: 1.4; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ls-item-arrow { color: #ccc; flex-shrink: 0; opacity: 0; transform: translateX(-4px); transition: all 0.2s ease; }
.ls-item:hover .ls-item-arrow, .ls-item.selected .ls-item-arrow { opacity: 1; transform: translateX(0); }
.ls-empty { text-align: center; padding: 40px 16px; }
.ls-empty-icon { font-size: 36px; opacity: 0.35; margin-bottom: 10px; }
.ls-empty-text { font-size: 14px; color: #555; }
.ls-empty-hint { font-size: 12px; color: #aaa; margin-top: 4px; }
.ls-footer { display: flex; align-items: center; justify-content: space-between; padding: 8px 18px; border-top: 1px solid rgba(0,0,0,0.06); font-size: 11px; color: #aaa; }
.ls-footer-keys { display: flex; gap: 10px; }
.ls-footer-keys span { display: flex; align-items: center; gap: 3px; }
.ls-footer .ls-key { min-width: 18px; height: 18px; padding: 0 4px; font-size: 9px; font-weight: 600; }
@keyframes lsFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.ls-item:nth-child(2) { animation-delay: .02s; }
.ls-item:nth-child(3) { animation-delay: .04s; }
.ls-item:nth-child(4) { animation-delay: .06s; }
.ls-item:nth-child(5) { animation-delay: .08s; }
.ls-item:nth-child(6) { animation-delay: .10s; }
.ls-item:nth-child(7) { animation-delay: .12s; }

@media (max-width: 640px) {
  .ls-modal { width: 95%; margin-top: 10vh; }
  .ls-footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}