/* Tfkeeer Cookie Consent — Basma Design System */
.tfkads-cookie-overlay {
  position: fixed; inset: 0;
  background: rgba(15,20,16,.55);
  z-index: 9997;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.tfkads-cookie {
  position: fixed; z-index: 9998;
  background: #fff;
  color: #0f1410;
  font-family: "IBM Plex Sans Arabic","Tajawal",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  direction: rtl;
  box-shadow: 0 -8px 32px rgba(0,0,0,.18);
  border-top: 4px solid #1f8a5b;
  animation: tfkads-slide-up .35s ease-out;
}
@keyframes tfkads-slide-up { from { transform: translateY(100%); opacity:0; } to { transform: translateY(0); opacity:1; } }
@keyframes tfkads-fade-in { from { opacity:0; } to { opacity:1; } }

.tfkads-cookie--bottom { bottom: 0; left: 0; right: 0; }
.tfkads-cookie--top    { top: 0; left: 0; right: 0; border-top: 0; border-bottom: 4px solid #1f8a5b; box-shadow: 0 8px 32px rgba(0,0,0,.18); }
.tfkads-cookie--modal  {
  top: 50%; left: 50%; right: auto; bottom: auto;
  transform: translate(-50%, -50%);
  max-width: 560px;
  border-radius: 16px;
  border: 1px solid #ece6d4;
  animation: tfkads-fade-in .25s ease-out;
}
.tfkads-cookie--modal + .tfkads-cookie-overlay,
.tfkads-cookie-overlay:not([hidden]) { display: block; }

.tfkads-cookie__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.tfkads-cookie--modal .tfkads-cookie__inner { padding: 1.5rem; }

.tfkads-cookie__title {
  font-size: 1.125rem; font-weight: 700;
  margin: 0; color: #0a3a26;
}
.tfkads-cookie__text {
  margin: 0; font-size: 0.95rem; line-height: 1.7; color: #2a4137;
}
.tfkads-cookie__text a { color: #1f8a5b; text-decoration: underline; }
.tfkads-cookie__text a:hover { color: #156d49; }

.tfkads-cookie__categories {
  display: flex; flex-direction: column; gap: 0.75rem;
  background: #faf6ec;
  border: 1px solid #ece6d4;
  border-radius: 12px;
  padding: 1rem;
}
.tfkads-cookie__cat {
  display: flex; align-items: flex-start; gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background .15s;
}
.tfkads-cookie__cat:hover { background: rgba(31,138,91,.05); }
.tfkads-cookie__cat input[type="checkbox"] {
  width: 22px; height: 22px;
  cursor: pointer;
  accent-color: #1f8a5b;
  margin-top: 2px;
  flex-shrink: 0;
}
.tfkads-cookie__cat input:disabled { cursor: not-allowed; }
.tfkads-cookie__cat > div { flex: 1; }
.tfkads-cookie__cat strong { display: block; font-size: 0.95rem; color: #0a3a26; margin-bottom: 2px; }
.tfkads-cookie__cat small  { display: block; font-size: 0.825rem; color: #5c6e63; line-height: 1.5; }

.tfkads-cookie__actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  justify-content: flex-end;
}
.tfkads-cookie__btn {
  font-family: inherit;
  font-weight: 700; font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.tfkads-cookie__btn:hover { transform: translateY(-1px); }
.tfkads-cookie__btn--primary {
  background: #1f8a5b; color: #fff;
}
.tfkads-cookie__btn--primary:hover {
  background: #156d49; box-shadow: 0 4px 12px rgba(31,138,91,.3);
}
.tfkads-cookie__btn--ghost {
  background: transparent; color: #2a4137;
  border-color: #ece6d4;
}
.tfkads-cookie__btn--ghost:hover {
  background: #faf6ec; border-color: #1f8a5b;
}

.tfkads-cookie-reopen {
  position: fixed;
  bottom: 1rem; left: 1rem;
  background: #fff;
  border: 1px solid #ece6d4;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2a4137;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  z-index: 9996;
  min-height: 44px;
  transition: transform .15s;
}
.tfkads-cookie-reopen:hover { transform: translateY(-2px); background: #faf6ec; }

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .tfkads-cookie:not([data-theme="light"]) {
    background: #0f1410;
    color: #f3ecd9;
    border-top-color: #1f8a5b;
  }
  .tfkads-cookie__title { color: #f3ecd9; }
  .tfkads-cookie__text  { color: #d4c9a8; }
  .tfkads-cookie__categories { background: #16201b; border-color: #2a4137; }
  .tfkads-cookie__cat strong { color: #f3ecd9; }
  .tfkads-cookie__cat small  { color: #98a59c; }
  .tfkads-cookie__btn--ghost { color: #f3ecd9; border-color: #2a4137; }
  .tfkads-cookie__btn--ghost:hover { background: #16201b; border-color: #1f8a5b; }
  .tfkads-cookie-reopen { background: #16201b; color: #f3ecd9; border-color: #2a4137; }
}

/* Mobile responsive */
@media (max-width: 600px) {
  .tfkads-cookie__inner { padding: 1rem; }
  .tfkads-cookie__title { font-size: 1rem; }
  .tfkads-cookie__text  { font-size: 0.875rem; }
  .tfkads-cookie__actions { justify-content: stretch; }
  .tfkads-cookie__btn   { flex: 1; min-width: 0; padding: 0.65rem 0.75rem; font-size: 0.875rem; }
  .tfkads-cookie--modal {
    top: auto; bottom: 0; left: 0; right: 0; transform: none;
    border-radius: 16px 16px 0 0;
    max-width: none;
  }
}

/* Accessibility — reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tfkads-cookie, .tfkads-cookie-reopen { animation: none; }
}

/* Print — hide */
@media print {
  .tfkads-cookie, .tfkads-cookie-overlay, .tfkads-cookie-reopen { display: none !important; }
}
