/* Cookie Consent Banner - Box Design */
#cookie-consent-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 40px));
  z-index: 10000;
  background: linear-gradient(135deg, #01385D 0%, #025a8c 100%);
  color: #ffffff;
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  max-width: 700px;
  width: calc(100% - 40px);
}

#cookie-consent-banner.active {
  transform: translateX(-50%) translateY(0);
}

.cookie-banner-content {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cookie-banner-text h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

.cookie-banner-text p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.cookie-banner-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Cookie Buttons */
.cookie-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.cookie-btn-primary {
  background: #EF4F0F;
  color: #ffffff;
  border-color: #EF4F0F;
}

.cookie-btn-primary:hover {
  background: #d4450d;
  border-color: #d4450d;
}

.cookie-btn-secondary {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

.cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.cookie-btn-outline {
  background: transparent;
  color: #FF911F;
  border-color: #FF911F;
}

.cookie-btn-outline:hover {
  background: rgba(255, 145, 31, 0.1);
}

/* Cookie Icon - Shows after consent */
#cookie-settings-icon {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  background: rgba(1, 56, 93, 0.7);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

#cookie-settings-icon:hover {
  background: rgba(1, 56, 93, 0.9);
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.5);
}

#cookie-settings-icon.active {
  display: flex;
}

#cookie-settings-icon svg {
  width: 24px;
  height: 24px;
  fill: rgba(255, 255, 255, 0.85);
}

#cookie-settings-icon:hover svg {
  fill: #ffffff;
}

/* Cookie Preference Modal */
#cookie-preference-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
}

#cookie-preference-modal.active {
  display: flex;
}

.cookie-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.cookie-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  background: #01385D;
  color: #ffffff;
}

.cookie-modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #ffffff;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.cookie-modal-close:hover {
  opacity: 1;
}

.cookie-modal-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.cookie-category {
  padding: 0.875rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.cookie-category:last-child {
  border-bottom: none;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cookie-category-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cookie-category-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #01385D;
  margin: 0;
}

.cookie-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-weight: 600;
}

.cookie-badge-required {
  background: #dcfce7;
  color: #166534;
}

.cookie-category-description {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #4b5563;
  margin: 0;
}

/* Toggle Switch - Smaller */
.cookie-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.cookie-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  width: 40px;
  height: 22px;
  background: #d1d5db;
  border-radius: 11px;
  position: relative;
  transition: background 0.3s ease;
}

.cookie-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: #EF4F0F;
}

.cookie-toggle input:checked + .cookie-toggle-slider::after {
  transform: translateX(18px);
}

.cookie-toggle-label-on,
.cookie-toggle-label-off {
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
}

.cookie-toggle-label-on {
  color: #EF4F0F;
  display: none;
}

.cookie-toggle-label-off {
  color: #6b7280;
}

.cookie-toggle input:checked ~ .cookie-toggle-label-on {
  display: inline;
}

.cookie-toggle input:checked ~ .cookie-toggle-label-off {
  display: none;
}

.cookie-modal-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  justify-content: flex-end;
}

/* Responsive Styles */
@media (max-width: 768px) {
  #cookie-consent-banner {
    bottom: 10px;
    width: calc(100% - 20px);
  }

  .cookie-banner-content {
    padding: 1rem;
    gap: 0.75rem;
  }

  .cookie-banner-text h2 {
    font-size: 1rem;
  }

  .cookie-banner-text p {
    font-size: 0.8rem;
  }

  .cookie-banner-buttons {
    justify-content: center;
  }

  .cookie-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .cookie-banner-buttons {
    flex-direction: column;
    width: 100%;
  }

  .cookie-btn {
    width: 100%;
    text-align: center;
  }

  #cookie-settings-icon {
    width: 40px;
    height: 40px;
    bottom: 12px;
    left: 12px;
  }

  #cookie-settings-icon svg {
    width: 20px;
    height: 20px;
  }

  .cookie-modal-content {
    width: 95%;
    max-height: 85vh;
  }

  .cookie-modal-header,
  .cookie-modal-body,
  .cookie-modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
