/* ============================================================
   Klaro cookie consent — Momrah brand styling
   Loaded at "theme" priority, overrides klaro-override.css
   ============================================================ */

/* Brand token overrides */
.klaro {
  --klaro-primary-color: var(--bs-primary, #1b8354);
  --klaro-button-bg: var(--bs-primary, #1b8354);
  --klaro-button-border: 2px solid var(--bs-primary, #1b8354);
  --klaro-button-border-radius: var(--bs-border-radius, 0.375rem);
  --klaro-button-text-color: #fff;
  --klaro-button-padding: 10px 24px;
  --klaro-button-font-weight: 600;
  --klaro-button-line-height: 1.5;
  --klaro-button-bg-hover: var(--bs-primary-dark, #166a45);
  --klaro-button-border-hover: 2px solid var(--bs-primary-dark, #166a45);
  --klaro-button-text-color-hover: #fff;
  --klaro-button-focus-outline: 2px solid var(--bs-primary, #1b8354);
  --klaro-button-focus-outline-offset: 2px;
  --klaro-dialog-focus-box-shadow: 0 0 0 2px var(--bs-primary, #1b8354);
  --light1: #333;
  font-family: "arabicui", "DroidKufi", sans-serif;
}

/* ── Banner (bottom bar) — full-width stacked layout matching production ── */
.klaro .cookie-notice:not(.cookie-modal-notice) {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  border-radius: 4px;
  border-top: 0;
  background: #fafafa;
  box-shadow: 0 0 0 2px #12285f, 0 4px 6px rgba(0, 0, 0, 0.2), 5px 5px 10px rgba(0, 0, 0, 0.19), 0 0 0 10px #fff;
  color: #333;
}

/* ── Banner body: stacked single column (title, text, buttons) ── */
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body {
  display: block;
  padding: 16px 56px 0 24px; /* right pad clears close button at top-left in RTL */
  max-width: 100%;
  margin: 0;
}

.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px;
  color: #161616;
}

.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #444;
}

/* Buttons row: full-width stacked, accept on top, decline below */
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-ok {
  width: 100%;
}
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-buttons {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.klaro .cookie-notice:not(.cookie-modal-notice) .cm-btn {
  width: 100%;
  display: block;
  text-align: center;
  font-family: inherit;
  font-weight: var(--klaro-button-font-weight);
  line-height: var(--klaro-button-line-height);
  padding: 13px 17px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.klaro .cookie-notice:not(.cookie-modal-notice) .cm-btn-success {
  background-color: var(--bs-primary, #1b8354);
  border: 1px solid var(--bs-primary, #1b8354);
  color: #fff;
  order: 1;
}
.klaro .cookie-notice:not(.cookie-modal-notice) .cm-btn-success:hover {
  background-color: var(--bs-primary-dark, #166a45);
  border-color: var(--bs-primary-dark, #166a45);
}

.klaro .cookie-notice:not(.cookie-modal-notice) .cn-decline {
  background-color: #fff;
  border: 1px solid #d1d5db;
  color: #161616;
  order: 2;
}
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-decline:hover {
  background-color: #f3f4f6;
  color: #000;
}

.klaro .cookie-notice a {
  display: inline;
  margin-top: 0;
}

/* ── Close button — top-left, no border, just X icon ── */
.klaro-close {
  position: absolute;
  top: 10px;
  right: auto;
  left: 20px;
  width: 30px;
  height: 25px;
  background-color: transparent;
  border: 1px solid #d1d5db;
  border-radius: 0;
  color: #161616;
  cursor: pointer;
  transform: none;
}
[lang="ar"] .klaro-close,
[dir="rtl"] .klaro-close {
  left: 20px;
  right: auto;
}
.klaro-close:hover {
  background-color: #f3f4f6;
}

[lang="ar"] .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body,
[dir="rtl"] .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body {
  padding: 16px 24px 0 56px; /* close button at top-LEFT in RTL needs left pad clearance */
  text-align: right;
  direction: rtl;
}

@media (max-width: 480px) {
  .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body {
    padding: 14px 48px 0 14px;
  }
  [lang="ar"] .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body,
  [dir="rtl"] .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body {
    padding: 14px 14px 0 48px;
  }
}

/* ── Cookie modal (settings dialog) ── */
.klaro .cookie-modal .cm-modal {
  border-top: 4px solid var(--bs-primary, #1b8354);
  font-family: "arabicui", "DroidKufi", sans-serif;
}

.klaro .cookie-modal .cm-modal h1,
.klaro .cookie-modal .cm-modal h2,
.klaro .cookie-modal .cm-modal h3 {
  font-family: "arabicui", "DroidKufi", sans-serif;
  color: #161616;
}
