/* Estilos para el componente de consentimiento de cookies */

/* Estilo igual al de oleluz.es */
/* Quitamos el backdrop flotante para cumplir con el requisito */
.cookie-consent-backdrop{
  display: none;
}
.cookie-consent-modal{
  position: fixed;
  bottom: 20px;
  left: 20px;
  max-width: 420px;
  width: 90%;
  background: #fff;
  border-radius: 8px;
  z-index: 9999;
  box-shadow: 0 4px 18px rgba(0,0,0,.3);
}
.cookie-option-header{
  display:flex;justify-content:space-between;align-items:center;
}
.cookie-option-status{font-style:italic;color:#808080;font-size:.9em;}

/* Estilos para los iconos de información y los detalles desplegables */
.cookie-toggle-info {
  cursor: pointer;
  margin-left: 5px;
  color: #0086ff;
  font-size: 0.9em;
  transition: color 0.2s ease;
}

.cookie-toggle-info:hover, .cookie-toggle-info.active {
  color: #005bb2;
}

.cookie-option-details {
  padding: 10px;
  margin-top: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
  font-size: 0.9em;
  line-height: 1.5;
  color: #505050;
  border-left: 3px solid #0086ff;
  transition: all 0.3s ease;
}
.cookie-switch{position:relative;display:inline-block;width:46px;height:24px;}
.cookie-switch input{display:none;}
.cookie-slider{
  position:absolute;cursor:pointer;inset:0;background:#ccc;border-radius:34px;
  transition:.3s;
}
.cookie-slider:before{
  position:absolute;content:"";height:18px;width:18px;left:3px;top:3px;
  background:#fff;border-radius:50%;transition:.3s;
}
.cookie-switch input:checked + .cookie-slider{background:#0086ff;}
.cookie-switch input:checked + .cookie-slider:before{transform:translateX(22px);}
.cookie-settings-button{
  position:fixed;bottom:20px;left:20px;width:48px;height:48px;
  background:#fff;border-radius:50%;box-shadow:0 2px 6px rgba(0,0,0,.3);
  display:flex;justify-content:center;align-items:center;font-size:22px;
  cursor:pointer;z-index:9999;
}

/* Banner pequeño para consentimiento inicial */
.cookie-mini-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 480px;
    background-color: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 9998;
    font-size: 14px;
    line-height: 1.5;
    width: 90%;
}

.cookie-mini-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-mini-banner-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    color: #666;
}

.cookie-mini-banner-title {
    font-weight: 600;
    font-size: 17px;
    margin-bottom: 0;
    color: #202124;
}

.cookie-mini-banner-text {
    margin: 12px 0;
    color: #555;
}

.cookie-mini-banner-actions {
    margin-top: 15px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
}

.cookie-mini-banner-links a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
}

.cookie-mini-banner-links a:hover {
    text-decoration: underline;
}

/* --- Panel de Preferencias Completo --- */
.cookie-consent-banner {
    /* Este es el contenedor del panel completo, que reemplaza al mini-banner */
    width: 100%;
}

.cookie-consent-backdrop {
    /* No queremos backdrop que cubra la pantalla */
    display: none;
}

.cookie-consent-modal {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 480px;
    width: 90%;
    background-color: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    overflow: hidden;
    z-index: 9998;
}

.cookie-consent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.cookie-consent-header .cookie-consent-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.cookie-consent-close {
    border: none;
    background: transparent;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    padding: 0 4px;
    color: #555;
}

.cookie-consent-body {
    padding: 16px;
    overflow-y: auto;
    font-size: 14px;
    color: #555;
}

.cookie-consent-body > p {
    margin-bottom: 16px;
}

.cookie-option {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.cookie-option-header h4 {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.cookie-option-header .cookie-status {
    font-size: 13px;
    color: #777;
    font-style: italic;
}

.cookie-option-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.cookie-consent-footer {
    padding: 16px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.cookie-consent-footer .footer-buttons-left {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.cookie-consent-footer .footer-links-right {
    font-size: 11px;
    display: flex;
    gap: 12px;
}

.cookie-consent-footer .footer-links-right a {
    color: #777;
    text-decoration: none;
}

.cookie-consent-footer .footer-links-right a:hover {
    text-decoration: underline;
}

/* --- Botón flotante de Galleta --- */
.cookie-settings-button {
    width: 50px;
    height: 50px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease-in-out;
}

.cookie-settings-button:hover {
    transform: scale(1.1);
}

.cookie-settings-button div,
.cookie-settings-button::after,
.cookie-settings-button::before {
    display: none;
}

/* --- Elementos Comunes (Botones, Switches) --- */
.cookie-button {
    border: none;
    background-color: #f0f0f0;
    color: #333;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    margin-right: 10px;
    margin-bottom: 5px;
}

.cookie-button:hover {
    background-color: #e0e0e0;
}

.cookie-button-accept {
    background-color: #1a73e8;
    color: #fff;
    border: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cookie-button-accept:hover {
    background-color: #0056b3;
}

.cookie-button-reject,
.cookie-button-preferences,
.cookie-button-save {
    background-color: #f1f3f4;
    color: #333;
    border: none;
}

.cookie-button-reject:hover,
.cookie-button-preferences:hover,
.cookie-button-save:hover {
    background-color: #e2e6ea;
}

/* Switch styles */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Estilos para móviles */
@media (max-width: 576px) {
    .cookie-consent-modal {
        width: 95%;
    }
    
    .cookie-consent-footer {
        flex-wrap: wrap;
    }
    
    .cookie-button {
        flex: 1;
        text-align: center;
        padding: 10px;
    }
    
    .cookie-consent-links {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}
