/* ===== COOKIE BAR / MODAL ===== */

/* Cookie Modal Overlay */
#modal-cookies {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#modal-cookies.activo {
  opacity: 1;
  display: none;
}

/* Cookie Modal Content */
.modal-cookies-content {
  background: white;
  border-radius: 24px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #e9ecef;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

#modal-cookies.activo .modal-cookies-content {
  transform: scale(1) translateY(0);
}

/* Cookie Modal Header */
.modal-cookies-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.modal-cookies-icon {
  font-size: 48px;
  flex-shrink: 0;
}

.modal-cookies-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 8px;
}

.modal-cookies-subtitle {
  font-size: 16px;
  color: #6c757d;
  margin: 0;
}

/* Cookie Modal Body */
.modal-cookies-body {
  margin-bottom: 24px;
}

.modal-cookies-text {
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 16px;
}

.modal-cookies-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.modal-cookies-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: #6c757d;
  font-size: 14px;
}

.modal-cookies-list li::before {
  content: "🍪";
  position: absolute;
  left: 0;
  top: 0;
}

/* Cookie Modal Actions */
.modal-cookies-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-cookies-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

.modal-cookies-btn-primary {
  background: linear-gradient(135deg, #524a49 0%, #665f55 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(76, 71, 71, 0.3);
}

.modal-cookies-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -3px rgba(97, 76, 74, 0.4);
}

.modal-cookies-btn-secondary {
  background: #f8f9fa;
  color: #6c757d;
  border: 1px solid #e9ecef;
}

.modal-cookies-btn-secondary:hover {
  background: #e9ecef;
  color: #495057;
}

.modal-cookies-btn-link {
  background: none;
  color: #282222;
  text-decoration: underline;
  border: none;
  padding: 8px 16px;
}

.modal-cookies-btn-link:hover {
  color: #514949;
}

/* Cookie Banner (Alternative to Modal) */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e9ecef;
  box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

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

.cookie-banner-content {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 300px;
}

.cookie-banner-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner-description {
  color: #6c757d;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Cookie Settings Link */
.cookie-settings-link {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: white !important;
  border: 1px solid #e9ecef;
  border-radius: 50px;
  padding: 12px 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  text-decoration: none;
  color: #6c757d !important;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.cookie-settings-link:hover {
  /* background: #f8f9fa; */
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.15);
}

/* Cookie Consent Indicator */
.cookie-consent-indicator {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-width: 200px;
}

.consent-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.consent-status-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #28a745;
}

.consent-status-icon.rejected {
  background: #dc3545;
}

.consent-status-text {
  font-size: 12px;
  font-weight: 600;
  color: #2c3e50;
}

.consent-details {
  font-size: 11px;
  color: #6c757d;
  line-height: 1.4;
}

/* Animations */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

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

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

/* Responsive Design for Cookie Elements */
@media (max-width: 768px) {
  .modal-cookies-content {
    padding: 24px;
    margin: 20px;
    max-width: none;
    width: auto;
  }

  .modal-cookies-actions {
    flex-direction: column;
  }

  .modal-cookies-btn {
    width: 100%;
  }

  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .cookie-banner-text {
    min-width: auto;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: center;
  }

  .cookie-settings-link {
    bottom: 10px;
    left: 10px;
    padding: 10px 16px;
    font-size: 13px;
  }

  .cookie-consent-indicator {
    right: 10px;
    max-width: 180px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .modal-cookies-content {
    margin: 10px;
    padding: 20px;
    border-radius: 16px;
  }

  .modal-cookies-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .modal-cookies-icon {
    font-size: 36px;
  }

  .modal-cookies-title {
    font-size: 20px;
  }

  .cookie-banner-content {
    padding: 16px;
  }

  .cookie-banner-actions {
    flex-direction: column;
    gap: 8px;
  }

  .modal-cookies-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
  .modal-cookies-content,
  .cookie-banner,
  .cookie-settings-link,
  .cookie-consent-indicator {
    background: var(--white);
    border-color: var(--white);
    color: white;
  }

  .modal-cookies-title,
  .cookie-banner-title,
  .consent-status-text {
    color: white;
  }

  .modal-cookies-text,
  .modal-cookies-subtitle,
  .cookie-banner-description,
  .consent-details {
    color: #bdc3c7;
  }

  .modal-cookies-btn-secondary {
    background: #34495e;
    color: #bdc3c7;
    border-color: #4a5f7a;
  }

  .modal-cookies-btn-secondary:hover {
    background: #4a5f7a;
    color: white;
  }
}

.cookie-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.cookie-modal h3 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.cookie-modal p {
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.cookie-modal .btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #4caf50;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.cookie-modal .btn:hover {
  background: #45a049;
}

@media (max-width: 480px) {
  .cookie-modal {
    padding: 1.5rem;
  }

  .cookie-modal h3 {
    font-size: 1.1rem;
  }
}
