/* Estilos do banner de cookies */
#cookie-banner {
    display: none; /* Inicialmente oculto */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2d3748;
    color: white;
    padding: 15px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

#cookie-banner > div {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

#cookie-banner h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

#cookie-banner p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

#cookie-banner button {
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px; /* Ajuste para responsividade */
}

#cookie-banner #cookie-settings-btn {
    background: transparent;
    text-decoration: underline;
    color: white;
    border: none;
}

#save-cookie-settings {
    border: none;
    padding: 2px 5px;
    border-radius: 5px;
    cursor: pointer;
}
#close-settings-modal {
    border: 1px solid black;
    padding: 2px 5px;
    border-radius: 5px;
    cursor: pointer;
    
}

#cookie-banner #decline-all-cookies-btn {
    background: black;
    color: white;
    border: none;
}

#cookie-banner #accept-all-cookies-btn {
    background: #f1f1f1;
    color: black;
    border: none;
}

/* Estilos do botão flutuante de cookie */
#cookie-float-btn {
    display: none; /* Inicialmente oculto */
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
}

#cookie-float-btn button {
    background: #2d3748;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

#cookie-float-btn button i {
    font-size: 20px;
}

/* Estilos do modal de configurações */
#cookie-settings-modal {
    display: none; /* Inicialmente oculto */
    position: fixed; /* Mantenha-o fixo na tela */
    bottom: 100px;    /* Afasta 80px do fundo (para ficar acima do botão flutuante que tem uns 50px de altura + 20px de margem) */
    right: 20px;     /* Alinha com o lado direito, igual ao botão flutuante */
    /* Remove 'top: 50%', 'left: 50%', e 'transform: translate(-50%, -50%)' */
    background: white;
    z-index: 10000;
    width: 90%;
    max-width: 400px; /* Reduzimos a largura máxima para ele não ser muito grande */
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    box-sizing: border-box;
    /* Adicione uma transição suave para a aparição/desaparição, se desejar */
    transition: all 0.3s ease-in-out;
}

/* Opcional: Se quiser que o modal apareça animado */
#cookie-settings-modal.show-modal { /* Adicionar esta classe via JS ao exibir */
    opacity: 1;
    transform: translateY(0);
}
#cookie-settings-modal.hide-modal { /* Adicionar esta classe via JS ao esconder */
    opacity: 0;
    transform: translateY(20px);
}

/* Ajustes para telas menores (opcional, mas recomendado) */
@media (max-width: 768px) {
    #cookie-settings-modal {
        bottom: 20px; /* Pode deixar mais próximo do fundo em telas pequenas */
        right: 20px;
        left: 20px; /* Ocupa a largura total da tela, com margens */
        width: auto; /* Deixa a largura automática para respeitar left/right */
        max-width: none; /* Remove a largura máxima */
    }
}


#cookie-settings-modal h2 {
    margin-top: 0;
    margin-bottom: 15px;
}

#cookie-settings-modal p {
    margin-bottom: 20px;
}

#cookie-settings-modal .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

#cookie-settings-modal .row:last-of-type {
    border-bottom: none;
}

#cookie-settings-modal label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 10px;
}

#cookie-settings-modal label input {
    opacity: 0;
    width: 0;
    height: 0;
}

#cookie-settings-modal label span {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

#cookie-settings-modal label input:checked + span {
    background-color: #4CAF50;
}

#cookie-settings-modal label span::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

#necessary-cookie-toggler ~ span {
    cursor: not-allowed !important;
}

#necessary-cookie-toggler ~ span::before {
    background-image: url("/ecampus/images/lock.svg") !important;
    background-size: 12px 12px;
    background-repeat: no-repeat;
    background-position: center;
}

#cookie-settings-modal label input:checked + span::before {
    transform: translateX(26px);
}

#cookie-settings-modal .button-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

#cookie-settings-modal .button-group button {
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

#cookie-settings-modal #save-cookie-settings {
    background: #4CAF50;
    color: white;
}

#cookie-settings-modal #close-settings-modal {
    background: #f1f1f1;
    color: #333;
}