/* ------------------------------------------------------------------------------
 *  Sagola — Banner de consentimiento de cookies (RGPD)
 *  Look coherente con la web: fondo oscuro, acento rojo Sagola (#b81616).
 * ---------------------------------------------------------------------------- */

#sgl-cookie-banner,
#sgl-cookie-prefs {
    display: none;
    box-sizing: border-box;
    font-family: 'Lato', 'Raleway', Arial, sans-serif;
}

#sgl-cookie-banner *,
#sgl-cookie-prefs * {
    box-sizing: border-box;
}

#sgl-cookie-banner.is-visible {
    display: block;
}

/* --- Barra inferior --------------------------------------------------------- */
#sgl-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99990;
    background: #1b1b1b;
    color: #e8e8e8;
    border-top: 3px solid #b81616;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
    padding: 18px 22px;
}

.sgl-cc-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.sgl-cc-text {
    flex: 1 1 420px;
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
}

.sgl-cc-text h4 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
}

.sgl-cc-text a {
    color: #ff6b6b;
    text-decoration: underline;
}

.sgl-cc-actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* --- Botones ---------------------------------------------------------------- */
.sgl-cc-btn {
    display: inline-block;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.sgl-cc-btn-primary {
    background: #b81616;
    color: #fff;
    border-color: #b81616;
}

.sgl-cc-btn-primary:hover {
    background: #d81b1b;
    border-color: #d81b1b;
}

.sgl-cc-btn-secondary {
    background: transparent;
    color: #e8e8e8;
    border-color: #555;
}

.sgl-cc-btn-secondary:hover {
    background: #2a2a2a;
    border-color: #888;
    color: #fff;
}

.sgl-cc-btn-link {
    background: transparent;
    color: #cfcfcf;
    border-color: transparent;
    text-decoration: underline;
    padding-left: 8px;
    padding-right: 8px;
}

.sgl-cc-btn-link:hover {
    color: #fff;
}

/* --- Panel de preferencias (modal) ------------------------------------------ */
#sgl-cookie-prefs {
    position: fixed;
    inset: 0;
    z-index: 99991;
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    overflow-y: auto;
}

#sgl-cookie-prefs.is-visible {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.sgl-cc-panel {
    background: #1b1b1b;
    color: #e8e8e8;
    width: 100%;
    max-width: 620px;
    margin: 40px auto;
    border-radius: 5px;
    border-top: 3px solid #b81616;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.sgl-cc-panel-head {
    padding: 20px 24px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sgl-cc-panel-head h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.sgl-cc-panel-close {
    cursor: pointer;
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    line-height: 1;
    padding: 0 4px;
}

.sgl-cc-panel-close:hover {
    color: #fff;
}

.sgl-cc-panel-body {
    padding: 8px 24px 20px;
    max-height: 55vh;
    overflow-y: auto;
}

.sgl-cc-cat {
    padding: 16px 0;
    border-bottom: 1px solid #2c2c2c;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.sgl-cc-cat:last-child {
    border-bottom: none;
}

.sgl-cc-cat-info h5 {
    margin: 0 0 4px;
    font-size: 14px;
    color: #fff;
    font-weight: 600;
}

.sgl-cc-cat-info p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #b8b8b8;
}

/* --- Toggle switch ---------------------------------------------------------- */
.sgl-cc-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex: 0 0 auto;
    margin-top: 2px;
}

.sgl-cc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sgl-cc-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #555;
    border-radius: 24px;
    transition: background 0.2s ease;
}

.sgl-cc-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.sgl-cc-switch input:checked + .sgl-cc-slider {
    background: #b81616;
}

.sgl-cc-switch input:checked + .sgl-cc-slider:before {
    transform: translateX(22px);
}

.sgl-cc-switch input:disabled + .sgl-cc-slider {
    background: #3a6b3a;
    cursor: not-allowed;
    opacity: 0.85;
}

.sgl-cc-panel-foot {
    padding: 16px 24px;
    border-top: 1px solid #333;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

/* --- Responsive ------------------------------------------------------------- */
@media (max-width: 768px) {
    .sgl-cc-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .sgl-cc-actions {
        justify-content: center;
    }
    .sgl-cc-btn {
        flex: 1 1 auto;
    }
    .sgl-cc-panel-foot {
        justify-content: stretch;
    }
    .sgl-cc-panel-foot .sgl-cc-btn {
        flex: 1 1 auto;
    }
}
