/* AI Tools Styles */

/* CV Builder */
.cv-builder,
.cover-letter-builder {
    max-width: 900px;
    margin: 0 auto;
}

/* Template Selection */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

/* Mobile responsive template grid */
@media (max-width: 768px) {
    .template-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
        justify-items: center;
    }

    .template-option {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .template-preview {
        width: 55px;
        height: 70px;
    }

    .template-header-bar {
        height: 12px;
    }

    .template-lines {
        padding: 4px;
    }

    .template-line {
        height: 3px;
        margin-bottom: 3px;
    }

    .template-name {
        font-size: 0.6rem;
        margin-top: 0.25rem;
        text-align: center;
        word-break: break-word;
    }

    .template-card {
        padding: 0.75rem 0.5rem;
    }

    .template-card i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .template-card span {
        font-size: 0.7rem;
    }
}

/* Very small screens - 2 columns */
@media (max-width: 400px) {
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .template-preview {
        width: 65px;
        height: 82px;
    }

    .template-name {
        font-size: 0.7rem;
    }

    .template-card {
        padding: 1rem 0.75rem;
    }

    .template-card i {
        font-size: 1.5rem;
    }

    .template-card span {
        font-size: 0.8rem;
    }
}

.template-option {
    cursor: pointer;
}

.template-option input[type="radio"] {
    display: none;
}

.template-card {
    padding: 1.5rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--color-white);
}

.template-card i {
    font-size: 2rem;
    color: var(--color-gray);
    margin-bottom: 0.5rem;
    display: block;
}

.template-card span {
    font-weight: 500;
    color: var(--color-text);
}

.template-option input:checked+.template-card {
    border-color: var(--color-primary);
    background: rgba(230, 57, 70, 0.05);
}

.template-option input:checked+.template-card i {
    color: var(--color-primary);
}

.template-option:hover .template-card {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* CV Sections */
.cv-sections {
    margin-top: 2rem;
}

.cv-section,
.section-card {
    background: #f8f9fa;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
}

.section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h3 i {
    color: var(--color-primary);
}

.section-header-simple {
    padding: 1rem 1.25rem;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
}

.section-header-simple h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header-simple h3 i {
    color: var(--color-primary);
}

.section-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.section-badge.required {
    background: rgba(230, 57, 70, 0.1);
    color: var(--color-primary);
}

.section-content {
    padding: 1.25rem;
}

/* AI Enhance Button - Using site primary color */
.ai-enhance-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-enhance-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.4);
    background: #c02a35;
}

.ai-enhance-btn i {
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Custom Section */
.section-title-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-dark);
    padding: 0.5rem;
}

.section-title-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0.25rem;
}

.section-remove-btn {
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--color-gray);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
}

.section-remove-btn:hover {
    color: var(--color-primary);
}

/* Add Section Button */
.btn-add-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    border: 2px dashed var(--color-border);
    background: transparent;
    color: var(--color-gray);
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.btn-add-section:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(230, 57, 70, 0.02);
}

/* Generation Options */
.generation-options {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Generate Button - Using site primary color */
.btn-generate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.2);
    background: #c02a35;
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* How It Works - Legacy support */
.how-it-works {
    margin-top: 3rem;
}


.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    margin: 0 0 0.5rem;
    color: var(--color-dark);
}

.step p {
    margin: 0;
    color: var(--color-gray);
    font-size: 0.9rem;
}

/* Tips & How It Works Sections */
.tips-section,
.how-it-works {
    margin-top: 3rem;
    padding: 2.5rem 2rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.tips-section h2,
.how-it-works h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-dark);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.tips-section h2 i,
.how-it-works h2 i {
    color: var(--color-primary);
}

.tips-grid,
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.tip,
.step {
    text-align: center;
    padding: 1.5rem 1.25rem;
    background: #f8f9fa;
    border-radius: var(--radius-md);
}

.tip i,
.step-icon {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    display: block;
}

.tip h3,
.step h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-dark);
}

.tip p,
.step p {
    margin: 0;
    color: var(--color-gray);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Step Numbers (if used instead of icons) */
.step-number {
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}


/* Required Marker */
.required {
    color: var(--color-primary);
}

/* Form Improvements - Using primary color instead of purple */
.ai-input {
    border-left: none !important;
}

.ai-input:focus {
    border-left: none !important;
    border-color: var(--color-border);
    box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.1);
}

/* Remove red border from CV section cards */
.cv-section {
    border-left: none !important;
}

.cv-section .section-content {
    border-left: none !important;
}

.cv-section .form-control.ai-input,
.cv-section textarea.ai-input,
.cv-section input.ai-input {
    border-left: none !important;
}

/* Also remove from section-card for cover letter */
.section-card {
    border-left: none !important;
}

.section-card .section-content {
    border-left: none !important;
}

.section-card .form-control.ai-input,
.section-card textarea.ai-input,
.section-card input.ai-input {
    border-left: none !important;
}

/* Result Preview - Styled like PDF document */
.result-preview {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    padding: 2rem;
    font-family: 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    word-wrap: break-word;
    white-space: normal;
    color: #333;
    font-size: 11pt;
    max-width: 210mm;
    /* A4 width */
    margin: 0 auto;
}

.result-preview h1,
.result-preview h2,
.result-preview h3 {
    color: var(--color-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
}

.result-preview h1 {
    font-size: 24pt;
    text-align: center;
    border-bottom: none;
    margin-bottom: 0.5rem;
}

.result-preview h2 {
    font-size: 13pt;
    margin-top: 1rem;
}

.result-preview h3 {
    font-size: 11pt;
}

.result-preview p {
    margin: 0 0 0.75rem 0;
    text-align: justify;
}

.result-preview p:last-child {
    margin-bottom: 0;
}

.result-preview ul,
.result-preview ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.result-preview li {
    margin-bottom: 0.25rem;
}

.result-preview strong {
    font-weight: 700;
    color: var(--color-dark);
}

/* Mobile optimizations for result preview */
@media (max-width: 768px) {
    .result-preview {
        padding: 1rem;
        font-size: 10pt;
        line-height: 1.5;
    }

    .result-preview h1 {
        font-size: 18pt;
    }

    .result-preview h2 {
        font-size: 12pt;
    }
}

/* Preview Modal */
.preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
    padding: 1rem;
    box-sizing: border-box;
}

.preview-modal-overlay.show {
    display: flex;
}

.preview-modal-container {
    background-color: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    animation: modalFadeIn 0.3s ease-out;
    position: relative;
}

.preview-modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: var(--color-white);
}

.preview-modal-header h3 {
    margin: 0;
    color: var(--color-dark);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-gray);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    line-height: 1;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-modal-close:hover {
    color: var(--color-primary);
    background-color: rgba(230, 57, 70, 0.1);
}

.preview-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.preview-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-shrink: 0;
    background: var(--color-white);
    flex-wrap: wrap;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.result-actions .btn {
    flex: 1;
    min-width: 120px;
    max-width: 200px;
}

/* Mobile optimizations for preview modal */
@media (max-width: 768px) {
    .preview-modal-overlay {
        padding: 0.5rem;
    }

    .preview-modal-container {
        max-height: 95vh;
        width: 100%;
    }

    .preview-modal-header {
        padding: 0.875rem 1rem;
    }

    .preview-modal-header h3 {
        font-size: 1rem;
    }

    .preview-modal-body {
        padding: 1rem;
    }

    .preview-modal-footer {
        padding: 0.875rem 1rem;
        flex-direction: column;
    }

    .result-actions {
        flex-direction: column;
        width: 100%;
    }

    .result-actions .btn {
        width: 100%;
        max-width: 100%;
    }
}

/* AI Status Indicator */
.ai-status {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-status.available {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.ai-status.unavailable {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Loading State */
.btn-generate.loading {
    pointer-events: none;
}

.btn-generate.loading .fa-wand-magic-sparkles {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Fix cover letter spacing issues */
.result-preview {
    line-height: 1.6;
}

.result-preview br {
    line-height: 1.6;
}

/* Remove asterisks from output */
.result-preview *::before,
.result-preview *::after {
    content: none !important;
}

/* Fix large spaces in content */
.result-preview {
    white-space: normal;
    word-spacing: normal;
}

.result-preview p {
    margin-bottom: 1rem;
}

.result-preview p:empty {
    display: none;
}

/* Fixed loader position */
.tool-loader-container {
    position: relative;
    margin: 1.5rem 0;
}

.tool-loader-container.active {
    display: block;
}

/* Success container button styling - consistent dimensions */
.tool-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: stretch;
}

.tool-action-btn {
    min-width: 160px;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.95rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    flex: 1;
    max-width: 200px;
}

@media (max-width: 768px) {
    .tool-success-container {
        padding: 0.875rem;
    }

    .tool-action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tool-action-btn {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
    }
}

/* Education, Experience and Reference Entry Styles */
.education-entry,
.experience-entry,
.reference-entry {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.education-entry:last-child,
.experience-entry:last-child,
.reference-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.remove-education-btn,
.remove-experience-btn,
.remove-reference-btn {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .tips-section,
    .how-it-works {
        margin-top: 2.5rem;
        padding: 1.5rem 1rem;
    }

    .steps-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }
}






/* Required Marker */

.required {

    color: var(--color-primary);

}



/* Form Improvements - Using primary color instead of purple */

.ai-input {

    border-left: 3px solid var(--color-primary);

}



.ai-input:focus {

    border-left-color: #c02a35;

}



/* Remove red border from CV section cards */
.cv-section {
    border-left: none !important;
}

.cv-section .section-content {
    border-left: none !important;
}

/* Result Preview - Now in modal */
.result-preview {

    background: var(--color-white);

    border: 1px solid var(--color-border);

    border-radius: 0.5rem;

    padding: 2rem;

    white-space: pre-wrap;

    font-family: 'Georgia', serif;

    line-height: 1.8;

    max-height: 70vh;
    overflow-y: auto;
    word-wrap: break-word;
    white-space: normal;
}

.result-preview p {
    margin: 0 0 1rem 0;
}

.result-preview p:last-child {
    margin-bottom: 0;
}

/* Preview Modal */
.preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;

    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}



.preview-modal-overlay.show {
    display: flex;
}

.preview-modal-container {
    background-color: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    animation: modalFadeIn 0.3s ease-out;
}

.preview-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.preview-modal-header h3 {
    margin: 0;
    color: var(--color-dark);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-gray);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    line-height: 1;
}

.preview-modal-close:hover {
    color: var(--color-primary);
    background-color: rgba(230, 57, 70, 0.1);
}

.preview-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.preview-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-shrink: 0;
}



.result-actions {

    display: flex;

    gap: 1rem;

    justify-content: center;

}



/* AI Status Indicator */

.ai-status {

    padding: 1rem;

    border-radius: 0.5rem;

    margin-bottom: 1.5rem;

    display: flex;

    align-items: center;

    gap: 0.75rem;

}



.ai-status.available {

    background: rgba(40, 167, 69, 0.1);

    color: #155724;

    border: 1px solid rgba(40, 167, 69, 0.2);

}



.ai-status.unavailable {

    background: rgba(220, 53, 69, 0.1);

    color: #721c24;

    border: 1px solid rgba(220, 53, 69, 0.2);

}



/* Loading State */

.btn-generate.loading {

    pointer-events: none;

}



.btn-generate.loading .fa-wand-magic-sparkles {

    animation: spin 1s linear infinite;

}



@keyframes spin {

    from {

        transform: rotate(0deg);

    }



    to {

        transform: rotate(360deg);

    }

}


/* Fix cover letter spacing issues */
.result-preview {
    line-height: 1.6;
}

.result-preview br {
    line-height: 1.6;
}

/* Remove asterisks from output */
.result-preview *::before,
.result-preview *::after {
    content: none !important;
}

/* Fix large spaces in content */
.result-preview {
    white-space: normal;
    word-spacing: normal;
}

.result-preview p {
    margin-bottom: 1rem;
}

.result-preview p:empty {
    display: none;
}

/* Fixed loader position */
.tool-loader-container {
    position: relative;
    margin: 1.5rem 0;
}

.tool-loader-container.active {
    display: block;
}


/* Responsive */

@media (max-width: 768px) {

    .template-grid {

        grid-template-columns: repeat(2, 1fr);

    }



    .section-header {

        flex-direction: column;

        gap: 1rem;

        align-items: flex-start;

    }



    .steps-grid,

    .tips-grid {

        grid-template-columns: 1fr;

    }

}

/* ================================================================
   CV TEMPLATE SELECTION - Visual Preview System
   ================================================================ */

/* CV Template Grid */
.cv-template-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    justify-items: center;
}

/* CV Template Option */
.cv-template-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: 2px solid transparent;
    width: 100%;
    max-width: 160px;
}

.cv-template-option:hover {
    background: var(--color-bg-secondary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.cv-template-option.selected {
    background: rgba(230, 57, 70, 0.05);
    border-color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.2);
}

.cv-template-option input[type="radio"] {
    display: none;
}

/* CV Template Preview Card */
.cv-template-preview {
    width: 100%;
    aspect-ratio: 0.7;
    max-width: 100px;
    background: #fff;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.cv-template-option.selected .cv-template-preview {
    border-color: var(--color-primary);
    border-width: 3px;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.15);
}

/* Preview Header Style (Professional) */
.cv-preview-header {
    height: 22%;
    width: 100%;
}

/* Preview Sidebar Style (Modern) */
.cv-preview-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 30%;
}

/* Preview Body */
.cv-preview-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 78%;
}

.cv-preview-body.modern {
    margin-left: 30%;
    height: 100%;
    padding: 10px 8px;
}

.cv-preview-body.creative {
    height: 100%;
    padding: 10px 8px;
    align-items: center;
}

.cv-preview-body.minimal {
    height: 100%;
    padding: 12px 10px;
}

/* Avatar */
.cv-preview-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
    flex-shrink: 0;
    margin: 0 auto 4px;
}

/* Circle for Creative Layout */
.cv-preview-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-bottom: 6px;
}

/* Lines */
.cv-preview-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.cv-preview-lines.centered {
    align-items: center;
}

.cv-preview-line {
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    width: 100%;
}

.cv-preview-line.title {
    height: 6px;
    background: #bdbdbd;
    width: 80%;
}

.cv-preview-line.subtitle {
    width: 60%;
    height: 3px;
}

.cv-preview-line.heading {
    height: 4px;
    width: 50%;
    margin-top: 4px;
}

.cv-preview-line.short {
    width: 65%;
}

.cv-preview-line.centered {
    margin: 0 auto;
}

/* Divider */
.cv-preview-divider {
    height: 1px;
    background: #2d3436;
    width: 100%;
    margin: 4px 0;
}

/* Skills Pills for Creative */
.cv-preview-skills {
    display: flex;
    gap: 4px;
    margin-top: auto;
    flex-wrap: wrap;
    justify-content: center;
}

.cv-preview-skill {
    width: 16px;
    height: 4px;
    border-radius: 2px;
}

/* Section */
.cv-preview-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: auto;
}

/* Template Name & Description */
.cv-template-name {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark);
    text-align: center;
    transition: color 0.2s ease;
}

.cv-template-option.selected .cv-template-name {
    color: var(--color-primary);
}

.cv-template-desc {
    font-size: 0.75rem;
    color: var(--color-gray);
    text-align: center;
    margin-top: 2px;
}

/* ================================================================
   CV Template Mobile Responsive
   ================================================================ */

/* Tablets and smaller */
@media (max-width: 900px) {
    .cv-template-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }

    .cv-template-option {
        padding: 0.5rem;
        max-width: none;
    }

    .cv-template-preview {
        max-width: 80px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .cv-template-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0;
    }

    .cv-template-option {
        padding: 0.75rem;
        background: #f8f9fa;
        border-radius: var(--radius-md);
        max-width: none;
    }

    .cv-template-option:hover {
        transform: none;
        background: #f0f0f0;
    }

    .cv-template-option.selected {
        background: rgba(230, 57, 70, 0.08);
    }

    .cv-template-preview {
        max-width: 70px;
    }

    .cv-template-name {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }

    .cv-template-desc {
        font-size: 0.7rem;
    }

    .cv-preview-avatar {
        width: 18px;
        height: 18px;
    }

    .cv-preview-circle {
        width: 20px;
        height: 20px;
    }

    .cv-preview-line {
        height: 3px;
    }

    .cv-preview-line.title {
        height: 5px;
    }

    .cv-preview-line.heading {
        height: 3px;
    }
}

/* Very small phones */
@media (max-width: 400px) {
    .cv-template-grid {
        gap: 0.5rem;
    }

    .cv-template-option {
        padding: 0.5rem;
    }

    .cv-template-preview {
        max-width: 60px;
    }

    .cv-template-name {
        font-size: 0.75rem;
    }

    .cv-template-desc {
        display: none;
    }
}

/* PDF Preview Styles */
.pdf-preview-container {
    max-width: 900px;
    height: 90vh;
    max-height: 90vh;
}

.pdf-preview-body {
    padding: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pdf-preview-frame {
    width: 100%;
    height: 100%;
    min-height: 500px;
    flex: 1;
    border: none;
    background: #525659;
}

/* Mobile PDF preview */
@media (max-width: 768px) {
    .pdf-preview-container {
        height: 95vh;
        max-height: 95vh;
    }

    .pdf-preview-frame {
        min-height: 400px;
    }
}