/* =====================================================
   NicoFM - Cookie Consent
   ===================================================== */

/* Banner: overlay centrado sobre a página */
#nicofm-cookie-banner {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    box-sizing: border-box;
}

.nicofm-cookie-box {
    width: 100%;
    max-width: 660px;
    max-height: 90vh;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    border-radius: 14px;

    box-shadow:
        0 12px 50px rgba(0, 0, 0, 0.35);

    overflow: hidden;
}

/* Cabeçalho (logo + título) */
.nicofm-cookie-header {
    padding: 28px 28px 0;
    text-align: center;
    flex-shrink: 0;
}

.nicofm-cookie-logo {
    display: inline-flex;

    background: #d71920;

    color: #ffffff;

    padding: 6px 14px;

    border-radius: 6px;

    font-size: 16px;
    font-weight: 700;

    margin-bottom: 14px;
}

.nicofm-cookie-box h2 {
    margin: 0 0 0;

    font-size: 22px;
    font-weight: 700;
    text-align: center;

    color: #222222;
}

/* Corpo com scroll */
.nicofm-cookie-body {
    padding: 16px 28px;
    overflow-y: auto;
    flex: 1;
}

.nicofm-cookie-box p {
    margin: 8px 0;

    color: #555555;

    font-size: 14px;

    line-height: 1.6;
}

/* Rodapé: botões */
.nicofm-cookie-footer {
    padding: 16px 28px 24px;
    border-top: 1px solid #eeeeee;
    flex-shrink: 0;
}

.nicofm-cookie-buttons {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    flex-wrap: wrap;
}

.nicofm-cookie-btn {
    border: 0;

    border-radius: 7px;

    padding: 13px 22px;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}

.nicofm-cookie-btn.primary {
    background: #d71920;

    color: #ffffff;
}

.nicofm-cookie-btn.primary:hover {
    background: #b9141a;
}

.nicofm-cookie-btn.secondary {
    background: #eeeeee;

    color: #222222;
}

.nicofm-cookie-btn.secondary:hover {
    background: #dddddd;
}

.nicofm-cookie-policy {
    display: inline-block;

    margin-top: 12px;

    color: #888888;

    font-size: 12px;

    text-decoration: underline;
}


/* =====================================================
   Modal de preferências
   ===================================================== */

.nicofm-settings-overlay {
    position: fixed;

    inset: 0;

    z-index: 1000000;

    background: rgba(0, 0, 0, 0.65);

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    box-sizing: border-box;
}

.nicofm-settings-modal {
    position: relative;

    width: 100%;

    max-width: 620px;

    max-height: 90vh;

    overflow-y: auto;

    background: #ffffff;

    border-radius: 14px;

    padding: 30px;

    box-sizing: border-box;

    box-shadow:
        0 10px 50px rgba(0, 0, 0, 0.35);
}

.nicofm-settings-modal h2 {
    margin-top: 0;

    color: #222222;
}

.nicofm-settings-modal > p {
    color: #555555;

    line-height: 1.5;
}

.nicofm-close {
    position: absolute;

    top: 12px;

    right: 15px;

    width: 35px;

    height: 35px;

    border: 0;

    background: transparent;

    font-size: 28px;

    cursor: pointer;

    color: #555555;
}


/* =====================================================
   Categorias
   ===================================================== */

.nicofm-cookie-category {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 18px 0;

    border-bottom: 1px solid #eeeeee;
}

.nicofm-cookie-category strong {
    color: #222222;
}

.nicofm-cookie-category p {
    margin: 5px 0 0;

    font-size: 13px;
}

.nicofm-always-on {
    white-space: nowrap;

    font-size: 12px;

    color: #777777;
}


/* =====================================================
   Switch
   ===================================================== */

.nicofm-switch {
    position: relative;

    display: inline-block;

    width: 48px;

    height: 26px;

    flex-shrink: 0;
}

.nicofm-switch input {
    opacity: 0;

    width: 0;

    height: 0;
}

.nicofm-switch span {
    position: absolute;

    cursor: pointer;

    inset: 0;

    background: #cccccc;

    border-radius: 30px;

    transition: 0.2s;
}

.nicofm-switch span:before {
    content: "";

    position: absolute;

    width: 20px;

    height: 20px;

    left: 3px;

    top: 3px;

    background: #ffffff;

    border-radius: 50%;

    transition: 0.2s;
}

.nicofm-switch input:checked + span {
    background: #d71920;
}

.nicofm-switch input:checked + span:before {
    transform: translateX(22px);
}


/* =====================================================
   Guardar
   ===================================================== */

.nicofm-save-settings {
    width: 100%;

    margin-top: 25px;

    padding: 14px;

    border: 0;

    border-radius: 7px;

    background: #d71920;

    color: #ffffff;

    font-weight: bold;

    cursor: pointer;
}

.nicofm-save-settings:hover {
    background: #b9141a;
}


/* =====================================================
   Telemóvel
   ===================================================== */

@media (max-width: 600px) {

    #nicofm-cookie-banner {
        padding: 12px;
        align-items: flex-end;
    }

    .nicofm-cookie-box {
        max-height: 85vh;
        border-radius: 14px 14px 10px 10px;
    }

    .nicofm-cookie-header {
        padding: 20px 20px 0;
    }

    .nicofm-cookie-body {
        padding: 12px 20px;
    }

    .nicofm-cookie-footer {
        padding: 12px 20px 20px;
    }

    .nicofm-cookie-box h2 {
        font-size: 19px;
    }

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

    .nicofm-cookie-buttons {
        flex-direction: column;
    }

    .nicofm-cookie-btn {
        width: 100%;
        text-align: center;
    }

    .nicofm-settings-modal {
        padding: 22px;
    }

    .nicofm-cookie-category {
        align-items: flex-start;
    }
}
