/* ==========================================================================
   Barra de cookies e painel de definicoes (Google Consent Mode v2)
   Cores alinhadas com o tema: castanho #8a5b47
   ========================================================================== */

#cookiebar {
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: none;
    padding: 20px;
    width: 100%;
    max-width: 520px;
    box-sizing: border-box;
    font-family: inherit;
}

#cookiebar.is-visible {
    display: block;
}

#cookiebar__card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 34px rgba(0, 0, 0, .22);
    padding: 28px 30px 26px 30px;
    max-height: 82vh;
    overflow-y: auto;
    text-align: left;
}

#cookiebar h4 {
    margin: 0 0 12px 0;
    font-size: 20px;
    line-height: 1.3;
    color: #252525;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

#cookiebar p {
    margin: 0 0 16px 0;
    font-size: 13px;
    line-height: 1.65;
    color: #575757;
    text-align: justify;
}

#cookiebar a {
    color: #8a5b47;
    text-decoration: underline;
}

/* --- Botoes --- */

#cookiebar__actions,
#cookiebar__prefs-actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.cookiebar__btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-block;
    border: 1px solid #8a5b47;
    border-radius: 6px;
    padding: 11px 18px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.2;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
}

.cookiebar__btn--primary {
    background: #8a5b47;
    color: #fff;
}

.cookiebar__btn--primary:hover,
.cookiebar__btn--primary:focus {
    background: #744c3b;
    border-color: #744c3b;
    color: #fff;
}

.cookiebar__btn--outline {
    background: transparent;
    color: #8a5b47;
}

.cookiebar__btn--outline:hover,
.cookiebar__btn--outline:focus {
    background: #f3ece8;
}

.cookiebar__btn--minimal {
    background: transparent;
    border-color: transparent;
    color: #6b6b6b;
    text-decoration: underline;
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    padding: 6px 0 0 0;
    text-align: center;
}

.cookiebar__btn--minimal:hover,
.cookiebar__btn--minimal:focus {
    color: #8a5b47;
}

/* --- Painel de definicoes --- */

#cookiebar__prefs {
    display: none;
    margin: 18px 0 4px 0;
    border-top: 1px solid #e6e6e6;
    padding-top: 14px;
}

#cookiebar.is-managing #cookiebar__prefs {
    display: block;
}

#cookiebar.is-managing #cookiebar__actions {
    display: none;
}

.cookiebar__item {
    padding: 12px 0;
    border-bottom: 1px solid #efefef;
}

.cookiebar__item:last-of-type {
    border-bottom: 0;
}

.cookiebar__item-head {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: 12px;
}

.cookiebar__item-title {
    font-size: 14px;
    font-weight: 600;
    color: #252525;
    margin: 0;
}

.cookiebar__item-desc {
    font-size: 12px;
    line-height: 1.6;
    color: #6b6b6b;
    margin: 6px 0 0 0;
    text-align: justify;
}

.cookiebar__always {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #9a9a9a;
    white-space: nowrap;
}

/* --- Interruptor --- */

.cookiebar__switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    -ms-flex: 0 0 44px;
    flex: 0 0 44px;
    cursor: pointer;
}

.cookiebar__switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.cookiebar__switch .cookiebar__slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cfcfcf;
    border-radius: 24px;
    transition: background .25s ease;
}

.cookiebar__switch .cookiebar__slider:before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s ease;
}

.cookiebar__switch input:checked + .cookiebar__slider {
    background: #8a5b47;
}

.cookiebar__switch input:checked + .cookiebar__slider:before {
    -webkit-transform: translateX(20px);
    transform: translateX(20px);
}

.cookiebar__switch input:focus + .cookiebar__slider {
    box-shadow: 0 0 0 3px rgba(138, 91, 71, .25);
}

/* --- Telemovel --- */

@media only screen and (max-width: 600px) {
    #cookiebar {
        padding: 10px;
        max-width: 100%;
    }

    #cookiebar__card {
        padding: 22px 20px 20px 20px;
        max-height: 88vh;
    }

    #cookiebar h4 {
        font-size: 18px;
    }

    .cookiebar__btn {
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
    }
}

/* Os dialogos (Politica de Privacidade, Termos) tem de ficar ACIMA da barra
   de cookies - caso contrario abrem por tras dela. O magnific-popup usa
   1042/1043 por omissao e a barra usa 999999. */
.mfp-bg {
    z-index: 1000000;
}

.mfp-wrap {
    z-index: 1000001;
}
