/**
 * Cookie Consent Manager Styles
 * Matches Zephyr Recruit brand design
 */

/* ==================== Banner Styles ==================== */
.cookie-consent-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  max-width: 420px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(5, 56, 103, 0.15);
  padding: 20px 24px;
  z-index: 9999;
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border: 1px solid rgba(5, 56, 103, 0.08);
}

.cookie-consent-banner.show {
  opacity: 1;
  transform: translateY(0);
}

.consent-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}

.consent-text p {
  color: #0b2c4d;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  font-family: 'Poppins', sans-serif;
}

.consent-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

.consent-btn {
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 2px solid transparent;
  text-align: center;
  white-space: nowrap;
}

.consent-btn-primary {
  background: #253985;
  color: #ffffff;
  border-color: #253985;
}

.consent-btn-primary:hover {
  background: #F7BA23;
  color: #053867;
  border-color: #F7BA23;
}

.consent-btn-secondary {
  background: transparent;
  color: #253985;
  border-color: #F7BA23;
}

.consent-btn-secondary:hover {
  background: #F7BA23;
  color: #053867;
}

.consent-btn-outline {
  background: transparent;
  color: #6f8aa3;
  border-color: #e3e9f1;
}

.consent-btn-outline:hover {
  background: #F6F8FB;
  color: #053867;
  border-color: #F7BA23;
}

/* ==================== Modal Styles ==================== */
.cookie-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-consent-modal.show {
  opacity: 1;
  visibility: visible;
}

.cookie-consent-modal.show .consent-modal-content {
  transform: scale(1);
}

.consent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 56, 103, 0.75);
  backdrop-filter: blur(4px);
}

.consent-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(5, 56, 103, 0.2);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.consent-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid #e3e9f1;
}

.consent-modal-header h2 {
  color: #053867;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  font-family: 'Poppins', sans-serif;
}

.consent-modal-close {
  background: transparent;
  border: none;
  color: #6f8aa3;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.consent-modal-close:hover {
  background: #F6F8FB;
  color: #053867;
}

.consent-modal-close:focus-visible {
  outline: 3px solid #F7BA23;
  outline-offset: 2px;
}

.consent-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}

.consent-modal-description {
  color: #0b2c4d;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px 0;
  font-family: 'Poppins', sans-serif;
}

.consent-category {
  background: #F6F8FB;
  border: 1px solid #e3e9f1;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.consent-category:last-child {
  margin-bottom: 0;
}

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

.consent-category-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.consent-category-info h3 {
  color: #053867;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  font-family: 'Poppins', sans-serif;
}

.consent-badge {
  background: #F7BA23;
  color: #053867;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Poppins', sans-serif;
}

.consent-category-description {
  color: #6f8aa3;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  font-family: 'Poppins', sans-serif;
}

/* ==================== Toggle Switch ==================== */
.consent-toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.consent-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
}

.consent-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e0;
  border-radius: 28px;
  transition: background 0.3s ease;
}

.consent-slider:before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.consent-checkbox:checked + .consent-slider {
  background: #F7BA23;
}

.consent-checkbox:checked + .consent-slider:before {
  transform: translateX(24px);
}

.consent-checkbox:focus-visible + .consent-slider {
  outline: 3px solid #F7BA23;
  outline-offset: 2px;
}

/* ==================== Modal Footer ==================== */
.consent-modal-footer {
  display: flex;
  gap: 12px;
  padding: 20px 28px;
  border-top: 1px solid #e3e9f1;
  flex-wrap: wrap;
}

.consent-modal-footer .consent-btn {
  flex: 1;
  min-width: 120px;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
  .cookie-consent-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
  }

  .consent-actions {
    flex-direction: column;
  }

  .consent-btn {
    width: 100%;
  }

  .consent-modal-content {
    max-height: 95vh;
  }

  .consent-modal-header,
  .consent-modal-body,
  .consent-modal-footer {
    padding: 20px;
  }

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

  .consent-modal-footer .consent-btn {
    width: 100%;
    min-width: unset;
  }

  .consent-category-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .consent-text h3 {
    font-size: 16px;
  }

  .consent-text p {
    font-size: 13px;
  }

  .consent-modal-header h2 {
    font-size: 18px;
  }

  .consent-category {
    padding: 16px;
  }
}

/* ==================== Accessibility ==================== */
.consent-btn:focus-visible,
.consent-link:focus-visible {
  outline: 3px solid #F7BA23;
  outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Prevent body scroll when modal is open */
html.no-scroll,
html.no-scroll body {
  overflow: hidden;
}

/* ==================== Print Styles ==================== */
@media print {
  .cookie-consent-banner,
  .cookie-consent-modal {
    display: none !important;
  }
}

/* ==================== Animation for Smooth Entry ==================== */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent-banner,
  .consent-modal-content,
  .consent-btn,
  .consent-slider:before,
  * {
    animation: none !important;
    transition: none !important;
  }
}
