/* ========================================
   Sidebar Photo Resume Template CSS
   Inspired by Harper Russo Design
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Arial', 'Helvetica Neue', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Main Container
   ======================================== */
.resume-builder-container {
    max-width: 1400px;
    width: 95vw;
    height: 92vh;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ========================================
   Form Section (Left Panel)
   ======================================== */
.form-section {
    width: 450px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    padding: 32px 28px;
    overflow-y: auto;
    border-right: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.form-section h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    text-align: center;
}

.form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #475569;
    margin-top: 28px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Form Groups & Inputs
   ======================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #7996b5;
    box-shadow: 0 0 0 3px rgba(121, 150, 181, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

/* ========================================
   Photo Upload Section
   ======================================== */
.photo-upload-section input[type="file"] {
    padding: 10px;
    font-size: 13px;
    cursor: pointer;
}

.photo-upload-section input[type="file"]::file-selector-button {
    padding: 8px 16px;
    background: #7996b5;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 10px;
    transition: all 0.2s;
}

.photo-upload-section input[type="file"]::file-selector-button:hover {
    background: #5d7a9a;
}

/* ========================================
   Theme Color Picker
   ======================================== */
.theme-color-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 18px;
    border-radius: 12px;
    border: 2px solid #cbd5e1;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.color-input {
    width: 60px;
    height: 40px;
    border: 3px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.color-input:hover {
    transform: scale(1.05);
    border-color: #7996b5;
}

.color-label {
    flex: 1;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.reset-color-btn {
    padding: 8px 16px;
    background: #64748b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.reset-color-btn:hover {
    background: #475569;
}

/* ========================================
   Action Buttons
   ======================================== */
.add-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #7996b5 0%, #5d7a9a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    margin-bottom: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(121, 150, 181, 0.3);
}

.add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(121, 150, 181, 0.4);
    background: linear-gradient(135deg, #5d7a9a 0%, #4a6280 100%);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

.sample-data-btn,
.download-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sample-data-btn {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
}

.sample-data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.4);
}

.download-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ========================================
   Skill/Education/Experience/Award Items
   ======================================== */
.skill-item,
.education-item,
.experience-item,
.award-item {
    padding: 18px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.skill-item:hover,
.education-item:hover,
.experience-item:hover,
.award-item:hover {
    border-color: #7996b5;
    box-shadow: 0 2px 8px rgba(121, 150, 181, 0.15);
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    background: #f8fafc;
    padding: 32px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: white;
    border-bottom: 2px solid #e2e8f0;
    flex-shrink: 0;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 850px;
    margin-bottom: 20px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.preview-header h2 {
    color: #2d3748;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.preview-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-header-primary,
.btn-header-secondary,
.btn-header-success {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.btn-header-primary {
    background: #667eea;
    color: white;
}

.btn-header-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-header-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-header-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-header-success {
    background: #48bb78;
    color: white;
}

.btn-header-success:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.preview-container {
    width: 100%;
    max-width: 850px;
    background: white;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    border-radius: 0 0 8px 8px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: none;
    margin-bottom: 0;
    height: fit-content;
}

/* ========================================
   Resume Preview (A4 Aspect)
   ======================================== */
.resume-preview {
    width: 100%;
    min-height: auto;
    background: white;
    display: flex;
    flex-direction: row;
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
    position: relative;
    height: fit-content;
}

/* ========================================
   Left Sidebar (Profile & Contact)
   ======================================== */
.resume-sidebar {
    width: 310px;
    background: #d4dce6;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Profile Photo */
.profile-photo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    background: #b8c4d3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 60px;
    color: #8796a9;
}

/* Contact Section */
.contact-section {
    padding-top: 0;
    margin-top: -10px;
}

.sidebar-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.sidebar-icon {
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.sidebar-text {
    font-size: 13px;
    color: #2d3748;
    word-wrap: break-word;
    flex: 1;
}

/* Sidebar Sections */
.sidebar-section {
    padding-top: 10px;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 800;
    color: #1a202c;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid #8796a9;
}

/* Skills List */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.skill-entry {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skill-name {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}

.skill-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #8796a9;
    transition: all 0.2s;
}

.dot.filled {
    background: #1a202c;
    border-color: #1a202c;
}

/* Awards List */
.awards-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.award-entry {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.award-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.award-details {
    flex: 1;
}

.award-title {
    font-size: 12px;
    color: #2d3748;
    line-height: 1.5;
    font-weight: 500;
}

/* ========================================
   Right Main Content
   ======================================== */
.resume-main-content {
    flex: 1;
    padding: 40px 45px 0 45px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header */
.resume-header {
    text-align: left;
}

.resume-header h1 {
    font-size: 42px;
    font-weight: 800;
    color: #1a202c;
    letter-spacing: 3px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.resume-header .job-title {
    font-size: 18px;
    font-weight: 600;
    color: #4a5568;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.divider-line {
    width: 100%;
    height: 2px;
    background: #cbd5e1;
    margin: 10px 0;
}

/* Content Sections */
.content-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 800;
    color: #1a202c;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
    padding-bottom: 6px;
    border-bottom: 2px solid #cbd5e1;
}

/* Profile Text */
.profile-text {
    font-size: 14px;
    line-height: 1.8;
    color: #4a5568;
    text-align: justify;
}

/* Education Entries */
.education-entry {
    margin-bottom: 20px;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    gap: 15px;
}

.entry-title {
    font-size: 15px;
    color: #1a202c;
    font-weight: 700;
}

.entry-date {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    font-style: italic;
}

.entry-details {
    margin-left: 20px;
    margin-top: 8px;
}

.entry-details li {
    font-size: 13px;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 5px;
}

/* Experience Entries */
.experience-entry {
    margin-bottom: 20px;
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.form-section::-webkit-scrollbar,
.preview-section::-webkit-scrollbar {
    width: 8px;
}

.form-section::-webkit-scrollbar-track,
.preview-section::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.form-section::-webkit-scrollbar-thumb,
.preview-section::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.form-section::-webkit-scrollbar-thumb:hover,
.preview-section::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========================================
   Responsive Design - Tablets
   ======================================== */
@media (max-width: 1200px) {
    .resume-builder-container {
        width: 98vw;
        height: 95vh;
    }

    .form-section {
        width: 400px;
        padding: 24px 20px;
    }

    .resume-sidebar {
        width: 280px;
    }
}

/* ========================================
   Responsive Design - Mobile
   ======================================== */
@media (max-width: 968px) {
    body {
        padding: 10px;
        overflow: auto;
    }

    .resume-builder-container {
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 100vh;
        border-radius: 8px;
    }

    .form-section {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
        padding: 24px 16px;
        max-height: none;
        overflow-y: visible;
    }

    .form-section h2 {
        font-size: 22px;
    }

    .form-row {
        flex-direction: column;
    }

    .preview-section {
        width: 100%;
        padding: 16px;
    }

    .preview-header {
        padding: 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .preview-header h2 {
        font-size: 18px;
        width: 100%;
    }

    .preview-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-header-secondary,
    .btn-header-success,
    .btn-header-primary {
        width: 100%;
    }

    .preview-container {
        width: 100%;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }

    .resume-preview {
        width: 100%;
        min-height: auto;
        flex-direction: column;
    }

    .resume-sidebar {
        width: 100%;
        padding: 28px 24px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .profile-photo {
        width: 100px;
        height: 100px;
    }

    .resume-main-content {
        padding: 28px 24px;
    }

    .resume-header h1 {
        font-size: 32px;
    }

    .resume-header .job-title {
        font-size: 18px;
    }

    .section-title {
        font-size: 16px;
    }

    .entry-header {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 20px 12px;
    }

    .resume-sidebar {
        padding: 20px 16px;
    }

    .profile-photo {
        width: 80px;
        height: 80px;
    }

    .photo-placeholder {
        font-size: 40px;
    }

    .resume-main-content {
        padding: 20px 16px;
    }

    .resume-header h1 {
        font-size: 26px;
    }

    .resume-header .job-title {
        font-size: 16px;
    }

    .section-title {
        font-size: 14px;
    }

    .sidebar-title {
        font-size: 13px;
    }

    .color-picker-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .color-input {
        width: 100%;
    }

    .reset-color-btn {
        width: 100%;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .resume-builder-container {
        box-shadow: none;
        border-radius: 0;
        height: auto;
    }

    .form-section {
        display: none;
    }

    .preview-section {
        padding: 0;
    }

    .preview-container {
        box-shadow: none;
        border-radius: 0;
        max-width: 100%;
    }

    .resume-preview {
        width: 210mm;
        min-height: 297mm;
        page-break-after: avoid;
    }

    .resume-sidebar {
        background: #d4dce6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .dot.filled {
        background: #1a202c !important;
        border-color: #1a202c !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
