/**
 * Cookie Notice Styles - Granular Version
 */

/* Banner at the bottom */
#cookie-notice-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #343a40;
    color: #fff;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

#cookie-notice-banner.visible {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-cookie-accept {
    background-color: #FFA500;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-cookie-accept:hover {
    background-color: #e69500;
}

.footer-link:hover {
    color: #f39c12 !important;
    border-bottom: 1px solid #f39c12;
}

/* Destaque para o link de gestão de cookies */
#reopen-cookie-modal-footer {
    color: #FFA500 !important;
    font-weight: bold;
    border-bottom: 1px dashed #FFA500;
    margin-left: 5px;
}

#reopen-cookie-modal-footer:hover {
    color: #fff !important;
    background-color: #FFA500;
    padding: 2px 5px;
    border-radius: 4px;
    text-decoration: none;
    border-bottom: none;
}

.btn-cookie-info {
    background-color: transparent;
    color: #ccc;
    border: 1px solid #ccc;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cookie-info:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}

/* Modal Styles */
#cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.cookie-modal-content {
    background-color: #fff;
    color: #333;
    width: 100%;
    max-width: 900px;
    max-height: 95vh;
    /* Increased from 90vh */
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: cookieModalFadeIn 0.3s ease;
}

@keyframes cookieModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cookie-modal-header {
    padding: 15px 20px;
    /* Reduced vertical padding */
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    /* Slightly smaller font */
    color: #004a99;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.cookie-modal-close:hover {
    color: #000;
}

.cookie-modal-body {
    padding: 15px 20px;
    /* Reduced vertical padding */
    overflow-y: auto;
}

/* Granular Controls Styling */
.cookie-preferences-container {
    padding: 10px 0;
    /* Reduced from 15px */
}

.preference-group {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px 15px;
    /* Reduced vertical padding from 15px */
    margin-bottom: 10px;
    /* Reduced margin from 15px */
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.preference-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #343a40;
}

.preference-info p {
    margin: 0;
    font-size: 0.9em;
    color: #6c757d;
}

.form-switch {
    display: flex;
    align-items: center;
}

/* Switches (Simple CSS Toggle) */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #FFA500;
}

input:focus+.slider {
    box-shadow: 0 0 1px #FFA500;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

input:disabled+.slider {
    background-color: #adb5bd;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-buttons {
        justify-content: flex-end;
    }
}

/* Table Styles - Added for "Detalhe técnico" */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9rem;
}

.cookie-table th,
.cookie-table td {
    padding: 10px;
    border: 1px solid #dee2e6;
    text-align: left;
}

.cookie-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
}

.cookie-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table-responsive {
    overflow-x: auto;
}