/* ============================================
   Consent Banner CSS — MOD 2
   ============================================ */

#horaria-consent-banner {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

#horaria-consent-banner[style*="display: block"] {
    transform: translateY(0);
}

.consent-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.consent-content {
    flex: 1;
    min-width: 280px;
}

.consent-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

.consent-text p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

.consent-text a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.consent-text a:hover {
    text-decoration: underline;
}

.consent-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.consent-btn {
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.consent-btn-accept {
    background-color: #2563eb;
    color: white;
}

.consent-btn-accept:hover {
    background-color: #1d4ed8;
}

.consent-btn-reject {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.consent-btn-reject:hover {
    background-color: #e5e7eb;
}

.consent-btn-customize {
    background-color: white;
    color: #2563eb;
    border: 1px solid #2563eb;
}

.consent-btn-customize:hover {
    background-color: #eff6ff;
}

/* Modal de Personalização */

#horaria-consent-customize-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#horaria-consent-customize-modal[style*="flex"] {
    display: flex;
    visibility: visible;
    opacity: 1;
}

.consent-modal-content {
    background: white;
    border-radius: 0.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.consent-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.consent-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
}

.consent-modal-close:hover {
    color: #374151;
}

.consent-modal-body {
    padding: 1.5rem;
}

.consent-category {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.consent-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.consent-category input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
}

.consent-category-info {
    flex: 1;
}

.consent-category-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.consent-category-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.category-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

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

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

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

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

input:checked + .toggle-slider {
    background-color: #2563eb;
}

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

.category-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.consent-modal-actions {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.consent-btn {
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    .consent-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .consent-actions {
        justify-content: flex-start;
        width: 100%;
    }
    .consent-btn {
        flex: 1;
        min-width: 120px;
    }
}
