/* ==========================================================
   Karamin · Cookie Consent — Compact Bottom-Right
   ========================================================== */

/* Kompakt sağ-alt kart */
.consent-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: auto;
  width: 380px;
  max-width: calc(100vw - 32px);
  z-index: 9500;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18), 0 4px 12px rgba(0,0,0,0.08);
  padding: 22px 22px 20px;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: opacity .28s ease, transform .28s ease;
  pointer-events: none;
}
.consent-banner.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.consent-banner-inner { display: flex; flex-direction: column; gap: 16px; }

.consent-banner-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 32px; height: 32px;
  border: 0; background: transparent;
  font-size: 24px; line-height: 1;
  color: #666; cursor: pointer;
  border-radius: 50%;
  transition: background .15s, color .15s;
}
.consent-banner-close:hover { background: #f0f0f0; color: #1a1a1a; }

.consent-text h3 {
  margin: 0 0 6px;
  font-size: 15px; font-weight: 700;
  color: #1a1a1a;
  display: flex; align-items: center; gap: 8px;
  padding-right: 28px;
}
.consent-icon { font-size: 18px; }
.consent-text p {
  margin: 0;
  font-size: 12.5px; line-height: 1.55;
  color: #555;
}
.consent-text p a { color: var(--red, #d91e26); text-decoration: underline; }

.consent-actions {
  display: flex; flex-direction: column; gap: 8px;
}
.consent-btn {
  padding: 11px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; border: 1px solid transparent;
  white-space: nowrap; text-align: center;
  transition: all .18s ease;
  font-family: inherit;
}
.consent-btn.primary {
  background: var(--red, #d91e26); color: #fff;
  border-color: var(--red, #d91e26);
}
.consent-btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.consent-btn.ghost {
  background: #fff; color: #1a1a1a;
  border-color: rgba(0,0,0,0.15);
}
.consent-btn.ghost:hover { background: #f5f5f5; border-color: rgba(0,0,0,0.3); }
.consent-btn.link {
  background: transparent; color: #555;
  border-color: transparent; padding: 8px;
  font-size: 12px; text-decoration: underline;
}
.consent-btn.link:hover { color: #1a1a1a; }

/* === Modal === */
.consent-modal {
  position: fixed; inset: 0;
  z-index: 9600;
  display: flex; align-items: center; justify-content: center;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.consent-modal[hidden] { display: none !important; }

.consent-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.consent-modal-dialog {
  position: relative; z-index: 1;
  background: #fff; border-radius: 22px;
  width: min(640px, 92vw);
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 50px 100px rgba(0,0,0,0.4);
  animation: cmModalIn .3s ease;
}
@keyframes cmModalIn {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.consent-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 26px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.consent-modal-head h3 { margin: 0; font-size: 18px; font-weight: 700; }
.consent-close {
  background: none; border: 0;
  font-size: 28px; cursor: pointer;
  color: #555; line-height: 1;
  width: 36px; height: 36px;
  border-radius: 50%;
}
.consent-close:hover { background: #f0f0f0; }

.consent-modal-body { padding: 18px 26px; overflow-y: auto; flex: 1; }
.consent-modal-body p.muted { color: #666; margin: 0 0 18px; line-height: 1.55; font-size: 13px; }
.consent-modal-body p.muted a { color: var(--red, #d91e26); }

.consent-cat { display: flex; flex-direction: column; gap: 10px; }
.consent-cat-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px;
  padding: 16px 18px;
  background: #f8f6f0; border-radius: 14px;
  cursor: pointer;
}
.consent-cat-row strong { display: block; font-size: 14px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.consent-cat-row em { display: block; font-style: normal; font-size: 12px; color: #666; line-height: 1.55; max-width: 440px; }
.consent-always {
  font-size: 11px; color: var(--red, #d91e26);
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  align-self: center;
}

.consent-switch {
  appearance: none; -webkit-appearance: none;
  width: 42px; height: 24px; border-radius: 12px;
  background: #ccc; position: relative; cursor: pointer;
  transition: background .2s; flex-shrink: 0; align-self: center;
}
.consent-switch::before {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff; border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.consent-switch:checked { background: var(--red, #d91e26); }
.consent-switch:checked::before { transform: translateX(18px); }

.consent-modal-foot {
  display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  padding: 16px 26px 22px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

@media (max-width: 480px) {
  .consent-banner {
    right: 8px; left: 8px; bottom: 8px; width: auto;
    padding: 18px;
  }
  .consent-cat-row { flex-direction: column; gap: 12px; }
  .consent-modal-foot { flex-direction: column-reverse; }
  .consent-modal-foot .consent-btn { width: 100%; text-align: center; }
}
