/* Shared cookie consent styles; loads after site.css. */

/* ==========================================================================
   Page: cookie
   ========================================================================== */

/* Cookie consent (every page): banner, settings dialog, confirmation. Namespace: ck-
   Markup: resources/views/site/partials/cookie-consent.blade.php · behaviour: assets/js/cookie-consent.js */

.ck { font-family: var(--font-body); color: var(--c-ink); line-height: normal; }
body.ck-locked { overflow: hidden; }

.ck-btn {
  flex: 1 1 140px;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--c-primary);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.ck-btn--fill { background: var(--c-primary); color: var(--c-white); }
.ck-btn--fill:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }
.ck-btn--line { background: var(--c-white); color: var(--c-primary); }
.ck-btn--line:hover { background: var(--c-pale); }
.ck-btn--save { flex: 1 1 100%; height: 50px; border: 0; background: var(--c-primary); color: var(--c-white); font-size: 16px; }
.ck-btn--save:hover { background: var(--c-primary-hover); }

.ck-banner {
  position: fixed;
  z-index: 150; /* above the header and the mobile menu */
  inset: 0;
  padding: 16px;
  background: rgba(22, 20, 46, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ck-banner[hidden] { display: none !important; }
.ck-banner__dialog {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(20px, 5vw, 32px);
  border-radius: 20px;
  background: var(--c-white);
  box-shadow: 0 24px 64px rgba(22, 20, 46, 0.35);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ck-banner__dialog:focus { outline: none; }
.ck-banner__text { display: flex; flex-direction: column; gap: 10px; }
.ck-banner__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--c-gold-bg);
  color: var(--c-gold-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ck-banner__title { font-family: var(--font-head); font-size: clamp(19px, 5vw, 23px); font-weight: 800; line-height: 1.4; }
.ck-banner__lead { font-size: 15.5px; line-height: 1.85; color: #33304D; }
.ck-banner__lead a { color: var(--c-primary); font-weight: 700; }
.ck-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ck-actions .ck-btn { height: 48px; font-size: 15.5px; }
.ck-btn--wide { flex-basis: 100%; }

.ck-overlay {
  position: fixed;
  z-index: 150; /* above the mobile menu */
  inset: 0;
  padding: 24px;
  background: rgba(22, 20, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ck-overlay[hidden] { display: none !important; }
.ck-dialog {
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  border-radius: 20px;
  background: var(--c-white);
  box-shadow: 0 24px 64px rgba(22, 20, 46, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ck-dialog:focus { outline: none; }
.ck-dialog__head {
  padding: clamp(16px, 4vw, 24px) clamp(16px, 4vw, 24px) 14px;
  border-bottom: 1px solid #EAE8F2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ck-dialog__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ck-dialog__title { font-family: var(--font-head); font-size: clamp(18px, 4.8vw, 22px); font-weight: 800; line-height: 1.4; }
.ck-close {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--c-mist);
  color: #33304D;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ck-close:hover { background: var(--c-pale); }
.ck-dialog__desc { font-size: 14.5px; line-height: 1.75; color: var(--c-text-2); }

.ck-cats { list-style: none; padding: 0 clamp(16px, 4vw, 24px); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.ck-cat { padding: 14px 0; border-bottom: 1px solid #EAE8F2; display: flex; flex-direction: column; gap: 4px; }
.ck-cat__row { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ck-cat__name { font-size: 16.5px; font-weight: 800; }
.ck-cat__desc { font-size: 14.5px; line-height: 1.75; color: var(--c-text-2); }
.ck-cat__ex { font-size: 13px; line-height: 1.6; color: var(--c-text-3); }
.ck-always {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--c-success-bg);
  color: var(--c-success-ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.ck-switch {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.ck-switch__state { font-size: 13.5px; font-weight: 700; color: var(--c-text-3); }
.ck-switch__state::before { content: "متوقفة"; }
.ck-switch[aria-checked="true"] .ck-switch__state { color: var(--c-primary); }
.ck-switch[aria-checked="true"] .ck-switch__state::before { content: "مفعّلة"; }
.ck-switch__track {
  width: 50px;
  height: 30px;
  padding: 0 3px;
  border-radius: var(--radius-pill);
  background: #8A86A3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: background-color .15s ease;
}
.ck-switch[aria-checked="true"] .ck-switch__track { background: var(--c-primary); justify-content: flex-end; }
.ck-switch__knob { width: 24px; height: 24px; border-radius: 50%; background: var(--c-white); box-shadow: 0 1px 3px rgba(22, 20, 46, 0.3); }
.ck-switch:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; border-radius: var(--radius-pill); }

.ck-dialog__foot {
  padding: 14px clamp(16px, 4vw, 24px) clamp(16px, 4vw, 24px);
  border-top: 1px solid #EAE8F2;
  background: #FBFAFE;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 640px) {
  .ck-overlay { padding: 0; }
  .ck-dialog { max-width: none; max-height: 100vh; max-height: 100dvh; border-radius: 0; }
}

.ck-toast {
  position: fixed;
  z-index: 90;
  inset-inline: 12px;
  bottom: 12px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.ck-toast__card {
  pointer-events: auto;
  max-width: 760px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--c-indigo-deep);
  color: var(--c-white);
  box-shadow: 0 14px 36px rgba(28, 24, 80, 0.3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.ck-toast__text { flex: 1 1 280px; display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.7; }
.ck-toast__icon { margin-top: 3px; color: #7FE0B4; }
.ck-nowrap { white-space: nowrap; }
.ck-toast__actions { flex: 0 1 auto; margin-inline-start: auto; display: flex; gap: 8px; }
.ck-toast__btn {
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  color: var(--c-white);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.ck-toast__btn:hover { background: rgba(255, 255, 255, 0.2); }
.ck-toast__btn--line { border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; }
.ck-toast__btn--line:hover { background: rgba(255, 255, 255, 0.08); }
.ck-toast__btn:focus-visible { outline-color: var(--c-white); }

/* «إعدادات الكوكيز» in the site footer is a button that looks like the other footer links */
.foot-link--button { border: 0; background: transparent; font: inherit; cursor: pointer; }
.checkout-footer--slim .checkout-footer__inner { justify-content: flex-end; }
.checkout-footer__links .foot-link--button { padding: 0; color: var(--c-text-3); font-size: inherit; line-height: inherit; }
.checkout-footer__links .foot-link--button:hover { color: var(--c-link-hover); text-decoration: underline; }
.policy-cookie-settings { padding: 0; border: 0; background: transparent; color: var(--c-primary); font: inherit; text-decoration: underline; cursor: pointer; }
.policy-cookie-settings:hover { color: var(--c-link-hover); }

@media (prefers-reduced-motion: reduce) {
  .ck-switch__track { transition: none; }
}
