/**
 * Cookie Consent Banner Styles
 * Integrado con la paleta de colores de Inovatry Solutions
 */

/*--------------------------------------------------------------
# Cookie Consent Banner
--------------------------------------------------------------*/
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #1a2838 0%, #243447 100%);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  padding: 0;
  transition: all 0.3s ease-in-out;
  transform: translateY(0);
  opacity: 1;
  border-top: 3px solid #2F8CFF;
}

.cookie-consent-banner.hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.cookie-consent-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.cookie-consent-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.cookie-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(47, 140, 255, 0.15);
  border-radius: 50%;
  color: #2F8CFF;
  font-size: 24px;
}

.cookie-text {
  flex: 1;
  color: #e8edf3;
}

.cookie-text h3 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
  font-family: var(--heading-font);
}

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

.cookie-link {
  color: #2F8CFF;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s;
}

.cookie-link:hover {
  color: #5eb8ff;
}

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

.cookie-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--nav-font);
  white-space: nowrap;
}

.cookie-btn-accept {
  background: #2F8CFF;
  color: #ffffff;
}

.cookie-btn-accept:hover {
  background: #1e7ae6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 140, 255, 0.3);
}

.cookie-btn-reject {
  background: transparent;
  color: #a8b4c4;
  border: 1px solid rgba(168, 180, 196, 0.3);
}

.cookie-btn-reject:hover {
  background: rgba(168, 180, 196, 0.1);
  color: #e8edf3;
  border-color: rgba(168, 180, 196, 0.5);
}

.cookie-btn-settings {
  background: transparent;
  color: #2F8CFF;
  border: 1px solid #2F8CFF;
}

.cookie-btn-settings:hover {
  background: rgba(47, 140, 255, 0.1);
  transform: translateY(-2px);
}

.cookie-btn-save {
  background: #2F8CFF;
  color: #ffffff;
  padding: 12px 32px;
}

.cookie-btn-save:hover {
  background: #1e7ae6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 140, 255, 0.3);
}

/* Settings Panel */
.cookie-settings-panel {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(168, 180, 196, 0.15);
  animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

.cookie-settings-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cookie-setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  transition: background 0.3s;
}

.cookie-setting-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.cookie-setting-info {
  flex: 1;
}

.cookie-setting-info strong {
  color: #e8edf3;
  font-size: 15px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.cookie-setting-info p {
  color: #a8b4c4;
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

.cookie-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-toggle input[type="checkbox"] {
  width: 44px;
  height: 24px;
  appearance: none;
  background: rgba(168, 180, 196, 0.2);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  border: none;
  outline: none;
}

.cookie-toggle input[type="checkbox"]:checked {
  background: #2F8CFF;
}

.cookie-toggle input[type="checkbox"]:checked::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  top: 3px;
  left: 23px;
  transition: left 0.3s;
}

.cookie-toggle input[type="checkbox"]:not(:checked)::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  top: 3px;
  left: 3px;
  transition: left 0.3s;
}

.cookie-toggle.disabled input[type="checkbox"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-toggle label {
  color: #a8b4c4;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

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

.cookie-settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(168, 180, 196, 0.15);
}

/*--------------------------------------------------------------
# Responsive Design
--------------------------------------------------------------*/
@media (max-width: 768px) {
  .cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    overflow-y: auto;
  }

  .cookie-consent-container {
    padding: 20px 16px;
  }

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

  .cookie-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .cookie-text h3 {
    font-size: 18px;
  }

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

  .cookie-consent-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .cookie-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
  }

  .cookie-setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
  }

  .cookie-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .cookie-settings-actions {
    justify-content: stretch;
  }

  .cookie-btn-save {
    width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .cookie-consent-container {
    padding: 20px;
  }

  .cookie-consent-content {
    gap: 16px;
  }

  .cookie-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .cookie-text h3 {
    font-size: 18px;
  }

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

/*--------------------------------------------------------------
# Accessibility
--------------------------------------------------------------*/
.cookie-consent-banner:focus {
  outline: 2px solid #2F8CFF;
  outline-offset: 2px;
}

.cookie-btn:focus {
  outline: 2px solid #5eb8ff;
  outline-offset: 2px;
}

.cookie-toggle input[type="checkbox"]:focus {
  outline: 2px solid #5eb8ff;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .cookie-consent-banner {
    border-top: 4px solid #2F8CFF;
  }

  .cookie-btn {
    border: 2px solid currentColor;
  }

  .cookie-link {
    text-decoration: underline;
    font-weight: 600;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent-banner,
  .cookie-btn,
  .cookie-toggle input[type="checkbox"] {
    transition: none;
  }

  .cookie-settings-panel {
    animation: none;
  }
}

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