/* Main Cookie Banner Modal */
.cookie-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.cookie-banner.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Content (shared by both modals) */
.cookie-modal-content {
  background: #ffffff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  animation: slideUp 0.3s ease;
  border-top: 4px solid #6EBA01;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Modal Header */
.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem;
}

.modal-title {
  margin: 0;
  font-size: 1.35rem;
  color: #1e293b;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  color: #1e293b;
  background: #f1f5f9;
}

/* Modal Body */
.cookie-modal-body {
  padding: 0 1.5rem 1rem;
}

.cookie-text {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}

.cookie-link {
  color: #6EBA01;
  text-decoration: underline;
  font-weight: 500;
}

.cookie-link:hover {
  color: #548F00;
}

/* Cookie Preview Info */
.cookie-preview-info {
  background: #f8fafc;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1rem;
}

.cookie-preview-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #475569;
}

.cookie-preview-icon {
  font-size: 1.25rem;
}

/* Cookie Options (Settings Modal) */
.cookie-option {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
}

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

.cookie-option-info {
  flex: 1;
  padding-right: 1rem;
}

.cookie-option-info h3 {
  margin: 0 0 0.35rem 0;
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 600;
}

.cookie-option-info p {
  margin: 0;
  font-size: 0.825rem;
  color: #64748b;
  line-height: 1.4;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

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

.cookie-toggle.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.cookie-toggle.disabled .toggle-slider {
  background-color: #6EBA01;
  cursor: not-allowed;
}

.cookie-toggle.disabled .toggle-slider:before {
  transform: translateX(22px);
}

.cookie-toggle input:checked + .toggle-slider {
  background-color: #6EBA01;
}

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

/* Modal Footer */
.cookie-modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Buttons */
.cookie-btn {
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 100px;
}

.cookie-btn-primary {
  background: #6EBA01;
  color: #ffffff;
  border: 2px solid #6EBA01;
}

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

.cookie-btn-secondary {
  background: transparent;
  color: #64748b;
  border: 2px solid #cbd5e1;
}

.cookie-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #475569;
}

.cookie-btn-secondary.reject {
  border-color: #fca5a5;
  color: #dc2626;
}

.cookie-btn-secondary.reject:hover {
  background: #fef2f2;
  border-color: #f87171;
}

/* Settings Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-modal.hidden {
  display: none;
}

.modal-save-btn {
  flex: 1;
}

/* Open settings button (shown after user made choice) */
#cookie-settings-button {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: #ffffff;
  border: 2px solid #6EBA01;
  color: #6EBA01;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  z-index: 9997;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

#cookie-settings-button:hover {
  background: #6EBA01;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#cookie-settings-button.hidden {
  display: none;
}

/* Mobile Responsive */
@media (max-width: 540px) {
  .cookie-modal-content {
    max-width: 100%;
    margin: 1rem;
  }

  .cookie-modal-footer {
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
  }

  #cookie-settings-button {
    bottom: 0.75rem;
    right: 0.75rem;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
}
