/**
 * Cookie Preferences & Privacy Banner styles
 * Alt Bank / Altmobile-style persistent modals
 */

/* Backdrop for both modals */
.cookie-consent-backdrop,
.privacy-banner-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-consent-backdrop.is-visible,
.privacy-banner-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Cookie Preferences modal */
.cookie-consent-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.cookie-consent-modal.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.cookie-consent-modal .cookie-modal-inner {
  padding: 28px 32px 32px;
}

.cookie-consent-modal h2 {
  color: #1a365d;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 16px;
  text-align: center;
}

.cookie-consent-modal .cookie-modal-text {
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 20px;
}

.cookie-consent-modal .cookie-modal-text p {
  margin: 0 0 10px;
}

.cookie-consent-modal .cookie-modal-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.cookie-consent-modal .cookie-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.cookie-consent-modal .cookie-btn-accept {
  background: #1a365d;
  color: #fff;
}

.cookie-consent-modal .cookie-btn-accept:hover {
  background: #2c5282;
}

.cookie-consent-modal .cookie-btn-reject {
  background: #e2e8f0;
  color: #1a365d;
}

.cookie-consent-modal .cookie-btn-reject:hover {
  background: #cbd5e0;
}

.cookie-consent-modal .cookie-btn-manage {
  background: #fff;
  color: #1a365d;
  border: 2px solid #1a365d;
}

.cookie-consent-modal .cookie-btn-manage:hover {
  background: #f7fafc;
}

.cookie-consent-modal .cookie-modal-footer {
  font-size: 0.85rem;
  color: #718096;
  line-height: 1.5;
}

.cookie-consent-modal .cookie-modal-footer a {
  color: #3182ce;
  text-decoration: underline;
}

.cookie-consent-modal .cookie-modal-footer a:hover {
  color: #2c5282;
}

/* Manage Cookie Preferences (second screen) */
.cookie-manage-modal .cookie-categories {
  margin: 20px 0;
}

.cookie-manage-modal .cookie-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #e2e8f0;
}

.cookie-manage-modal .cookie-category:last-child {
  border-bottom: none;
}

.cookie-manage-modal .cookie-category-label {
  flex: 1;
}

.cookie-manage-modal .cookie-category-label strong {
  display: block;
  color: #1a365d;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.cookie-manage-modal .cookie-category-label span {
  font-size: 0.85rem;
  color: #718096;
  line-height: 1.4;
}

.cookie-manage-modal .cookie-category-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: #e2e8f0;
  color: #4a5568;
  flex-shrink: 0;
}

.cookie-manage-modal .cookie-category-badge.always-on {
  background: #e2e8f0;
  color: #4a5568;
}

.cookie-manage-modal .cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  background: #cbd5e0;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.cookie-manage-modal .cookie-toggle.is-on {
  background: #3182ce;
}

.cookie-manage-modal .cookie-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.cookie-manage-modal .cookie-toggle.is-on::after {
  transform: translateX(20px);
}

.cookie-manage-modal .cookie-manage-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.cookie-manage-modal .cookie-manage-buttons .cookie-btn {
  padding: 10px 20px;
}

.cookie-manage-modal .cookie-manage-buttons .cookie-btn-back {
  background: #e2e8f0;
  color: #1a365d;
}

.cookie-manage-modal .cookie-manage-buttons .cookie-btn-save {
  background: #1a365d;
  color: #fff;
}

/* Hide/show screens */
.cookie-consent-modal .cookie-screen {
  display: none;
}

.cookie-consent-modal .cookie-screen.is-active {
  display: block;
}

/* Introductory Privacy Policy banner */
.privacy-intro-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a365d;
  color: #fff;
  padding: 16px 24px;
  z-index: 9997;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.privacy-intro-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.privacy-intro-banner-text {
  flex: 1;
  min-width: 200px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.privacy-intro-banner-text a {
  color: #90cdf4;
  text-decoration: underline;
}

.privacy-intro-banner-text a:hover {
  color: #fff;
}

.privacy-intro-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.privacy-intro-banner-close {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.privacy-intro-banner-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 600px) {
  .cookie-consent-modal .cookie-modal-inner {
    padding: 20px 20px 24px;
  }
  .cookie-consent-modal .cookie-modal-buttons {
    flex-direction: column;
  }
  .cookie-consent-modal .cookie-btn {
    width: 100%;
    text-align: center;
  }
  .privacy-intro-banner {
    padding: 14px 16px;
  }
  .privacy-intro-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
