/* ============================================================================
   Stratus GDPR Banner CSS
   Brand Design: Gradient #1689FE → #33A4FE → #48B7FF → #9BD9FE
   ============================================================================ */

/* ============================================================================
   FONT LOADING
   ============================================================================ */

@font-face {
  font-family: 'Discovery';
  font-weight: 400;
  src: url('https://cloud.stratuspro.co.il/fonts/Discovery_Fs-Regular.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Discovery';
  font-weight: 500;
  src: url('https://cloud.stratuspro.co.il/fonts/Discovery_Fs-Medium.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Nostela';
  font-weight: 100 900;
  src: url('https://cloud.stratuspro.co.il/fonts/Nostela_Fs-VF.woff') format('woff');
  font-display: swap;
}

/* ============================================================================
   ROOT & WRAPPER
   ============================================================================ */

.stratus-gdpr {
  --sg-bg: #0f3a6e;
  --sg-btn: #1689fe;
  --sg-text: #ffffff;
  --sg-font: 'Discovery', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sg-font-heading: 'Nostela', 'Discovery', sans-serif;
  --sg-radius: 22px;
  --sg-radius-sm: 10px;
  --sg-radius-lg: 14px;
  --sg-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sg-gradient: linear-gradient(135deg, #1689fe 0%, #33a4fe 26%, #48b7ff 47%, #9bd9fe 100%);

  position: fixed;
  z-index: 999999;
  font-family: var(--sg-font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

.stratus-gdpr *,
.stratus-gdpr *::before,
.stratus-gdpr *::after {
  box-sizing: inherit;
}

/* ============================================================================
   POSITION VARIANTS
   ============================================================================ */

.stratus-gdpr[data-position="bottom"] {
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(88vw, 440px);
}

.stratus-gdpr[data-position="center"] {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(88vw, 440px);
}

/* ============================================================================
   OVERLAY
   ============================================================================ */

.stratus-gdpr-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(15, 58, 110, 0.35);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--sg-ease);
}

.stratus-gdpr-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================================
   BANNER INNER — BASE
   ============================================================================ */

.sg-banner-inner {
  background: var(--sg-bg);
  color: var(--sg-text);
  border-radius: var(--sg-radius);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  animation: sg-slide-up 0.5s var(--sg-ease) both;
  position: relative;
  overflow: hidden;
}

.sg-banner-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--sg-gradient);
}

/* ============================================================================
   STYLE VARIANT: MODERN (DEFAULT)
   ============================================================================ */

.stratus-gdpr[data-style="modern"] .sg-banner-inner {
  background: var(--sg-bg);
  color: var(--sg-text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================================
   STYLE VARIANT: MINIMAL
   ============================================================================ */

.stratus-gdpr[data-style="minimal"] .sg-banner-inner {
  background: #ffffff;
  color: #374151;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
}

.stratus-gdpr[data-style="minimal"] .sg-banner-inner::before {
  background: var(--sg-gradient);
}

.stratus-gdpr[data-style="minimal"] .sg-banner-title {
  color: #111827;
}

.stratus-gdpr[data-style="minimal"] .sg-banner-desc {
  color: #6b7280;
}

.stratus-gdpr[data-style="minimal"] .sg-btn-accept {
  background: var(--sg-gradient);
  color: white;
}

.stratus-gdpr[data-style="minimal"] .sg-btn-settings,
.stratus-gdpr[data-style="minimal"] .sg-btn-reject {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.stratus-gdpr[data-style="minimal"] .sg-btn-settings:hover,
.stratus-gdpr[data-style="minimal"] .sg-btn-reject:hover {
  background: #e5e7eb;
}

/* ============================================================================
   STYLE VARIANT: GLASSMORPHISM — APPLE LIQUID GLASS
   ============================================================================ */

.stratus-gdpr[data-style="glassmorphism"] .sg-banner-inner {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.08) 40%,
      rgba(200, 225, 255, 0.12) 60%,
      rgba(255, 255, 255, 0.18) 100%
    );
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.15),
    0 0 0 0.5px rgba(255, 255, 255, 0.4) inset,
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 -1px 0 rgba(255, 255, 255, 0.08) inset;
}

.stratus-gdpr[data-style="glassmorphism"] .sg-banner-inner::before {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 20%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.5) 80%,
    transparent 100%
  );
}

.stratus-gdpr[data-style="glassmorphism"] .sg-banner-inner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background:
    radial-gradient(
      ellipse 80% 50% at 20% 0%,
      rgba(255, 255, 255, 0.15),
      transparent 50%
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 100%,
      rgba(155, 217, 254, 0.08),
      transparent 50%
    );
  pointer-events: none;
}

.stratus-gdpr[data-style="glassmorphism"] .sg-banner-title {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.stratus-gdpr[data-style="glassmorphism"] .sg-banner-desc {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.stratus-gdpr[data-style="glassmorphism"] .sg-btn-accept {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.25) inset;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.stratus-gdpr[data-style="glassmorphism"] .sg-btn-accept:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.35) inset;
  filter: none;
}

.stratus-gdpr[data-style="glassmorphism"] .sg-btn-settings {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.stratus-gdpr[data-style="glassmorphism"] .sg-btn-settings:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.stratus-gdpr[data-style="glassmorphism"] .sg-btn-reject {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.stratus-gdpr[data-style="glassmorphism"] .sg-btn-reject:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.stratus-gdpr[data-style="glassmorphism"] .sg-settings-panel {
  border-top-color: rgba(255, 255, 255, 0.15);
}

.stratus-gdpr[data-style="glassmorphism"] .sg-category {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.stratus-gdpr[data-style="glassmorphism"] .sg-powered {
  color: rgba(255, 255, 255, 0.25);
}

.stratus-gdpr[data-style="glassmorphism"] .sg-privacy-link {
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================================================
   BANNER LOGO & CONTENT
   ============================================================================ */

.sg-banner-logo {
  width: 40px;
  height: 30px;
  margin-bottom: 16px;
  opacity: 0.9;
}

.sg-banner-logo svg {
  width: 100%;
  height: 100%;
}

.sg-banner-title {
  font-family: var(--sg-font-heading);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.sg-banner-desc {
  font-size: 13px;
  opacity: 0.75;
  margin: 0 0 22px 0;
  line-height: 1.7;
}

.sg-banner-link {
  color: inherit;
  opacity: 0.9;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.15s var(--sg-ease);
}

.sg-banner-link:hover {
  opacity: 1;
}

/* Minimal style link override */
.stratus-gdpr[data-style="minimal"] .sg-banner-link {
  color: #1689fe;
  opacity: 1;
}

/* ============================================================================
   BANNER ACTIONS
   ============================================================================ */

.sg-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Accept button — gradient */
.sg-btn-accept {
  flex: 1;
  min-width: 100px;
  height: 44px;
  background: var(--sg-gradient);
  color: white;
  border: none;
  border-radius: var(--sg-radius-sm);
  font-family: var(--sg-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--sg-ease);
  box-shadow: 0 2px 8px rgba(22, 137, 254, 0.3);
}

.sg-btn-accept:hover {
  box-shadow: 0 4px 16px rgba(22, 137, 254, 0.4);
  filter: brightness(1.06);
}

.sg-btn-accept:active {
  transform: scale(0.97);
}

/* Settings button */
.sg-btn-settings {
  height: 44px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--sg-text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--sg-radius-sm);
  font-family: var(--sg-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s var(--sg-ease);
  white-space: nowrap;
}

.sg-btn-settings:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
}

.sg-btn-settings:active {
  transform: scale(0.97);
}

/* Reject button */
.sg-btn-reject {
  height: 44px;
  padding: 0 18px;
  background: transparent;
  color: var(--sg-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--sg-radius-sm);
  font-family: var(--sg-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s var(--sg-ease);
  white-space: nowrap;
}

.sg-btn-reject:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.sg-btn-reject:active {
  transform: scale(0.97);
}

/* ============================================================================
   SETTINGS PANEL
   ============================================================================ */

.sg-settings-panel {
  display: none;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sg-settings-panel.visible {
  display: block;
  animation: sg-fade-in 0.3s var(--sg-ease);
}

.stratus-gdpr[data-style="minimal"] .sg-settings-panel {
  border-top-color: #e5e7eb;
}

/* ============================================================================
   CATEGORY ITEMS
   ============================================================================ */

.sg-category {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sg-category:last-child {
  border-bottom: none;
}

.sg-category-info {
  flex: 1;
  padding-inline-end: 16px;
}

.sg-category-name {
  font-size: 14px;
  font-weight: 600;
  display: block;
}

.sg-category-desc {
  font-size: 12px;
  opacity: 0.55;
  margin-top: 3px;
  display: block;
  line-height: 1.5;
}

.stratus-gdpr[data-style="minimal"] .sg-category {
  border-bottom-color: #f3f4f6;
}

.stratus-gdpr[data-style="minimal"] .sg-category-name {
  color: #111827;
}

.stratus-gdpr[data-style="minimal"] .sg-category-desc {
  opacity: 0.7;
  color: #6b7280;
}

/* ============================================================================
   CATEGORY TOGGLE — GRADIENT ON STATE
   ============================================================================ */

.sg-category-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 46px;
  height: 26px;
  margin-inline-start: 16px;
  flex-shrink: 0;
}

.sg-category-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.sg-category-toggle span {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  transition: all 0.2s var(--sg-ease);
}

.sg-category-toggle span::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  top: 3px;
  inset-inline-start: 3px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.2s var(--sg-ease);
}

.sg-category-toggle input:checked + span {
  background: var(--sg-gradient);
  box-shadow: 0 0 8px rgba(22, 137, 254, 0.3);
}

.sg-category-toggle input:checked + span::before {
  inset-inline-start: 23px;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Minimal style toggle */
.stratus-gdpr[data-style="minimal"] .sg-category-toggle span {
  background: #d1d5db;
}

.stratus-gdpr[data-style="minimal"] .sg-category-toggle span::before {
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stratus-gdpr[data-style="minimal"] .sg-category-toggle input:checked + span {
  background: var(--sg-gradient);
}

/* ============================================================================
   ALWAYS ACTIVE BADGE
   ============================================================================ */

.sg-always-active {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(155, 217, 254, 0.9);
  padding: 4px 14px;
  border-radius: 9999px;
  background: rgba(22, 137, 254, 0.15);
  border: 1px solid rgba(22, 137, 254, 0.2);
  margin-inline-end: 8px;
  white-space: nowrap;
}

.stratus-gdpr[data-style="minimal"] .sg-always-active {
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  color: #1689fe;
  border: 1px solid #bfdbfe;
}

/* ============================================================================
   SAVE PREFERENCES BUTTON
   ============================================================================ */

.sg-btn-save {
  width: 100%;
  height: 44px;
  margin-top: 18px;
  background: var(--sg-gradient);
  color: white;
  border: none;
  border-radius: var(--sg-radius-sm);
  font-family: var(--sg-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--sg-ease);
  box-shadow: 0 2px 8px rgba(22, 137, 254, 0.3);
}

.sg-btn-save:hover {
  box-shadow: 0 4px 16px rgba(22, 137, 254, 0.4);
  filter: brightness(1.06);
}

.sg-btn-save:active {
  transform: scale(0.97);
}

/* ============================================================================
   PRIVACY & POWERED BY LINKS
   ============================================================================ */

.sg-privacy-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

.sg-privacy-link a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s var(--sg-ease);
}

.sg-privacy-link a:hover {
  color: rgba(255, 255, 255, 0.65);
}

.stratus-gdpr[data-style="minimal"] .sg-privacy-link {
  color: #9ca3af;
}

.stratus-gdpr[data-style="minimal"] .sg-privacy-link a:hover {
  color: #1689fe;
}

.sg-powered {
  text-align: center;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
}

.sg-powered a {
  color: inherit;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s var(--sg-ease);
}

.sg-powered a:hover {
  color: rgba(255, 255, 255, 0.4);
}

.stratus-gdpr[data-style="minimal"] .sg-powered {
  color: #d1d5db;
}

.stratus-gdpr[data-style="minimal"] .sg-powered a:hover {
  color: #1689fe;
}

/* ============================================================================
   FLOATING BADGE — COOKIE ICON BUTTON
   Note: Badge lives OUTSIDE .stratus-gdpr, so CSS vars aren't available.
   Use explicit gradient values instead.
   ============================================================================ */

.sg-badge-float {
  position: fixed;
  z-index: 999997;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1689fe 0%, #33a4fe 26%, #48b7ff 47%, #9bd9fe 100%);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 4px 20px rgba(22, 137, 254, 0.3),
    0 0 0 3px rgba(22, 137, 254, 0.1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sg-badge-float .sg-badge-icon {
  width: 22px;
  height: 22px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sg-badge-float:hover {
  transform: scale(1.1);
  box-shadow:
    0 6px 28px rgba(22, 137, 254, 0.4),
    0 0 0 4px rgba(22, 137, 254, 0.15);
}

.sg-badge-float:hover .sg-badge-icon {
  transform: rotate(-12deg);
}

.sg-badge-float:active {
  transform: scale(0.93);
}

/* Modern / Glassmorphism — gradient bg, white icon */
.sg-badge-float[data-style="modern"],
.sg-badge-float[data-style="glassmorphism"] {
  background: linear-gradient(135deg, #1689fe 0%, #33a4fe 26%, #48b7ff 47%, #9bd9fe 100%);
  color: white;
  box-shadow:
    0 4px 20px rgba(22, 137, 254, 0.3),
    0 0 0 3px rgba(22, 137, 254, 0.1);
}

.sg-badge-float[data-style="modern"]:hover,
.sg-badge-float[data-style="glassmorphism"]:hover {
  box-shadow:
    0 6px 28px rgba(22, 137, 254, 0.4),
    0 0 0 4px rgba(22, 137, 254, 0.15);
}

/* Minimal — white bg, brand-colored icon */
.sg-badge-float[data-style="minimal"] {
  background: #ffffff;
  color: #1689fe;
  border: 1px solid #e5e7eb;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.04);
}

.sg-badge-float[data-style="minimal"]:hover {
  box-shadow:
    0 6px 28px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(22, 137, 254, 0.2);
  border-color: #bfdbfe;
}

/* Position variants */
.sg-badge-float[data-badge-position="bottom-right"] {
  bottom: 20px;
  right: 20px;
}

.sg-badge-float[data-badge-position="bottom-left"] {
  bottom: 20px;
  left: 20px;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes sg-slide-up {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sg-slide-down {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
}

@keyframes sg-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hiding state for slide out */
.stratus-gdpr.sg-hiding .sg-banner-inner {
  animation: sg-slide-down 0.35s var(--sg-ease) forwards;
}

/* ============================================================================
   RTL/LTR SUPPORT
   Direction is set via the dir attribute on the banner element.
   Logical properties (margin-inline-*, padding-inline-*, inset-inline-*)
   handle bidirectional layout automatically.
   ============================================================================ */

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 640px) {
  .stratus-gdpr[data-position="bottom"] {
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: min(94vw, 400px);
  }

  .stratus-gdpr[data-position="center"] {
    top: auto;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: min(94vw, 400px);
  }

  .sg-banner-inner {
    border-radius: var(--sg-radius);
    padding: 22px 18px;
  }

  .sg-banner-actions {
    flex-direction: column;
  }

  .sg-btn-accept,
  .sg-btn-settings,
  .sg-btn-reject {
    width: 100%;
    flex: none;
  }

  .sg-badge-float {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  .sg-badge-float[data-badge-position="bottom-right"],
  .sg-badge-float[data-badge-position="bottom-left"] {
    bottom: 16px;
  }

  .sg-badge-float[data-badge-position="bottom-right"] {
    right: 16px;
  }

  .sg-badge-float[data-badge-position="bottom-left"] {
    left: 16px;
  }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
  .stratus-gdpr,
  .stratus-gdpr-overlay,
  .sg-badge-float {
    display: none !important;
  }
}
