/* ===================================
    CV DOWNLOAD MODAL STYLES
=================================== */

/* Modal Overlay */
.cv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.cv-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.cv-modal {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    padding: 40px;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 100px rgba(21, 96, 189, 0.15);
    overflow: hidden;
}

.cv-modal-overlay.active .cv-modal {
    transform: scale(1) translateY(0);
}

/* Modal Decorative Elements */
.cv-modal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(21, 96, 189, 0.08) 0%, transparent 50%);
    animation: modalGlow 4s ease-in-out infinite;
}

@keyframes modalGlow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Close Button */
.cv-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.cv-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.cv-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.6);
    transition: stroke 0.3s ease;
}

.cv-modal-close:hover svg {
    stroke: #ffffff;
}

/* Modal Icon */
.cv-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #1560BD 0%, #1560BD 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(21, 96, 189, 0.4);
    position: relative;
    z-index: 10;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.cv-modal-icon svg {
    width: 40px;
    height: 40px;
    stroke: #ffffff;
    stroke-width: 2;
    fill: none;
}

/* Modal Title */
.cv-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 10;
}

/* Modal Subtitle */
.cv-modal-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.6;
    position: relative;
    z-index: 10;
}

/* CV Preview Card */
.cv-preview-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 28px;
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

.cv-preview-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(21, 96, 189, 0.3);
}

.cv-preview-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cv-preview-icon {
    width: 50px;
    height: 60px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cv-preview-icon svg {
    width: 24px;
    height: 24px;
    stroke: #1560BD;
    fill: none;
}

.cv-preview-info {
    flex: 1;
}

.cv-preview-name {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.cv-preview-meta {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
}

.cv-preview-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Download Button */
.cv-download-btn {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #1560BD 0%, #1560BD 100%);
    border: none;
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.cv-download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cv-download-btn:hover::before {
    left: 100%;
}

.cv-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(21, 96, 189, 0.5);
}

.cv-download-btn:active {
    transform: translateY(0);
}

.cv-download-btn svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    fill: none;
    transition: transform 0.3s ease;
}

.cv-download-btn:hover svg {
    transform: translateY(2px);
}

/* Download Progress */
.cv-download-progress {
    display: none;
    margin-top: 20px;
    position: relative;
    z-index: 10;
}

.cv-download-progress.active {
    display: block;
}

.cv-progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.cv-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.cv-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1560BD, #1560BD);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Success State */
.cv-modal-success {
    display: none;
    text-align: center;
    position: relative;
    z-index: 10;
}

.cv-modal-success.active {
    display: block;
    animation: successFadeIn 0.5s ease;
}

@keyframes successFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.cv-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% { box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 10px 60px rgba(16, 185, 129, 0.6); }
}

.cv-success-icon svg {
    width: 40px;
    height: 40px;
    stroke: #ffffff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cv-success-title {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.cv-success-message {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

.cv-modal-content.hidden {
    display: none;
}

/* Modal Footer */
.cv-modal-footer {
    margin-top: 24px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.cv-modal-footer p {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 540px) {
    .cv-modal {
        padding: 30px 24px;
    }

    .cv-modal-title {
        font-size: 20px;
    }

    .cv-modal-icon {
        width: 70px;
        height: 70px;
    }

    .cv-preview-card {
        padding: 16px;
    }

    .cv-preview-icon {
        width: 44px;
        height: 52px;
    }
}
