/* RESET */
.cookie-banner, .cookie-modal {
    font-family: "Basis Grotesque Pro", sans-serif;
}

/* BUTTONS */
.btn {
    padding: 10px 16px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #1E5D61;
    width: 100%;
    max-width: 250px;
    font-size: 14px;
}

.btn-primary {
    background: #1E5D61;
    color: #fff;
}

.btn-outline {
    background: #fff;
    color: #1E5D61;
}

/* BANNER */
.cookie-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

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

.cookie-text h3{
    font-size: 18px;
    color: #1E5D61;
}

a.link-simple-cookie{
    color: #009490;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none!important;
}

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 300px;
    justify-content: center;
    align-items: flex-end;
}

/* MODAL */
.cookie-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 10000;
    overflow-y: scroll;
}

.cookie-modal-box {
    background: #fff;
    max-width: 700px;
    margin: 5vh auto;
    padding: 45px 25px 30px 25px;
    border-radius: 8px;
    position: relative;
}

.cookie-modal-box h3 {
    font-size: 18px;
    color: #1E5D61;
}

.cookie-modal-close {
    position: absolute;
    left: 5px;
    top: 15px;
    border: none;
    background: none;
    font-size: 13px;
    cursor: pointer;
    color: #009490;
    font-weight: bold;
}

.cookie-modal-close img{
    margin-right: 4px;
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 1rem;
}

/* Ocultamos el checkbox nativo */
.cookie-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Label contenedor */
.cookie-option label {
    position: relative;
    padding-left: 44px;
    cursor: default;
    line-height: 1.4;
}

/* Caja base (estado desactivado / no marcado) */
.cookie-option label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 28px;
    height: 28px;
    background-color: transparent;
    border: 1px solid #009490;
    border-radius: 3px;
    box-sizing: border-box;
}

/* Check (oculto por defecto) */
.cookie-option label::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 9px;
    width: 14px;
    height: 8px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    opacity: 0;
}

/* Estado marcado */
.cookie-option input[type="checkbox"]:checked + label::before {
    background-color: #009490;
    border-color: #009490;
}

/* Mostrar check solo cuando está marcado */
.cookie-option input[type="checkbox"]:checked + label::after {
    opacity: 1;
}

/* Estado disabled */
.cookie-option input[type="checkbox"]:disabled + label {
    opacity: 0.9;
}

/* Texto */
.cookie-option label strong {
    display: block;
    margin-bottom: 6px;
    color: #1E5D61;
}

.cookie-option label span {
    font-size: 14px;
    color: #666666;
}

.cookie-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 2rem;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
}

/* Tabla */
.cookies-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
}

.cookies-table th,
.cookies-table td {
    border: 1px solid #1c1c1c;
    padding: 10px;
    vertical-align: middle;
    font-size: 13px;
}

.cookies-table td ul{
    margin: 0px auto;
    padding: 0;
}

.cookies-table td ul li{
    font-size: 13px;
    margin: 5px 0;
    text-align: left;
}

/* Cabecera */
.cookies-table thead th {
    background-color: #117c78;
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
}

/* Columna titular */
.titular-tabla {
    font-weight: bold;
    font-style: italic;
    text-align: center;
    font-size: 15px;
    width: 15%;
}

/* Columna duración */
.duracion {
    font-style: italic;
    font-size: 20px;
    text-align: center;
    width: 30%;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .cookie-text {
        flex: 1 1 200px;
    }

    .cookie-footer {
        flex-direction: column;
        align-items: center;
    }

    .cookie-modal-box {
        max-width: 100%;
        overflow-y: scroll;
        width: 100%;
        height: 90vh;
    }

    .cookies-table thead {
        display: none;
    }

    .cookies-table,
    .cookies-table tbody,
    .cookies-table tr,
    .cookies-table td {
        display: block;
        width: 100%;
    }

    .cookies-table tr {
        margin-bottom: 20px;
        border: 2px solid #117c78;
        background-color: #ffffff;
    }

    .cookies-table td {
        border: none;
        border-bottom: 1px solid #ddd;
        text-align: left;
        padding: 15px;
        font-size: 16px;
    }

    .cookies-table td:last-child {
        border-bottom: none;
    }

    .cookies-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 8px;
        color: #117c78;
    }

    .titular-tabla,
    .duracion {
        text-align: left;
        font-style: normal;
    }
}
