/* style.css for Resume Builder */

.builder-container {
    display: flex;
    min-height: 750px;
    padding: 1rem 0;
    gap: 1.5rem;
    width: 100%;
    margin: 0 auto;
}

/* Sidebar Navigation */
.sidebar-nav {
    width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem 0;
    border-radius: 16px;
    flex-shrink: 0;
}

.nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    color: var(--text-main);
    background: var(--glass-highlight);
}

.nav-btn.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 0 15px var(--accent-glow);
}

.spacer {
    flex: 1;
}

.action-btn.download-btn {
    color: var(--accent-secondary);
    background: rgba(6, 182, 212, 0.1);
}

.action-btn.download-btn:hover {
    background: var(--accent-secondary);
    color: white;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

/* Form Panel */
.form-panel {
    flex: 1;
    max-width: 450px;
    border-radius: 16px;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
}

/* Custom Scrollbar for form panel */
.form-panel::-webkit-scrollbar {
    width: 8px;
}
.form-panel::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}
.form-panel::-webkit-scrollbar-thumb:hover {
    background: var(--glass-highlight);
}

.form-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.form-section.active {
    display: block;
}

.form-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.input-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-group input, 
.input-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.add-item-btn {
    width: 100%;
    padding: 0.8rem;
    background: transparent;
    border: 1px dashed var(--accent-primary);
    color: var(--accent-primary);
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-item-btn:hover {
    background: rgba(139, 92, 246, 0.1);
}

.dynamic-form-item {
    position: relative;
    border: 1px solid var(--glass-border);
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.remove-btn:hover {
    color: #f87171;
    transform: scale(1.1);
}

/* Preview Panel */
.preview-panel {
    flex: 2;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    position: relative;
}

/* A4 Paper setup for Resume */
.preview-wrapper {
    /* Adding a wrapper helps with scaling if needed in future */
    transform-origin: top center;
}

.resume-paper {
    /* Default Theme Variables (Classic Monochrome) */
    --r-bg: white;
    --r-text-main: #111;
    --r-text-sub: #333;
    --r-text-muted: #555;
    --r-text-light: #444;
    --r-border: #333;
    --r-border-light: #ccc;
    --r-tag-bg: #f0f0f0;

    width: 210mm;
    min-height: 297mm;
    background: var(--r-bg);
    color: var(--r-text-sub);
    padding: 20mm;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    line-height: 1.5;
}

/* Themes */
.resume-paper.theme-blue {
    --r-text-main: #0f172a;
    --r-text-sub: #1e3a8a;
    --r-text-muted: #3b82f6;
    --r-text-light: #475569;
    --r-border: #1e40af;
    --r-border-light: #bfdbfe;
    --r-tag-bg: #eff6ff;
}

.resume-paper.theme-green {
    --r-text-main: #022c22;
    --r-text-sub: #064e3b;
    --r-text-muted: #10b981;
    --r-text-light: #475569;
    --r-border: #047857;
    --r-border-light: #a7f3d0;
    --r-tag-bg: #ecfdf5;
}

.resume-paper.theme-purple {
    --r-text-main: #2e1065;
    --r-text-sub: #4c1d95;
    --r-text-muted: #8b5cf6;
    --r-text-light: #475569;
    --r-border: #6d28d9;
    --r-border-light: #ddd6fe;
    --r-tag-bg: #f5f3ff;
}

/* Resume Styling (Inside Paper) */
.resume-header {
    text-align: center;
    border-bottom: 2px solid var(--r-border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.resume-header h1 {
    font-size: 2.5rem;
    color: var(--r-text-main);
    margin-bottom: 0.2rem;
    letter-spacing: 1px;
}

.resume-header h2 {
    font-size: 1.2rem;
    color: var(--r-text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
}

.resume-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--r-text-light);
}

.resume-contact span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.resume-section {
    margin-bottom: 2rem;
}

.resume-section h3 {
    font-size: 1.3rem;
    color: var(--r-text-main);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--r-border-light);
    padding-bottom: 0.3rem;
    margin-bottom: 1rem;
}

.resume-section p {
    color: var(--r-text-light);
    font-size: 0.95rem;
}

.resume-item {
    margin-bottom: 1.5rem;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.item-header h4 {
    font-size: 1.1rem;
    color: var(--r-text-main);
}

.item-date {
    font-size: 0.9rem;
    color: var(--r-text-muted);
    font-weight: 500;
}

.item-sub {
    font-size: 1rem;
    color: var(--r-text-muted);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skills-list span {
    background: var(--r-tag-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--r-text-sub);
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .builder-container {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar-nav {
        flex-direction: row;
        width: 100%;
        height: 70px;
        padding: 0 1.5rem;
    }
    
    .form-panel {
        max-width: 100%;
        height: 400px;
    }
    
    .preview-panel {
        overflow-x: auto;
        justify-content: flex-start;
    }
}
