/**
 * Estilos do Sistema de Cookies - GetJob Portal
 * GDPR e LGPD Compliant
 */

/* ============================================
   Banner de Cookies
   ============================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-top: 3px solid var(--brand, #7a1393);
    box-shadow: 0 -8px 32px rgba(36, 12, 46, 0.12);
    padding: clamp(20px, 4vw, 32px);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s ease;
}

.cookie-banner-show {
    transform: translateY(0);
    opacity: 1;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: clamp(16px, 3vw, 24px);
    align-items: center;
}

.cookie-banner-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--brand, #7a1393) 0%, #9c27b0 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(122, 19, 147, 0.25);
    animation: cookie-icon-bounce 2s ease-in-out infinite;
}

@keyframes cookie-icon-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-4px) scale(1.05);
    }
}

.cookie-banner-text {
    min-width: 0;
}

.cookie-banner-title {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 700;
    color: var(--ink, #240c2e);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.cookie-banner-description {
    font-size: clamp(0.88rem, 2vw, 0.95rem);
    line-height: 1.6;
    color: #3a2a4d;
    margin: 0 0 12px 0;
}

.cookie-banner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    font-size: 0.85rem;
}

.cookie-banner-link {
    color: var(--brand, #7a1393);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-banner-link:hover {
    color: #9c27b0;
    text-decoration: none;
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* ============================================
   Botões de Cookie
   ============================================ */

.cookie-btn {
    padding: clamp(10px, 2vw, 14px) clamp(18px, 3vw, 24px);
    border-radius: 12px;
    font-size: clamp(0.88rem, 2vw, 0.95rem);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cookie-btn:focus-visible {
    outline: 3px solid rgba(122, 19, 147, 0.4);
    outline-offset: 3px;
}

.cookie-btn:active {
    transform: scale(0.98);
}

.cookie-btn-primary {
    background: linear-gradient(135deg, var(--brand, #7a1393) 0%, #9c27b0 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(122, 19, 147, 0.25);
}

.cookie-btn-primary:hover {
    background: linear-gradient(135deg, #9c27b0 0%, var(--brand, #7a1393) 100%);
    box-shadow: 0 6px 20px rgba(122, 19, 147, 0.35);
    transform: translateY(-1px);
}

.cookie-btn-secondary {
    background: #ffffff;
    color: var(--brand, #7a1393);
    border: 2px solid var(--brand, #7a1393);
}

.cookie-btn-secondary:hover {
    background: var(--brand-light, rgba(122, 19, 147, 0.08));
    border-color: #9c27b0;
}

.cookie-btn-tertiary {
    background: transparent;
    color: #5a4a6d;
    border: 2px solid #d1c7dc;
}

.cookie-btn-tertiary:hover {
    background: #f5f3f7;
    border-color: #b8adc7;
    color: var(--ink, #240c2e);
}

/* ============================================
   Modal de Preferências
   ============================================ */

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cookie-modal-show {
    opacity: 1;
    pointer-events: auto;
}

.cookie-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(36, 12, 46, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.cookie-modal-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    width: calc(100% - 32px);
    max-width: 680px;
    max-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(36, 12, 46, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-modal-show .cookie-modal-dialog {
    transform: scale(1);
}

.cookie-modal-header {
    padding: clamp(20px, 4vw, 28px);
    border-bottom: 1px solid #e8e4ed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
}

.cookie-modal-title {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    font-weight: 700;
    color: var(--ink, #240c2e);
    margin: 0;
}

.cookie-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: #5a4a6d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cookie-modal-close:hover {
    background: #f5f3f7;
    color: var(--ink, #240c2e);
    transform: rotate(90deg);
}

.cookie-modal-close:focus-visible {
    outline: 3px solid rgba(122, 19, 147, 0.4);
    outline-offset: 2px;
}

.cookie-modal-body {
    padding: clamp(20px, 4vw, 28px);
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-intro {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #3a2a4d;
    margin: 0 0 24px 0;
}

.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cookie-category {
    background: #f8f9fa;
    border-radius: 16px;
    padding: clamp(16px, 3vw, 20px);
    border: 2px solid #e8e4ed;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    border-color: rgba(122, 19, 147, 0.2);
    background: #ffffff;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.cookie-category-info {
    flex: 1;
    min-width: 0;
}

.cookie-category-title {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 700;
    color: var(--ink, #240c2e);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cookie-category-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(122, 19, 147, 0.12);
    color: var(--brand, #7a1393);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cookie-category-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #5a4a6d;
    margin: 0;
}

/* ============================================
   Toggle Switch
   ============================================ */

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 32px;
    flex-shrink: 0;
    cursor: pointer;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1c7dc;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: linear-gradient(135deg, var(--brand, #7a1393) 0%, #9c27b0 100%);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(24px);
}

.cookie-toggle input:focus-visible + .cookie-toggle-slider {
    outline: 3px solid rgba(122, 19, 147, 0.4);
    outline-offset: 3px;
}

.cookie-toggle-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-toggle-disabled .cookie-toggle-slider {
    background: rgba(122, 19, 147, 0.3);
}

/* ============================================
   Footer do Modal
   ============================================ */

.cookie-modal-footer {
    padding: clamp(20px, 4vw, 28px);
    border-top: 1px solid #e8e4ed;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ============================================
   Botão Flutuante de Configurações
   ============================================ */

.cookie-settings-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand, #7a1393) 0%, #9c27b0 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(122, 19, 147, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0);
    opacity: 0;
}

.cookie-settings-btn-show {
    transform: scale(1);
    opacity: 1;
}

.cookie-settings-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(122, 19, 147, 0.45);
}

.cookie-settings-btn:active {
    transform: scale(0.95);
}

.cookie-settings-btn:focus-visible {
    outline: 3px solid rgba(122, 19, 147, 0.4);
    outline-offset: 4px;
}

/* ============================================
   Toast de Feedback
   ============================================ */

.cookie-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #ffffff;
    color: var(--ink, #240c2e);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(36, 12, 46, 0.2);
    font-size: 0.95rem;
    font-weight: 600;
    z-index: 10001;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--brand, #7a1393);
    max-width: 320px;
}

.cookie-toast-show {
    transform: translateX(0);
    opacity: 1;
}

.cookie-toast-success {
    border-left-color: #42c16e;
    background: linear-gradient(135deg, rgba(66, 193, 110, 0.1) 0%, #ffffff 100%);
}

.cookie-toast-info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, #ffffff 100%);
}

.cookie-toast-error {
    border-left-color: #ec5678;
    background: linear-gradient(135deg, rgba(236, 86, 120, 0.1) 0%, #ffffff 100%);
}

/* ============================================
   Estados do Body
   ============================================ */

body.cookie-banner-visible {
    padding-bottom: 180px;
}

body.cookie-modal-open {
    overflow: hidden;
}

/* ============================================
   Media Queries - Responsividade
   ============================================ */

@media (max-width: 1024px) {
    .cookie-banner-content {
        grid-template-columns: 1fr;
    }

    .cookie-banner-icon {
        display: none;
    }

    .cookie-banner-actions {
        justify-content: flex-start;
    }

    body.cookie-banner-visible {
        padding-bottom: 220px;
    }
}

@media (max-width: 640px) {
    .cookie-banner {
        padding: 20px 16px;
    }

    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-modal-dialog {
        width: calc(100% - 16px);
        max-height: calc(100vh - 32px);
        border-radius: 16px;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }

    .cookie-settings-btn {
        bottom: 16px;
        left: 16px;
        width: 52px;
        height: 52px;
    }

    .cookie-toast {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }

    body.cookie-banner-visible {
        padding-bottom: 280px;
    }

    .cookie-category-header {
        flex-direction: column;
        gap: 12px;
    }

    .cookie-toggle {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .cookie-banner-title {
        font-size: 1.05rem;
    }

    .cookie-banner-description {
        font-size: 0.85rem;
    }

    .cookie-btn {
        font-size: 0.85rem;
        padding: 12px 16px;
    }

    .cookie-modal-header {
        padding: 20px 16px;
    }

    .cookie-modal-body {
        padding: 20px 16px;
    }

    .cookie-modal-footer {
        padding: 20px 16px;
    }
}

/* ============================================
   Modo de Impressão
   ============================================ */

@media print {
    .cookie-banner,
    .cookie-modal,
    .cookie-settings-btn,
    .cookie-toast {
        display: none !important;
    }

    body.cookie-banner-visible {
        padding-bottom: 0;
    }
}

/* ============================================
   Preferência de Movimento Reduzido
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-modal-dialog,
    .cookie-toggle-slider::before,
    .cookie-settings-btn,
    .cookie-toast,
    .cookie-btn,
    .cookie-icon-bounce {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================
   Modo de Alto Contraste
   ============================================ */

@media (prefers-contrast: high) {
    .cookie-banner {
        border-top-width: 4px;
        border-color: #000000;
    }

    .cookie-btn-primary {
        background: #000000;
        color: #ffffff;
    }

    .cookie-btn-secondary {
        border-width: 3px;
        border-color: #000000;
        color: #000000;
    }

    .cookie-toggle input:checked + .cookie-toggle-slider {
        background: #000000;
    }
}
