html.cv-download-is-open {
    overflow: hidden;
}

.cv-download-dialog {
    position: fixed;
    inset: 0;
    width: min(480px, calc(100% - 2rem));
    max-height: calc(100% - 2rem);
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: clamp(1.5rem, 5vw, 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-xl);
    font: inherit;
}

.cv-download-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.cv-download-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.cv-download-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.cv-download-name {
    margin: 0 2rem 0.5rem 0;
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 600;
}

.cv-download-dialog h2 {
    margin: 0 1rem 0.5rem 0;
    color: var(--text-primary);
    font-size: clamp(1.45rem, 5vw, 1.75rem);
    line-height: 1.25;
}

.cv-download-description {
    margin: 0;
    color: var(--text-secondary);
}

.cv-download-options {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.cv-download-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 76px;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--bg-secondary);
    color: var(--primary-dark);
    text-align: left;
    transition: var(--transition);
}

.cv-download-option:hover {
    border-color: var(--primary-color);
    background: var(--surface-hover);
}

.cv-download-option-copy {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.cv-download-language {
    font-size: 1.1rem;
    font-weight: 650;
}

.cv-download-format {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.cv-download-option svg {
    flex-shrink: 0;
}

.cv-download-option:focus-visible,
.cv-download-close:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .cv-download-option,
    .cv-download-close {
        transition: none;
    }
}
