/* ==========================================================================
   Sovereign Solutions - Cookie Consent Management Styles
   Compact Left-Side Design | Modern, Accessible, Compliant | No Emoji
   ========================================================================== */

:root {
  --sc-navy-dark: #002235;
  --sc-navy: #00314C;
  --sc-navy-light: #0d4666;
  --sc-blue: #0090CF;
  --sc-blue-hover: #007bb6;
  --sc-blue-glow: rgba(0, 144, 207, 0.25);
  --sc-text-main: #1f2937;
  --sc-text-muted: #596778;
  --sc-bg-card: #ffffff;
  --sc-border: rgba(0, 49, 76, 0.12);
  --sc-shadow: 0 14px 38px -6px rgba(0, 33, 53, 0.22), 0 0 1px 1px rgba(0, 49, 76, 0.05);
  --sc-font-heading: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sc-font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   1. Compact Left-Side Banner
   ========================================================================== */
#sovereign-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  width: 350px;
  max-width: calc(100vw - 32px);
  z-index: 99998;
  background: var(--sc-bg-card);
  border-radius: 14px;
  border: 1px solid var(--sc-border);
  box-shadow: var(--sc-shadow);
  padding: 18px 20px;
  box-sizing: border-box;
  font-family: var(--sc-font-body);
  color: var(--sc-text-main);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.35s;
}

#sovereign-cookie-banner.sc-show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.sc-banner-card {
  display: flex;
  flex-direction: column;
}

.sc-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sc-banner-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-shield-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(0, 144, 207, 0.12);
  color: var(--sc-blue);
  flex-shrink: 0;
}

.sc-banner-title {
  font-family: var(--sc-font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--sc-navy);
  margin: 0;
  letter-spacing: -0.2px;
}

.sc-banner-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.sc-banner-close-btn:hover {
  color: var(--sc-navy);
  background: #f1f5f9;
}

.sc-banner-description {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--sc-text-muted);
  margin: 0 0 14px 0;
}

.sc-banner-description a {
  color: var(--sc-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.sc-banner-description a:hover {
  color: var(--sc-navy);
}

/* Banner Action Buttons */
.sc-banner-actions {
  display: flex;
  gap: 8px;
}

.sc-banner-actions .sc-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  text-align: center;
  justify-content: center;
}

.sc-banner-footer-link {
  text-align: center;
  margin-top: 10px;
  padding-top: 2px;
}

.sc-banner-footer-link a {
  font-size: 11.5px;
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font-family: var(--sc-font-heading);
  font-weight: 600;
  transition: color 0.2s ease;
}

.sc-banner-footer-link a:hover {
  color: var(--sc-blue);
}

/* General Button Styles */
.sc-btn {
  font-family: var(--sc-font-heading);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  outline: none;
  text-decoration: none;
  box-sizing: border-box;
}

.sc-btn:focus-visible {
  outline: 2px solid var(--sc-blue);
  outline-offset: 2px;
}

.sc-btn-primary {
  background: var(--sc-blue);
  color: #ffffff;
  border-color: var(--sc-blue);
  box-shadow: 0 4px 12px rgba(0, 144, 207, 0.3);
}

.sc-btn-primary:hover {
  background: var(--sc-blue-hover);
  border-color: var(--sc-blue-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 144, 207, 0.4);
}

.sc-btn-secondary {
  background: #f1f5f9;
  color: var(--sc-navy);
  border-color: rgba(0, 49, 76, 0.12);
}

.sc-btn-secondary:hover {
  background: #e2e8f0;
  color: var(--sc-navy-dark);
  border-color: rgba(0, 49, 76, 0.2);
  transform: translateY(-1px);
}

.sc-btn-outline {
  background: transparent;
  color: var(--sc-text-muted);
  border-color: rgba(0, 49, 76, 0.15);
}

.sc-btn-outline:hover {
  color: var(--sc-navy);
  background: rgba(0, 49, 76, 0.04);
  border-color: rgba(0, 49, 76, 0.25);
}

/* ==========================================================================
   2. Preferences Modal
   ========================================================================== */
#sovereign-cookie-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 24, 38, 0.65);
  z-index: 99999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

#sovereign-cookie-modal-backdrop.sc-show {
  opacity: 1;
  visibility: visible;
}

#sovereign-cookie-modal {
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--sc-border);
  box-shadow: 0 25px 60px -15px rgba(0, 20, 35, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.94) translateY(15px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--sc-font-body);
}

#sovereign-cookie-modal-backdrop.sc-show #sovereign-cookie-modal {
  transform: scale(1) translateY(0);
}

.sc-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(0, 49, 76, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: #ffffff;
}

.sc-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sc-modal-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 144, 207, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sc-blue);
  flex-shrink: 0;
}

.sc-modal-title {
  font-family: var(--sc-font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--sc-navy);
  margin: 0;
}

.sc-modal-subtitle {
  font-size: 12.5px;
  color: var(--sc-text-muted);
  margin: 2px 0 0;
}

.sc-modal-close-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #8998a8;
  transition: all 0.2s ease;
  font-size: 20px;
  line-height: 1;
}

.sc-modal-close-btn:hover {
  background: #f1f5f9;
  color: var(--sc-navy);
}

/* Modal Body */
.sc-modal-body {
  padding: 18px 24px;
  overflow-y: auto;
  max-height: calc(90vh - 180px);
  -webkit-overflow-scrolling: touch;
}

.sc-modal-body::-webkit-scrollbar {
  width: 5px;
}

.sc-modal-body::-webkit-scrollbar-thumb {
  background-color: rgba(0, 49, 76, 0.16);
  border-radius: 4px;
}

.sc-modal-intro {
  font-size: 13px;
  line-height: 1.5;
  color: var(--sc-text-muted);
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 49, 76, 0.06);
}

/* Category Cards */
.sc-category-card {
  background: #fbfcfd;
  border: 1px solid rgba(0, 49, 76, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sc-category-card:hover {
  border-color: rgba(0, 144, 207, 0.3);
  box-shadow: 0 3px 12px rgba(0, 33, 53, 0.03);
}

.sc-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sc-category-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sc-cat-icon {
  width: 18px;
  height: 18px;
  color: var(--sc-blue);
  flex-shrink: 0;
}

.sc-category-title {
  font-family: var(--sc-font-heading);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--sc-navy);
  margin: 0;
}

.sc-category-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--sc-text-muted);
  margin: 8px 0 0;
}

.sc-cookie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.sc-cookie-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(0, 49, 76, 0.05);
  color: var(--sc-navy-light);
  font-family: monospace;
}

.sc-badge-required {
  background: rgba(0, 144, 207, 0.12);
  color: var(--sc-blue-hover);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Custom Switch */
.sc-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.sc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.sc-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.25s ease;
  border-radius: 22px;
}

.sc-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sc-switch input:checked + .sc-slider {
  background-color: var(--sc-blue);
}

.sc-switch input:focus-visible + .sc-slider {
  outline: 2px solid var(--sc-navy);
  outline-offset: 2px;
}

.sc-switch input:checked + .sc-slider:before {
  transform: translateX(18px);
}

/* Modal Footer */
.sc-modal-footer {
  padding: 14px 24px 18px;
  border-top: 1px solid rgba(0, 49, 76, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  flex-wrap: wrap;
}

.sc-modal-footer-policy {
  font-size: 12px;
  color: var(--sc-text-muted);
}

.sc-modal-footer-policy a {
  color: var(--sc-blue);
  text-decoration: underline;
}

.sc-modal-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-modal-btn-group .sc-btn {
  padding: 8px 14px;
  font-size: 12px;
}

/* ==========================================================================
   3. Persistent Floating Trigger (Hidden - Managed via Footer Link)
   ========================================================================== */
#sovereign-cookie-trigger {
  display: none !important;
}

/* ==========================================================================
   4. Toast Notification
   ========================================================================== */
#sovereign-cookie-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  background: #ffffff;
  border-left: 3px solid var(--sc-blue);
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 33, 53, 0.15);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sc-font-body);
  font-size: 12.5px;
  color: var(--sc-navy);
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: all 0.3s ease;
}

#sovereign-cookie-toast.sc-show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#sovereign-cookie-toast svg {
  width: 16px;
  height: 16px;
  color: #10b981;
  flex-shrink: 0;
}

/* ==========================================================================
   5. Mobile Responsiveness
   ========================================================================== */
@media (max-width: 480px) {
  #sovereign-cookie-banner {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 12px;
    padding: 16px;
  }

  .sc-modal-header {
    padding: 16px 18px 12px;
  }

  .sc-modal-body {
    padding: 14px 18px;
  }

  .sc-modal-footer {
    padding: 12px 18px 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .sc-modal-btn-group {
    flex-direction: column;
    width: 100%;
  }

  .sc-modal-btn-group .sc-btn {
    width: 100%;
  }
}
