/* ==========================================================================
   SHARED UI COMPONENTS & PRIVACY/COOKIE CONSENT BANNER
   ========================================================================== */

/* ==========================================================================
   PRIVACY & COOKIE CONSENT BANNER (3-COLUMN DOCKED RED BANNER)
   - Matches reference screenshot: Full-width bottom dock (#D32D20)
   - Left: Privacy Notice & Links
   - Center: Data Processing Purposes with subtle vertical divider
   - Right: 3 Stacked Buttons (Accept, Reject Non-Essential, Manage Settings)
   ========================================================================== */

.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #D32D20;
  color: #FFFFFF;
  z-index: 99999;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.28);
  font-family: var(--font-primary);
  transform: translateY(105%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.cookie-consent-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner-inner {
  display: grid;
  grid-template-columns: 1.25fr 1.15fr 210px;
  gap: 36px;
  padding: 24px 44px;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Column 1: Notice */
.cookie-col-notice {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cookie-col-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  letter-spacing: -0.01em;
}

.cookie-col-text {
  font-size: 12.2px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.96);
  margin: 0;
}

.cookie-col-text strong {
  color: #FFFFFF;
  font-weight: 700;
}

.cookie-link {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 2.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cookie-link:hover {
  opacity: 0.8;
}

/* Column 2: Data Usage */
.cookie-col-usage {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  padding-left: 32px;
}

.cookie-col-subtitle {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.cookie-vendors-wrap {
  margin-top: 2px;
  font-size: 11.5px;
}

/* Column 3: Stacked Actions */
.cookie-col-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  justify-content: center;
  min-width: 185px;
}

.btn-cookie-accept,
.btn-cookie-reject,
.btn-cookie-manage {
  width: 100%;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.btn-cookie-accept,
.btn-cookie-reject {
  background-color: #FFFFFF;
  color: #D32D20;
}

.btn-cookie-accept:hover,
.btn-cookie-reject:hover {
  background-color: #F5F5F5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-cookie-manage {
  background-color: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.92);
}

.btn-cookie-manage:hover {
  background-color: #FFFFFF;
  color: #D32D20;
  transform: translateY(-1px);
}

/* Reopen Cookie Button in Bottom Bar */
.cookie-reopen-trigger {
  background: transparent;
  border: 1px solid rgba(18, 19, 22, 0.2);
  border-radius: 9999px;
  padding: 4px 12px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #121316;
  cursor: pointer;
  margin-left: 18px;
  transition: all 0.2s ease;
}

.cookie-reopen-trigger:hover {
  background: #121316;
  color: #FAF7F2;
}

/* Modal Overlay & Dialog */
.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 19, 22, 0.72);
  backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.cookie-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.cookie-modal-dialog {
  background: #FFFFFF;
  color: #121316;
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.96) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
}

.cookie-modal-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 800;
  color: #121316;
  margin: 0;
}

.cookie-modal-close {
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0 4px;
}

.cookie-modal-close:hover {
  color: #121316;
}

.cookie-modal-body {
  padding: 24px 26px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cookie-category-item {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 6px;
  padding: 16px 18px;
}

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

.cookie-cat-name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  color: #121316;
  margin: 0 0 4px 0;
}

.cookie-cat-desc {
  font-size: 12px;
  line-height: 1.45;
  color: #555;
  margin: 0;
}

.cookie-badge-always {
  background: rgba(18, 19, 22, 0.08);
  color: #121316;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Switch Slider */
.cookie-switch-label {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.cookie-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CCC;
  transition: 0.25s;
  border-radius: 24px;
}

.cookie-switch-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

.cookie-switch-label input:checked + .cookie-switch-slider {
  background-color: #D32D20;
}

.cookie-switch-label input:checked + .cookie-switch-slider::before {
  transform: translateX(20px);
}

.cookie-modal-footer {
  padding: 16px 26px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  display: flex;
  justify-content: flex-end;
}

.btn-modal-save {
  background: #D32D20;
  color: #FFFFFF;
  border: none;
  padding: 10px 22px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 800;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-modal-save:hover {
  background: #B52217;
}

/* Responsive Media Query */
@media (max-width: 1024px) {
  .cookie-banner-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 24px;
  }
  .cookie-col-usage {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 0;
    padding-top: 16px;
  }
  .cookie-col-actions {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }
  .btn-cookie-accept,
  .btn-cookie-reject,
  .btn-cookie-manage {
    flex: 1;
    min-width: 140px;
  }
}

@media (max-width: 600px) {
  .cookie-col-actions {
    flex-direction: column;
  }
  .btn-cookie-accept,
  .btn-cookie-reject,
  .btn-cookie-manage {
    width: 100%;
  }
}

