/**
 * Cookie Consent Banner Styles - LGPD/GDPR Compliant
 * MenuMicro Portal
 */

/* Banner Principal */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid var(--primary, #fbbf24);
}

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

.cookie-consent-banner.hide {
    transform: translateY(100%);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-consent-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.cookie-icon {
    font-size: 2.5rem;
    color: var(--primary, #fbbf24);
    min-width: 60px;
}

.cookie-message h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary, #fbbf24);
}

.cookie-message p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.cookie-message a {
    color: var(--primary, #fbbf24);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.cookie-message a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.cookie-consent-actions button {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 42px;
}

.btn-accept-all {
    background: var(--primary, #fbbf24);
    color: #1e293b;
}

.btn-accept-all:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.btn-manage {
    background: transparent;
    color: #e2e8f0;
    border: 2px solid #475569;
}

.btn-manage:hover {
    background: #475569;
    border-color: #64748b;
    transform: translateY(-2px);
}

.btn-reject {
    background: transparent;
    color: #ef4444;
    border: 2px solid #ef4444;
}

.btn-reject:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Modal de Configurações */
.cookie-consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-consent-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-consent-modal.hide {
    opacity: 0;
    visibility: hidden;
}

.cookie-consent-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-consent-modal.show .cookie-consent-modal-content {
    transform: scale(1);
}

.cookie-consent-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-consent-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cookie-consent-body {
    padding: 1.5rem;
    max-height: 50vh;
    overflow-y: auto;
}

.cookie-category {
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.cookie-category-header {
    background: #f8fafc;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

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

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

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked + .toggle-slider {
    background-color: var(--primary, #fbbf24);
}

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

input:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.category-info {
    flex: 1;
}

.category-info h4 {
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.category-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
}

.cookie-details {
    padding: 0.8rem 1rem;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}

.cookie-details small {
    color: #64748b;
    font-size: 0.8rem;
}

.cookie-consent-footer {
    background: #f8fafc;
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.policy-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.policy-links a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.3s ease;
}

.policy-links a:hover {
    color: var(--primary, #fbbf24);
}

.modal-actions {
    display: flex;
    gap: 0.8rem;
}

.btn-save {
    background: var(--primary, #fbbf24);
    color: #1e293b;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

/* Responsividade */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cookie-consent-text {
        text-align: center;
    }
    
    .cookie-consent-actions {
        justify-content: center;
        width: 100%;
    }
    
    .cookie-consent-actions button {
        flex: 1;
        min-width: 100px;
    }
    
    .cookie-consent-modal {
        padding: 0.5rem;
    }
    
    .cookie-consent-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .policy-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 1rem;
    }
    
    .cookie-icon {
        font-size: 2rem;
        min-width: 50px;
    }
    
    .cookie-message h4 {
        font-size: 1rem;
    }
    
    .cookie-message p {
        font-size: 0.9rem;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
    }
    
    .cookie-consent-actions button {
        width: 100%;
    }
}

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

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

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

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