/* ============================================================
 * Wareed Cookie Consent — Styles
 * Matches dark + gold design system.
 * ============================================================ */
.wareed-cc {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  font-family: 'Geist', system-ui, sans-serif;
}

.wareed-cc__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: none;
}

.wareed-cc__panel {
  position: relative;
  pointer-events: auto;
  width: 100%;
  max-width: 560px;
  background: #13131B;
  border: 1px solid rgba(232, 185, 118, 0.15);
  border-radius: 16px;
  padding: 24px 24px 20px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 -1px 0 rgba(232, 185, 118, 0.08) inset;
  color: #E5E5EA;
  animation: wareedCcIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wareedCcIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.wareed-cc__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.wareed-cc__title {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #FAFAFA;
  letter-spacing: -0.01em;
}

.wareed-cc__body {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: #A1A1A8;
}

.wareed-cc__link {
  color: #E8B976;
  text-decoration: underline;
  text-decoration-color: rgba(232, 185, 118, 0.4);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.wareed-cc__link:hover {
  color: #F0C887;
  text-decoration-color: #F0C887;
}

/* ---- Options ---- */
.wareed-cc__options {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.wareed-cc__opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}
.wareed-cc__opt:hover {
  background: rgba(255, 255, 255, 0.03);
}
.wareed-cc__opt--disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.wareed-cc__opt input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #52525B;
  border-radius: 4px;
  background: #0A0A0F;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.wareed-cc__opt input[type="checkbox"]:hover:not(:disabled) {
  border-color: #E8B976;
}
.wareed-cc__opt input[type="checkbox"]:checked {
  background: #E8B976;
  border-color: #E8B976;
}
.wareed-cc__opt input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #0A0A0F;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.wareed-cc__opt input[type="checkbox"]:disabled {
  cursor: not-allowed;
}

.wareed-cc__opt-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wareed-cc__opt-name {
  font-size: 14px;
  font-weight: 500;
  color: #E5E5EA;
}
.wareed-cc__opt-hint {
  font-size: 12px;
  color: #71717A;
  font-family: 'Geist Mono', monospace;
}

/* ---- Actions ---- */
.wareed-cc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.wareed-cc__btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1.2;
}

.wareed-cc__btn--primary {
  background: #E8B976;
  color: #0A0A0F;
  border-color: #E8B976;
}
.wareed-cc__btn--primary:hover {
  background: #F0C887;
  border-color: #F0C887;
  transform: translateY(-1px);
}

.wareed-cc__btn--secondary {
  /* DSGVO: Reject must have equal visual weight as Accept. */
  background: rgba(255, 255, 255, 0.06);
  color: #FAFAFA;
  border-color: rgba(255, 255, 255, 0.18);
}
.wareed-cc__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.wareed-cc__btn--ghost {
  background: transparent;
  color: #A1A1A8;
  border-color: transparent;
  padding: 10px 12px;
  margin-right: auto;
}
[dir="rtl"] .wareed-cc__btn--ghost {
  margin-right: 0;
  margin-left: auto;
}
.wareed-cc__btn--ghost:hover {
  color: #E8B976;
}

/* ---- Mobile ---- */
@media (max-width: 540px) {
  .wareed-cc {
    padding: 0;
    align-items: flex-end;
  }
  .wareed-cc__panel {
    border-radius: 16px 16px 0 0;
    padding: 20px 18px 16px;
    max-width: none;
  }
  .wareed-cc__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .wareed-cc__btn {
    width: 100%;
    padding: 12px 16px;
  }
  .wareed-cc__btn--ghost {
    margin-right: 0;
    order: 99;
  }
}

/* ---- Arabic font tweak ---- */
[dir="rtl"] .wareed-cc__title,
[dir="rtl"] .wareed-cc__body,
[dir="rtl"] .wareed-cc__opt-name {
  font-family: 'Amiri', serif;
}

/* ---- RTL action order: Accept (primary) on the right, Reject in the middle ---- */
[dir="rtl"] .wareed-cc__actions {
  flex-direction: row-reverse;
}
[dir="rtl"] .wareed-cc__btn--ghost {
  margin-left: auto;
  margin-right: 0;
  order: -1;
}
