/* Cookie Consent Modal (GDPR) — Seismic Mind Shifts */

/* Overlay + positioning */
#sms-consent-banner {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  padding: 16px;
}

#sms-consent-banner.sms-cb-show {
  opacity: 1;
  pointer-events: auto;
}

#sms-consent-banner.sms-cb-hide {
  opacity: 0;
  pointer-events: none;
}

/* Modal container */
.sms-cb-modal {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Header */
.sms-cb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 0;
}

.sms-cb-title {
  font-size: 16px;
  font-weight: 600;
  color: #f0f0f0;
}

.sms-cb-link {
  font-size: 13px;
  color: #6366f1;
  text-decoration: none;
}

.sms-cb-link:hover {
  text-decoration: underline;
}

/* Tabs */
.sms-cb-tabs {
  display: flex;
  gap: 0;
  padding: 16px 24px 0;
  border-bottom: 1px solid #2a2a2a;
}

.sms-cb-tab {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.sms-cb-tab:hover {
  color: #a0a0a0;
}

.sms-cb-tab-active {
  color: #f0f0f0;
  border-bottom-color: #6366f1;
}

/* Panels */
.sms-cb-panel {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.sms-cb-panel-hidden {
  display: none;
}

.sms-cb-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #888;
  margin: 0 0 16px;
}

/* Category rows */
.sms-cb-category {
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.sms-cb-cat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sms-cb-cat-name {
  font-size: 14px;
  font-weight: 600;
  color: #f0f0f0;
}

.sms-cb-cat-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #666;
  margin: 8px 0 0;
}

/* Toggle switch */
.sms-cb-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.sms-cb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.sms-cb-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #333;
  border-radius: 24px;
  transition: background 0.2s;
}

.sms-cb-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.sms-cb-toggle input:checked + .sms-cb-slider {
  background: #6366f1;
}

.sms-cb-toggle input:checked + .sms-cb-slider::before {
  transform: translateX(20px);
}

.sms-cb-toggle-locked .sms-cb-slider {
  background: #444;
  cursor: not-allowed;
  opacity: 0.6;
}

.sms-cb-toggle-locked input:checked + .sms-cb-slider {
  background: #444;
}

/* Cookies tab */
.sms-cb-cookie-section {
  margin-bottom: 20px;
}

.sms-cb-cookie-heading {
  font-size: 14px;
  font-weight: 600;
  color: #f0f0f0;
  margin: 0 0 10px;
}

.sms-cb-cookie-item {
  font-size: 12px;
  line-height: 1.6;
  color: #888;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #111;
  border-radius: 8px;
}

.sms-cb-cookie-item strong {
  color: #ccc;
  font-size: 13px;
}

.sms-cb-cookie-meta {
  font-size: 11px;
  color: #555;
}

/* Policy tab */
.sms-cb-policy-heading {
  font-size: 14px;
  font-weight: 600;
  color: #f0f0f0;
  margin: 0 0 6px;
}

/* Action buttons */
.sms-cb-actions {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #2a2a2a;
}

.sms-cb-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 0;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1;
  text-align: center;
}

.sms-cb-btn-primary {
  background: #6366f1;
  color: #fff;
}

.sms-cb-btn-primary:hover {
  background: #4f46e5;
}

.sms-cb-btn-secondary {
  background: transparent;
  color: #a0a0a0;
  border: 1px solid #2a2a2a;
}

.sms-cb-btn-secondary:hover {
  color: #f0f0f0;
  border-color: #444;
}

/* Reopen button (bottom-left cookie icon) */
#sms-consent-reopen {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9998;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#sms-consent-reopen:hover {
  color: #f0f0f0;
  border-color: #6366f1;
}

/* Mobile */
@media (max-width: 500px) {
  #sms-consent-banner {
    align-items: flex-end;
    padding: 0;
  }

  .sms-cb-modal {
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
  }

  .sms-cb-actions {
    flex-direction: column-reverse;
  }
}
