/**
 * JobShop v2.7.0 - New 3-Column Layout Styles
 * Sidebar → Content Area → Live Preview
 */

/* ===================================
   App Container - 3 Column Grid
   =================================== */

:root {
    --preview-panel-width: 400px;
}

.app-container {
    display: grid;
    grid-template-columns: 80px 1fr var(--preview-panel-width);
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

/* ===================================
   Left Sidebar Navigation
   =================================== */

.sidebar-nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(var(--safe-area-top, 0px) + 100px) 0 calc(var(--safe-area-bottom, 0px) + 20px);
    z-index: 100;
}

.sidebar-nav-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 0 10px;
}

.sidebar-nav-btn {
    width: 60px;
    height: 60px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-nav-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    transition: all 0.3s ease;
}

.sidebar-nav-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.sidebar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    transform: translateX(3px);
}

.sidebar-nav-btn.active {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sidebar-nav-btn.active::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: linear-gradient(180deg, #a855f7, #6366f1);
    border-radius: 0 4px 4px 0;
}

/* ===================================
   Center Content Area
   =================================== */

.content-area {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    padding: calc(var(--safe-area-top, 0px) + 40px) 40px calc(var(--safe-area-bottom, 0px) + 40px);
    position: relative;
}

.view-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view-panel.active {
    display: block;
}

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

.view-header {
    margin-bottom: 32px;
}

.view-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.view-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* ===================================
   Import View
   =================================== */

.import-drop-zone {
    background: rgba(255, 255, 255, 0.1);
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 40px;
}

.import-drop-zone:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.import-drop-zone.drag-over {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.9;
}

.import-drop-zone h3 {
    font-size: 1.5rem;
    color: white;
    margin: 0 0 8px 0;
}

.import-drop-zone p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 16px 0;
}

.file-hint {
    display: inline-block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
}

/* Previous Imports Section */
.previous-imports-section {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.25rem;
    color: white;
    margin: 0;
}

.btn-clear-history {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear-history:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.05);
}

.previous-imports-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.no-imports-message {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* ===================================
   Experience Cards (Charter Communications style)
   =================================== */

.experience-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.experience-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.experience-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
}

.experience-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.experience-company-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.experience-dates {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 500;
}

.experience-card-actions {
    display: flex;
    gap: 8px;
}

.btn-edit-experience,
.btn-delete-experience {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-edit-experience:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: scale(1.1);
}

.btn-delete-experience:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
}

.experience-section {
    margin-bottom: 20px;
}

.experience-section:last-child {
    margin-bottom: 0;
}

.experience-section h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0 0 12px 0;
}

.experience-section p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 0;
}

.experience-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.experience-section li {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9375rem;
    line-height: 1.7;
    padding-left: 24px;
    position: relative;
}

.experience-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #c084fc;
    font-weight: 700;
    font-size: 1.125rem;
}

.btn-add-experience {
    width: 100%;
    padding: 16px;
    background: rgba(168, 85, 247, 0.2);
    border: 2px dashed rgba(168, 85, 247, 0.5);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-add-experience:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: #a855f7;
    transform: translateY(-2px);
}

.empty-state {
    text-align: center;
    padding: 80px 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.125rem;
    font-style: italic;
}

/* ===================================
   Export View
   =================================== */

.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.export-option-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-option-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.export-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.export-option-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
}

.export-option-card p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ===================================
   Right Preview Panel
   =================================== */

.preview-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Resize Handle */
.preview-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: col-resize;
    background: transparent;
    z-index: 1000;
    transition: background 0.2s ease;
}

.preview-resize-handle:hover {
    background: rgba(99, 102, 241, 0.2);
}

.preview-resize-handle::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 40px;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.preview-resize-handle:hover::after {
    opacity: 1;
}

.preview-panel.resizing {
    user-select: none;
}

.preview-panel.resizing .preview-resize-handle {
    background: rgba(99, 102, 241, 0.3);
}

.preview-panel.resizing .preview-resize-handle::after {
    opacity: 1;
}

.preview-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
}

.preview-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.preview-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-lock-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: #6b7280;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.preview-lock-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.preview-lock-btn.locked {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.preview-lock-btn.locked:hover {
    background: #4f46e5;
}

.preview-zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.preview-zoom-btn:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}

.preview-zoom-level {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    min-width: 50px;
    text-align: center;
}

.preview-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #f9fafb;
}

.resume-preview {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 40px;
    min-height: 600px;
    font-family: 'Georgia', serif;
    color: #1f2937;
}

.preview-empty-state {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.9375rem;
    font-style: italic;
    min-height: 500px;
}

/* Resume Preview Content Styles */
.resume-preview h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    border-bottom: 3px solid #6366f1;
    padding-bottom: 8px;
}

.resume-preview h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4b5563;
    margin: 24px 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.resume-preview h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 16px 0 4px 0;
}

.resume-preview p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #374151;
    margin: 8px 0;
}

.resume-preview ul {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.resume-preview li {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #374151;
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
}

.resume-preview li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #6366f1;
    font-weight: 700;
}

/* ===================================
   Search View
   =================================== */

.search-container {
    max-width: 600px;
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.125rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: #a855f7;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.2);
}

.search-results {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===================================
   Suggestions View
   =================================== */

.suggestions-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.suggestion-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
}

.suggestion-card h3 {
    font-size: 1.25rem;
    color: white;
    margin: 0 0 12px 0;
}

.suggestion-card p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* ===================================
   Modals
   =================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px 32px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 32px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9375rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-secondary:hover {
    background: #e5e7eb;
    color: #374151;
}

.import-preview-modal {
    max-width: 800px;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1200px) {
    .app-container {
        grid-template-columns: 70px 1fr 320px;
    }

    .sidebar-nav-label {
        display: none;
    }

    .sidebar-nav-btn {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .sidebar-nav {
        flex-direction: row;
        padding: calc(var(--safe-area-top, 0px) + 70px) 10px 10px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .sidebar-nav-list {
        flex-direction: row;
        justify-content: center;
        width: auto;
    }

    .preview-panel {
        display: none;
    }

    .content-area {
        padding: 20px;
    }

    .view-header h1 {
        font-size: 1.75rem;
    }
}

/* ===================================
   Screenshot Import Styles
   =================================== */

.screenshot-import-preview {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.preview-image-container {
    max-height: 400px;
    overflow: hidden;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.preview-image {
    width: 100%;
    height: auto;
    display: block;
}

.extracted-text-section {
    margin-top: 16px;
}

.extracted-text-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.extracted-text-editor {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-family: 'Monaco', 'Courier New', monospace;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    resize: vertical;
    min-height: 200px;
}

.extracted-text-editor:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 8px 0 0 0;
    font-style: italic;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* ===================================
   Import Options Grid
   =================================== */

.import-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.import-option-card {
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .import-options-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Edit Page Empty State
   =================================== */

.edit-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.empty-state-status {
    text-align: center;
    margin-bottom: 48px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 40px 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.9;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.empty-state-status h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}

.empty-state-status p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-weight: 500;
}

/* When resume is loaded, hide empty state */
.edit-empty-state.hidden {
    display: none;
}
