/* ==========================================================================
   CurrículoClick - Design System Oficial de Modals, Popups e Toasts
   Totalmente Responsivo (Desktop, Tablet e Mobile) com Glassmorphism Moderno
   ========================================================================== */

/* Overlay Base */
.cc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cc-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Card do Modal */
.cc-modal-card {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    padding: 1.75rem;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.cc-modal-overlay.active .cc-modal-card {
    transform: translateY(0) scale(1);
}

/* Header */
.cc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.cc-modal-header-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.cc-modal-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.cc-modal-icon.blue {
    background: #eff6ff;
    color: #2563eb;
}

.cc-modal-icon.red {
    background: #fef2f2;
    color: #ef4444;
}

.cc-modal-icon.green {
    background: #f0fdf4;
    color: #16a34a;
}

.cc-modal-icon.amber {
    background: #fffbeb;
    color: #d97706;
}

.cc-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.cc-modal-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.2rem 0 0 0;
}

.cc-modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cc-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Corpo do Modal */
.cc-modal-body {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.cc-modal-input-group {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cc-modal-input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.cc-modal-input {
    width: 100%;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.cc-modal-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.15);
}

.cc-modal-helper {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.35rem;
    display: block;
}

/* Footer / Botões */
.cc-modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1.25rem;
}

.cc-modal-btn {
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.cc-modal-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.cc-modal-btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.cc-modal-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.cc-modal-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.cc-modal-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.cc-modal-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

/* Toasts Flutuantes Globais */
.cc-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.cc-toast {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(226, 232, 240, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
    pointer-events: auto;
    animation: ccToastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-width: 380px;
}

.cc-toast.success .cc-toast-icon { color: #16a34a; }
.cc-toast.error .cc-toast-icon { color: #ef4444; }
.cc-toast.warning .cc-toast-icon { color: #d97706; }
.cc-toast.info .cc-toast-icon { color: #2563eb; }

@keyframes ccToastSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsividade Mobile (Menor que 600px) */
@media (max-width: 600px) {
    .cc-modal-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .cc-modal-footer {
        flex-direction: column-reverse;
        width: 100%;
        gap: 0.5rem;
    }
    
    .cc-modal-btn {
        width: 100%;
        padding: 0.85rem;
    }

    .cc-toast-container {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
    }
    
    .cc-toast {
        max-width: 100%;
    }
}
