/**
 * VISUESA Cookie Consent Styles
 * Modern, accessible cookie consent banner and modal
 */

/* Cookie Consent Banner */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: 24px;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  border-top: 3px solid #4154f1;
}

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

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookie-consent-text h4 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #012970;
}

.cookie-consent-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #444444;
}

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

.cookie-consent-buttons .btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

.cookie-consent-buttons .btn-primary {
  background-color: #4154f1;
  color: #ffffff;
}

.cookie-consent-buttons .btn-primary:hover {
  background-color: #3545d9;
}

.cookie-consent-buttons .btn-outline-secondary {
  background-color: transparent;
  color: #444444;
  border: 1px solid #dee2e6;
}

.cookie-consent-buttons .btn-outline-secondary:hover {
  background-color: #f8f9fa;
}

.cookie-consent-buttons .btn-link {
  background: none;
  color: #4154f1;
  padding: 10px 16px;
  text-decoration: underline;
}

.cookie-consent-buttons .btn-link:hover {
  color: #3545d9;
}

.cookie-consent-links {
  font-size: 12px;
  color: #6c757d;
}

.cookie-consent-links a {
  color: #4154f1;
  text-decoration: none;
}

.cookie-consent-links a:hover {
  text-decoration: underline;
}

/* Cookie Consent Modal */
.cookie-consent-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.cookie-consent-modal-content {
  background: #ffffff;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

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

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

.cookie-consent-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #012970;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.cookie-modal-close:hover {
  background-color: #f8f9fa;
  color: #012970;
}

.cookie-consent-modal-body {
  padding: 24px;
}

.cookie-category {
  margin-bottom: 24px;
}

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

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

.cookie-category-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #012970;
}

.cookie-category p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #444444;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

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

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

.cookie-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 input:checked + .cookie-toggle-slider {
  background-color: #4154f1;
}

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

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

.cookie-consent-modal-footer {
  padding: 24px;
  border-top: 1px solid #dee2e6;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cookie-consent-modal-footer .btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.cookie-consent-modal-footer .btn-primary {
  background-color: #4154f1;
  color: #ffffff;
}

.cookie-consent-modal-footer .btn-primary:hover {
  background-color: #3545d9;
}

.cookie-consent-modal-footer .btn-outline-primary {
  background-color: transparent;
  color: #4154f1;
  border: 1px solid #4154f1;
}

.cookie-consent-modal-footer .btn-outline-primary:hover {
  background-color: #4154f1;
  color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-consent-banner {
    padding: 16px;
  }

  .cookie-consent-text h4 {
    font-size: 16px;
  }

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

  .cookie-consent-buttons {
    flex-direction: column;
    width: 100%;
  }

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

  .cookie-consent-modal-content {
    margin: 10px;
  }

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

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

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

@media (max-width: 480px) {
  .cookie-consent-text h4 {
    font-size: 15px;
  }

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

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

/* Accessibility */
.cookie-consent-banner:focus-within,
.cookie-consent-modal:focus-within {
  outline: 2px solid #4154f1;
  outline-offset: 2px;
}

.cookie-consent-buttons .btn:focus,
.cookie-consent-modal-footer .btn:focus,
.cookie-modal-close:focus {
  outline: 2px solid #4154f1;
  outline-offset: 2px;
}

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

