/* Banner de Cookies - Estilo Moderno */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #315886 0%, #4a7ba7 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    font-family: 'Poppins', sans-serif;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-content {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.cookie-banner-text {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 0;
    opacity: 0.95;
}

.cookie-banner-text a {
    color: #ffd700;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cookie-banner-text a:hover {
    color: #ffed4e;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.cookie-btn-accept {
    background: #28a745;
    color: white;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.cookie-btn-accept:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.cookie-btn-decline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.cookie-btn-decline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

.cookie-btn-settings {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-settings:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Modal de Configurações de Cookies */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.cookie-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #315886;
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    line-height: 1;
}

.cookie-modal-close:hover {
    color: #315886;
}

.cookie-category {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #f9f9f9;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #315886;
    margin: 0;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #28a745;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(26px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: #315886;
    cursor: not-allowed;
}

.cookie-category-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.cookie-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

/* Responsividade */
@media (max-width: 768px) {
    .cookie-banner-container {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-banner-actions {
        justify-content: center;
        width: 100%;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: auto;
    }
    
    .cookie-modal-content {
        margin: 10px;
        padding: 20px;
    }
    
    .cookie-modal-actions {
        flex-direction: column;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 15px;
    }
    
    .cookie-banner-title {
        font-size: 16px;
    }
    
    .cookie-banner-text {
        font-size: 13px;
    }
    
    .cookie-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

.cookie-settings-float {
    position: fixed;
    bottom: 20px;
    left: 20px; /* Alinha à esquerda */
    width: 50px;
    height: 50px;
    background: #315886;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(49, 88, 134, 0.3);
    z-index: 9998;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
}

.cookie-settings-float.show {
    display: flex;
}

.cookie-settings-float:hover {
    background: #254a73;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(49, 88, 134, 0.4);
}

.cookie-settings-float:active {
    transform: scale(0.95);
}

/* Tooltip para o botão flutuante */
.cookie-settings-float::before {
    content: 'Configurações de Cookies';
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.cookie-settings-float:hover::before {
    opacity: 1;
}

/* Melhorias de Acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cookie-banner:focus-within,
.cookie-modal:focus-within {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

.cookie-btn:focus,
.cookie-toggle input:focus + .cookie-toggle-slider,
.cookie-settings-float:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Indicador de foco para navegação por teclado */
.cookie-btn:focus-visible,
.cookie-settings-float:focus-visible {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

/* Animações */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cookie-banner.show {
    animation: slideUp 0.3s ease-out;
}

.cookie-modal.show {
    animation: fadeIn 0.3s ease-out;
}

.cookie-settings-float.show {
    animation: bounceIn 0.5s ease-out;
}
