/* Nova Admin Suite - Boutique Cookie Consent & GDPR Banner */
:root {
  --nas-ck-bg: rgba(15, 23, 42, 0.88);
  --nas-ck-border: rgba(255, 255, 255, 0.12);
  --nas-ck-text: #f8fafc;
  --nas-ck-text-muted: #94a3b8;
  --nas-ck-accent: #d89e34;
  --nas-ck-accent-hover: #b88226;
  --nas-ck-btn-sec-bg: rgba(255, 255, 255, 0.08);
  --nas-ck-btn-sec-hover: rgba(255, 255, 255, 0.14);
}

[data-nas-cookie-theme="oled-black"] {
  --nas-ck-bg: rgba(0, 0, 0, 0.94);
  --nas-ck-border: rgba(255, 255, 255, 0.18);
  --nas-ck-text: #ffffff;
  --nas-ck-text-muted: #a1a1aa;
}

[data-nas-cookie-theme="glass-light"] {
  --nas-ck-bg: rgba(255, 255, 255, 0.92);
  --nas-ck-border: rgba(0, 0, 0, 0.1);
  --nas-ck-text: #0f172a;
  --nas-ck-text-muted: #64748b;
  --nas-ck-btn-sec-bg: rgba(0, 0, 0, 0.06);
  --nas-ck-btn-sec-hover: rgba(0, 0, 0, 0.1);
}

/* Banner Container */
.nas-cookie-banner {
  position: fixed;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--nas-ck-text);
  background: var(--nas-ck-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--nas-ck-border);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
}

.nas-cookie-banner.nas-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Positions */
.nas-cookie-banner.nas-pos-bottom-bar {
  left: 24px;
  right: 24px;
  bottom: 24px;
  border-radius: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
}

.nas-cookie-banner.nas-pos-bottom-right-card {
  right: 24px;
  bottom: 24px;
  width: 420px;
  max-width: calc(100vw - 48px);
  border-radius: 16px;
  padding: 24px;
}

.nas-cookie-banner.nas-pos-bottom-left-card {
  left: 24px;
  bottom: 24px;
  width: 420px;
  max-width: calc(100vw - 48px);
  border-radius: 16px;
  padding: 24px;
}

/* Inner Layout */
.nas-cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nas-pos-bottom-right-card .nas-cookie-content,
.nas-pos-bottom-left-card .nas-cookie-content {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.nas-cookie-text-wrap {
  flex: 1;
}

.nas-cookie-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.nas-cookie-icon {
  font-size: 20px;
  line-height: 1;
}

.nas-cookie-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--nas-ck-text);
}

.nas-cookie-desc {
  margin: 0;
  font-size: 13px;
  color: var(--nas-ck-text-muted);
}

/* Action Buttons */
.nas-cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nas-pos-bottom-right-card .nas-cookie-actions,
.nas-pos-bottom-left-card .nas-cookie-actions {
  flex-direction: column;
}

.nas-cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.nas-pos-bottom-right-card .nas-cookie-btn,
.nas-pos-bottom-left-card .nas-cookie-btn {
  width: 100%;
}

.nas-cookie-btn-primary {
  background: var(--nas-ck-accent);
  color: #0b0e14;
}

.nas-cookie-btn-primary:hover {
  background: var(--nas-ck-accent-hover);
  box-shadow: 0 4px 12px rgba(216, 158, 52, 0.3);
}

.nas-cookie-btn-secondary {
  background: var(--nas-ck-btn-sec-bg);
  color: var(--nas-ck-text);
  border: 1px solid var(--nas-ck-border);
}

.nas-cookie-btn-secondary:hover {
  background: var(--nas-ck-btn-sec-hover);
}

.nas-cookie-btn-link {
  background: transparent;
  color: var(--nas-ck-text-muted);
  text-decoration: underline;
  padding: 6px 10px;
}

.nas-cookie-btn-link:hover {
  color: var(--nas-ck-text);
}

/* Modal Preferences Backdrop & Box */
.nas-cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nas-cookie-modal-backdrop.nas-visible {
  opacity: 1;
  visibility: visible;
}

.nas-cookie-modal {
  width: 540px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--nas-ck-bg);
  color: var(--nas-ck-text);
  border: 1px solid var(--nas-ck-border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  font-family: inherit;
  box-sizing: border-box;
}

.nas-cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--nas-ck-border);
}

.nas-cookie-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.nas-cookie-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--nas-ck-text-muted);
  cursor: pointer;
}

.nas-cookie-cat-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--nas-ck-border);
  gap: 16px;
}

.nas-cookie-cat-info h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
}

.nas-cookie-cat-info p {
  margin: 0;
  font-size: 12px;
  color: var(--nas-ck-text-muted);
  line-height: 1.4;
}

/* Custom Switch Toggle */
.nas-cookie-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.nas-cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.nas-cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.25s;
  border-radius: 24px;
}

.nas-cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

.nas-cookie-switch input:checked + .nas-cookie-slider {
  background-color: var(--nas-ck-accent);
}

.nas-cookie-switch input:checked + .nas-cookie-slider:before {
  transform: translateX(20px);
}

.nas-cookie-switch input:disabled + .nas-cookie-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Recall Floating Badge */
.nas-cookie-recall-btn {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--nas-ck-bg);
  border: 1px solid var(--nas-ck-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--nas-ck-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  z-index: 999990;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nas-cookie-recall-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

@media (max-width: 640px) {
  .nas-cookie-banner.nas-pos-bottom-bar {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 16px;
  }
  .nas-cookie-content {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .nas-cookie-actions {
    flex-direction: column;
  }
  .nas-cookie-btn {
    width: 100%;
  }
}
