/* ============================================================
   CV Generator Window Styles
   ============================================================ */

.cv-generator-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* --- Toolbar --- */
.cv-generator-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--glass-border-light, rgba(255,255,255,0.1));
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cv-generator-toolbar select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border-light, rgba(255,255,255,0.15));
    color: rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

.cv-generator-toolbar .btn-generate {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.cv-generator-toolbar .btn-generate:hover {
    opacity: 0.9;
}

.cv-generator-toolbar .btn-generate:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cv-generator-toolbar .btn-action {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--glass-border-light, rgba(255,255,255,0.15));
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s;
}

.cv-generator-toolbar .btn-action:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* --- Scroll Container --- */
.cv-generator-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* --- Empty / Loading State --- */
.cv-generator-empty,
.cv-generator-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 250px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    text-align: center;
    gap: 12px;
}

.cv-generator-loading .cv-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: cvSpin 0.8s linear infinite;
}

@keyframes cvSpin {
    to { transform: rotate(360deg); }
}

/* --- CV Document Styles --- */
.cv-document {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 32px 36px;
    max-width: 820px;
    margin: 0 auto;
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
}

.cv-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(124, 58, 237, 0.5);
}

.cv-name {
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.cv-contact-line {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 4px;
}

.cv-contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cv-section {
    margin-bottom: 24px;
}

.cv-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #a78bfa;
    margin-bottom: 12px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(167, 139, 250, 0.25);
}

/* Summary */
.cv-summary-text {
    color: rgba(255, 255, 255, 0.75);
    font-style: italic;
}

/* Experience / Education */
.cv-entry {
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.cv-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px;
}

.cv-entry-title {
    font-weight: 600;
    color: #fff;
    font-size: 0.88rem;
}

.cv-entry-period {
    font-size: 0.77rem;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.cv-entry-subtitle {
    font-size: 0.82rem;
    color: #a78bfa;
    margin: 2px 0;
}

.cv-entry-description {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 4px;
}

.cv-entry-highlights {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
}

.cv-entry-highlights li::before {
    content: '▸ ';
    color: #a78bfa;
}

/* Skills */
.cv-skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cv-skills-category-label {
    font-size: 0.77rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 6px;
    font-weight: 600;
}

.cv-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cv-tag {
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.35);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.78rem;
}

/* Languages */
.cv-languages-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cv-language-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 8px 16px;
    min-width: 70px;
}

.cv-language-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.cv-language-level {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
}

/* ============================================================
   Print Stylesheet
   ============================================================ */
@media print {
    body > *:not(#cv-generator-window) { display: none !important; }
    #cv-generator-window { position: static !important; width: 100% !important; height: auto !important; box-shadow: none !important; }
    .cv-generator-toolbar,
    .unified-header ,
    .unified-header-controls { display: none !important; }
    .cv-generator-scroll { overflow: visible !important; padding: 0 !important; }
    .cv-document {
        background: #fff !important;
        border: none !important;
        color: #111 !important;
        padding: 16px !important;
        max-width: 100% !important;
    }
    .cv-name { color: #000 !important; }
    .cv-section-title { color: #5b21b6 !important; }
    .cv-entry-subtitle { color: #5b21b6 !important; }
    .cv-tag { background: #ede9fe !important; border-color: #c4b5fd !important; color: #3b0764 !important; }
    .cv-contact-line { color: #444 !important; }
    .cv-summary-text, .cv-entry-description { color: #333 !important; }
    .cv-entry-period { color: #666 !important; }
    .cv-skills-category-label { color: #555 !important; }
}
