/* Resume Builder Page Styles */

.resume-builder-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Progress Indicator */
.progress-indicator {
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 1;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #e0e0e0;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: #667eea;
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.progress-step.completed .step-number {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

.step-label {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    max-width: 80px;
    word-wrap: break-word;
}

.progress-step.active .step-label {
    color: #667eea;
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    margin: 0 1rem;
    margin-top: 1.5rem;
}

.progress-step:last-child {
    flex: 0;
}

/* Step Content */
.step-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-height: 500px;
    margin-bottom: 2rem;
    animation: fadeIn 0.3s ease;
    padding: 2rem;
}

/* Step Container */
.step-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-container h2 {
    color: #1e293b;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.step-description {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Summary Section */
.summary-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-section h3 {
    color: #1e293b;
    font-size: 1.1rem;
    margin: 0;
}

/* Gaps within summary section */
.summary-section > div > .gaps-list {
    width: 100%;
    box-sizing: border-box;
    display: block;
    overflow: visible;
    padding: 0;
    flex: none;
    overflow-y: visible;
}

.summary-section .gap-item {
    width: 100% !important;
    max-width: none;
    padding: 0.8rem;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.8rem;
    box-sizing: border-box;
    overflow: visible;
}

.textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Form Row - Two Column Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
}

/* Skills Section */
.skills-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #fff0f5 100%);
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #ddd6fe;
    min-height: auto;
    max-height: 400px;
    overflow-y: auto;
}

/* Skills List */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.skill-item {
    padding: 0.8rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.skill-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.skill-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.skill-info strong {
    color: #1e293b;
    font-weight: 600;
}

.skill-category {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skill-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-small {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.btn-small:hover {
    border-color: #667eea;
    background: #f0f7ff;
}

.btn-edit {
    color: #667eea;
}

.btn-remove {
    color: #ef4444;
}

/* Gaps Display in Resume Builder Steps */
.gaps-section {
    background: linear-gradient(135deg, #e7f3ff 0%, #f0e7ff 100%);
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #667eea;
    min-height: auto;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.gaps-section h3 {
    color: #0b3d91;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0;
}

.gaps-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Override for gaps-list in summary section */
.summary-section .gaps-list {
    display: block;
    flex: none;
    overflow: visible;
    overflow-y: visible;
    padding: 0;
}

.gap-item {
    padding: 0.8rem;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.8rem;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.gap-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.gap-item .gap-text {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
    display: block;
    margin: 0;
    padding: 0;
}

.gap-item .gap-reason {
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    line-height: 1.4;
    word-break: keep-all;
    overflow-wrap: break-word;
    white-space: normal;
}

.gap-meta {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-category {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.badge-placement {
    background: rgba(76, 184, 168, 0.1);
    color: #4db8a8;
}

/* Prefill Notice */
.prefill-notice {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-counter {
    color: #666;
    font-weight: 500;
    text-align: center;
    flex: 1;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
}

/* Button to Add AI Gaps */
.btn-add-gap {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
    gap: 0.4rem;
    min-width: fit-content;
}

.btn-add-gap:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.btn-add-gap:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.gap-item.draggable {
    padding: 0.8rem;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    cursor: grab;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.empty-message {
    color: #94a3b8;
    font-style: italic;
    padding: 1rem;
    text-align: center;
    background: #f8fafc;
    border-radius: 6px;
}

/* Drop Zone Styles */
.drop-zone-skills,
.drop-zone-description {
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.drop-zone-skills {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone-description {
    min-height: auto;
}

.drop-zone-skills:hover,
.drop-zone-description:hover {
    border-color: #667eea;
    background-color: #e7f3ff;
}

.drop-zone-skills.dragover,
.drop-zone-description.dragover {
    border-color: #667eea;
    background-color: #e7f3ff;
}

/* Suggestion Items */
.suggestion-item {
    padding: 0.8rem;
    background: white;
    border: 2px solid #fed7aa;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.suggestion-item:hover {
    border-color: #ff9800;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

.suggestion-item.draggable {
    cursor: grab;
}

.suggestion-item.draggable:active {
    cursor: grabbing;
}

.suggestion-text {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
    line-height: 1.3;
}

.suggestion-reason {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .resume-builder-container {
        padding: 1rem;
    }

    .progress-steps {
        overflow-x: auto;
        padding: 0.5rem 0;
    }

    .progress-line {
        display: none;
    }

    .progress-step {
        flex: 0 0 60px;
    }

    .step-label {
        display: none;
    }

    .step-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .step-navigation button {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skills-section,
    .gaps-section {
        min-height: 250px;
        max-height: 500px;
    }
}

/* Experience Section Styles */
.experiences-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.company-section-header {
    position: relative;
    padding-left: 0;
}

.company-section-header h3 {
    margin: 0;
    color: #0B3D91;
    font-size: 1.3em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.company-roles-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding-left: 0;
    animation: slideInDown 0.3s ease;
}

.experience-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.experience-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.experience-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #4db8a8 100%);
    border-radius: 8px 0 0 8px;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.exp-header > div:first-child {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex: 1;
    min-width: 200px;
}

.exp-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1.1em;
    font-weight: 700;
    line-height: 1.3;
}

.exp-header .company {
    margin: 0.3rem 0 0 0;
    color: #0B3D91;
    font-size: 0.95em;
    font-weight: 600;
}

.exp-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-edit,
.btn-reorganize {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.btn-edit {
    color: #667eea;
    border-color: #ddd6fe;
}

.btn-edit:hover {
    background: #f0f4ff;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.btn-reorganize {
    color: #0891b2;
    border-color: #cffafe;
}

.btn-reorganize:hover:not(:disabled) {
    background: #ecf9ff;
    border-color: #0891b2;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.2);
}

.btn-reorganize:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.exp-details {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    font-size: 0.9em;
}

.date-range {
    color: #64748b;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.location {
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.exp-description {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 1rem;
}

.role-title-container {
    margin: 0.8rem 0 0.4rem 0;
    color: #0B3D91;
    font-size: 0.95em;
}

.role-bullet {
    margin: 0.4rem 0;
    padding-left: 0.5rem;
    color: #334155;
}

.role-content {
    margin: 0.4rem 0;
    color: #334155;
}

.exp-suggestions {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    border: 1px solid #ffd699;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.exp-suggestions strong {
    color: #92400e;
    display: block;
    margin-bottom: 0.8rem;
}

.suggestion-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.suggestion-btn {
    background: white;
    border: 2px solid #fbb040;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    text-align: left;
    color: #1e293b;
    font-weight: 500;
    font-size: 0.9em;
}

.suggestion-btn:hover {
    background: #fffbf0;
    border-color: #f59e0b;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.suggestion-btn-icon {
    color: #f59e0b;
    font-weight: 700;
    flex-shrink: 0;
}

.suggestion-btn-text {
    flex: 1;
}

.btn-undo-icon {
    color: #ef4444;
    font-weight: bold;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.btn-undo-icon:hover {
    color: #dc2626;
    transform: scale(1.2);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
