/* ============================================
   Varuna Sentinels - Cookie Consent Styles v2.0
   GDPR / ePrivacy / CCPA Compliant
   Banner + Preferences Modal
   ============================================ */

/* ===== COOKIE BANNER ===== */
.vs-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100000;
  background: #fff;
  box-shadow: 0 -6px 32px rgba(0,0,0,0.18);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  border-top: 3px solid #335596;
}
body.vs-dark .vs-cookie-banner {
  background: #1a2332;
  box-shadow: 0 -6px 32px rgba(0,0,0,0.45);
  border-top-color: #74c5b5;
}
.vs-cookie-banner.vs-cb-visible {
  transform: translateY(0);
}

.vs-cb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.vs-cb-text {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
}

.vs-cb-icon-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(51, 85, 150, 0.1), rgba(116, 197, 181, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.vs-cb-icon {
  font-size: 22px;
  color: #335596;
}
body.vs-dark .vs-cb-icon-wrap { background: linear-gradient(135deg, rgba(93, 173, 226, 0.15), rgba(116, 197, 181, 0.15)); }
body.vs-dark .vs-cb-icon { color: #74c5b5; }

.vs-cb-text strong {
  display: block;
  font-size: 16px;
  color: #335596;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
body.vs-dark .vs-cb-text strong { color: #74c5b5; }

.vs-cb-text p {
  font-size: 13px;
  color: #555;
  margin: 0;
  line-height: 1.6;
}
body.vs-dark .vs-cb-text p { color: #aab7c4; }

.vs-cb-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.vs-cb-btn {
  border: none;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: 0.2px;
}
.vs-cb-btn:focus-visible {
  outline: 2px solid #335596;
  outline-offset: 2px;
}

/* Accept (primary) */
.vs-cb-accept {
  background: linear-gradient(135deg, #335596, #2a4578);
  color: #fff;
  box-shadow: 0 2px 8px rgba(51, 85, 150, 0.3);
}
.vs-cb-accept:hover {
  background: linear-gradient(135deg, #2a4578, #1d3461);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(51, 85, 150, 0.4);
}

/* Deny (outline) */
.vs-cb-reject {
  background: transparent;
  color: #335596;
  border: 2px solid #335596;
}
body.vs-dark .vs-cb-reject { color: #74c5b5; border-color: #74c5b5; }
.vs-cb-reject:hover {
  background: #335596;
  color: #fff;
}
body.vs-dark .vs-cb-reject:hover { background: #74c5b5; color: #1a2332; }

/* View Preferences (subtle) */
.vs-cb-manage {
  background: #f0f2f5;
  color: #444;
}
body.vs-dark .vs-cb-manage { background: #2a3a4a; color: #ccc; }
.vs-cb-manage:hover { background: #e2e6ea; }
body.vs-dark .vs-cb-manage:hover { background: #3a4a5a; }

/* Banner responsive */
@media (max-width: 768px) {
  .vs-cb-inner {
    flex-direction: column;
    padding: 18px 20px;
    gap: 16px;
  }
  .vs-cb-text {
    gap: 12px;
  }
  .vs-cb-actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  .vs-cb-btn {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
  }
}


/* ===== COOKIE MODAL OVERLAY ===== */
.vs-cm-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100001;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.vs-cm-overlay.vs-cm-visible { opacity: 1; }

.vs-cm-dialog {
  background: #fff;
  border-radius: 16px;
  max-width: 580px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px 30px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.vs-cm-visible .vs-cm-dialog { transform: scale(1); }
body.vs-dark .vs-cm-dialog { background: #1a2332; }

/* Scrollbar styling for modal */
.vs-cm-dialog::-webkit-scrollbar { width: 6px; }
.vs-cm-dialog::-webkit-scrollbar-track { background: transparent; }
.vs-cm-dialog::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.vs-cm-dialog::-webkit-scrollbar-thumb:hover { background: #999; }

/* Header */
.vs-cm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}
body.vs-dark .vs-cm-header { border-bottom-color: #2a3a4a; }

.vs-cm-header h3 {
  font-size: 19px;
  font-weight: 700;
  color: #335596;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
body.vs-dark .vs-cm-header h3 { color: #74c5b5; }
.vs-cm-header h3 i { color: #335596; font-size: 20px; }
body.vs-dark .vs-cm-header h3 i { color: #74c5b5; }

.vs-cm-close {
  background: #f0f2f5;
  border: none;
  font-size: 22px;
  color: #666;
  cursor: pointer;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.vs-cm-close:hover { background: #e2e6ea; color: #333; }
body.vs-dark .vs-cm-close { background: #2a3a4a; color: #aaa; }
body.vs-dark .vs-cm-close:hover { background: #3a4a5a; color: #fff; }

/* Description */
.vs-cm-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.65;
  margin-bottom: 20px;
}
body.vs-dark .vs-cm-desc { color: #aab7c4; }
.vs-cm-desc a {
  color: #335596;
  text-decoration: underline;
  font-weight: 500;
}
.vs-cm-desc a:hover { color: #74c5b5; }
body.vs-dark .vs-cm-desc a { color: #74c5b5; }

/* Category cards */
.vs-cm-cat {
  background: #f8f9fb;
  border: 1px solid #e4e8ed;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: border-color 0.2s ease;
}
.vs-cm-cat:hover { border-color: #c8d0da; }
body.vs-dark .vs-cm-cat { background: #1e2d3d; border-color: #2a3a4a; }
body.vs-dark .vs-cm-cat:hover { border-color: #3a4a5a; }

.vs-cm-cat-necessary {
  border-left: 3px solid #27ae60;
}

.vs-cm-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vs-cm-cat-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vs-cm-cat-icon {
  font-size: 15px;
  color: #335596;
  width: 20px;
  text-align: center;
}
body.vs-dark .vs-cm-cat-icon { color: #74c5b5; }

.vs-cm-cat-header strong {
  font-size: 14px;
  color: #335596;
  letter-spacing: 0.1px;
}
body.vs-dark .vs-cm-cat-header strong { color: #74c5b5; }

.vs-cm-always {
  display: inline-block;
  background: #27ae60;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vs-cm-cat-desc {
  font-size: 12.5px;
  color: #666;
  margin: 8px 0 0;
  line-height: 1.55;
  padding-left: 28px;
}
body.vs-dark .vs-cm-cat-desc { color: #8899aa; }

.vs-cm-cat-cookies {
  font-size: 11px;
  color: #999;
  margin-top: 6px;
  padding-left: 28px;
  font-style: italic;
}
body.vs-dark .vs-cm-cat-cookies { color: #667788; }

/* Toggle switch */
.vs-cm-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.vs-cm-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.vs-cm-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ccc;
  border-radius: 24px;
  transition: 0.3s;
}
.vs-cm-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.vs-cm-toggle input:checked + .vs-cm-slider {
  background: #335596;
}
.vs-cm-toggle input:checked + .vs-cm-slider::before {
  transform: translateX(20px);
}
.vs-cm-toggle input:focus-visible + .vs-cm-slider {
  box-shadow: 0 0 0 3px rgba(51, 85, 150, 0.3);
}

/* Footer note */
.vs-cm-footer-note {
  font-size: 11.5px;
  color: #888;
  line-height: 1.5;
  margin-top: 16px;
  padding: 12px 14px;
  background: #f0f2f5;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.vs-cm-footer-note i {
  color: #335596;
  margin-top: 2px;
  flex-shrink: 0;
}
.vs-cm-footer-note strong {
  color: #335596;
}
body.vs-dark .vs-cm-footer-note { background: #223344; color: #8899aa; }
body.vs-dark .vs-cm-footer-note i, body.vs-dark .vs-cm-footer-note strong { color: #74c5b5; }

/* Modal actions */
.vs-cm-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.vs-cm-actions .vs-cb-btn {
  flex: 1;
  min-width: 120px;
  text-align: center;
}

/* Modal responsive */
@media (max-width: 480px) {
  .vs-cm-dialog { padding: 20px 18px; }
  .vs-cm-header h3 { font-size: 16px; }
  .vs-cm-actions { flex-direction: column; }
  .vs-cm-actions .vs-cb-btn { width: 100%; }
  .vs-cm-cat-desc, .vs-cm-cat-cookies { padding-left: 0; }
}
