/* CV Modal Styles */

.cv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cv-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cv-modal {
    background: var(--bg-card);
    width: 95%;
    max-width: 400px;
    max-height: 90vh;
    max-height: 90dvh;
    border-radius: 20px;
    position: relative;
    padding: 1rem 1.25rem;
    padding-top: 2.5rem;
    padding-bottom: 1rem;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cv-modal-overlay.active .cv-modal {
    transform: translateY(0);
}

.cv-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

[dir="rtl"] .cv-modal-close {
    right: auto;
    left: 1rem;
}

.cv-modal-close:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.cv-modal-close svg {
    width: 20px;
    height: 20px;
}

.cv-title {
    text-align: center;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cv-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    min-height: 0;
}

.cv-body::-webkit-scrollbar {
    width: 4px;
}

.cv-body::-webkit-scrollbar-track {
    background: transparent;
}

.cv-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.cv-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.cv-profile-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.cv-profile-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    padding: 4px;
    background: var(--accent-gradient);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cv-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.cv-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.85rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.cv-download-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 340px;
    margin: 0 auto;
    padding-bottom: 1rem;
}

.cv-download-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    position: relative;
    overflow: hidden;
    gap: 1rem;
}

.cv-download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cv-download-btn:hover::before {
    transform: translateX(100%);
}

.cv-download-btn:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

[dir="rtl"] .cv-download-btn:hover {
    transform: translateX(-5px);
}

/* File Type Specific Colors */
.cv-download-btn.pdf .btn-icon {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

.cv-download-btn.docx .btn-icon,
.cv-download-btn.doc .btn-icon {
    color: #4dadff;
    background: rgba(77, 173, 255, 0.1);
}

.cv-download-btn.txt .btn-icon {
    color: #a3a3a3;
    background: rgba(163, 163, 163, 0.1);
}

.cv-download-btn .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    transition: all 0.3s;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.cv-download-btn:hover .btn-icon {
    transform: scale(1.1);
    box-shadow: 0 0 15px currentColor;
}

.cv-download-btn .btn-text {
    flex-grow: 1;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
}

[dir="rtl"] .cv-download-btn .btn-text {
    text-align: right;
}

.cv-download-btn .btn-format {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .cv-modal {
        padding: 2rem 1rem;
    }

    .cv-profile-image {
        width: 100px;
        height: 100px;
    }

    .cv-title {
        font-size: 1.1rem;
    }
}