/**
 * Material Generator Styles
 * Phase 3: Smart Material Generation UI
 */

/* ============================================
   CONTAINER
   ============================================ */
.materials-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.materials-header {
    text-align: center;
    margin-bottom: 40px;
}

.materials-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1A3028;
    margin: 0 0 12px 0;
}

.materials-header p {
    font-size: 16px;
    color: #6B7280;
    margin: 0;
}

/* ============================================
   PROGRESS STEPS
   ============================================ */
.materials-progress {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.material-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: all 0.3s ease;
    cursor: pointer;
}

.material-step.active {
    opacity: 1;
}

.material-step.complete {
    opacity: 1;
}

.step-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: #F3F4F6;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.material-step.active .step-icon {
    background: linear-gradient(135deg, #C9A961, #B8935A);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

.material-step.complete .step-icon {
    background: #4CAF50;
    position: relative;
}

.material-step.complete .step-icon::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
}

.material-step.active .step-label {
    color: #1A3028;
    font-weight: 600;
}

/* ============================================
   WORKSPACE
   ============================================ */
.materials-workspace {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.material-section {
    padding: 32px;
}

.material-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E5E7EB;
}

.material-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1A3028;
    margin: 0;
}

.optimization-score,
.generation-status,
.optimization-tips {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #F3F4F6;
    border-radius: 20px;
    font-size: 14px;
}

.score-value strong {
    color: #C9A961;
    font-size: 18px;
}

/* ============================================
   RESUME SECTION
   ============================================ */
.resume-upload-area {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.05), rgba(201, 169, 97, 0.1));
    border: 2px dashed rgba(201, 169, 97, 0.3);
    border-radius: 12px;
    padding: 48px;
    text-align: center;
}

.upload-prompt svg {
    color: #C9A961;
    margin-bottom: 16px;
}

.upload-prompt h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1A3028;
    margin: 0 0 8px 0;
}

.upload-prompt p {
    font-size: 14px;
    color: #6B7280;
    margin: 0 0 24px 0;
}

.btn-upload,
.btn-paste-text {
    padding: 12px 32px;
    background: #C9A961;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upload:hover,
.btn-paste-text:hover {
    background: #B8935A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

.btn-paste-text {
    background: white;
    color: #C9A961;
    border: 2px solid #C9A961;
}

.btn-paste-text:hover {
    background: #C9A961;
    color: white;
}

.or-divider {
    margin: 20px 0;
    font-size: 14px;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================
   ANALYSIS RESULTS
   ============================================ */
.analysis-results {
    background: #FAFAFA;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.analysis-results h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1A3028;
    margin: 0 0 20px 0;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid;
}

.recommendation-item.high {
    border-left-color: #EF5350;
}

.recommendation-item.medium {
    border-left-color: #FFA726;
}

.recommendation-item.low {
    border-left-color: #66BB6A;
}

.rec-priority {
    padding: 4px 12px;
    background: #F3F4F6;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.recommendation-item.high .rec-priority {
    color: #EF5350;
}

.recommendation-item.medium .rec-priority {
    color: #FFA726;
}

.recommendation-item.low .rec-priority {
    color: #66BB6A;
}

.rec-content {
    flex: 1;
}

.rec-message {
    font-size: 15px;
    color: #1A3028;
    margin-bottom: 4px;
}

.rec-section {
    font-size: 13px;
    color: #6B7280;
}

.btn-apply-rec {
    padding: 6px 16px;
    background: white;
    color: #C9A961;
    border: 1px solid #C9A961;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply-rec:hover {
    background: #C9A961;
    color: white;
}

/* ============================================
   KEYWORD OPTIMIZER
   ============================================ */
.keyword-optimizer {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.keyword-optimizer h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1A3028;
    margin: 0 0 20px 0;
}

.keywords-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.keyword-category h5 {
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-tag {
    padding: 6px 12px;
    background: #FEE2E2;
    color: #DC2626;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.keyword-tag.matched {
    background: #D1FAE5;
    color: #059669;
}

/* ============================================
   COVER LETTER BUILDER
   ============================================ */
.builder-options {
    margin-bottom: 32px;
}

.builder-options h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1A3028;
    margin: 0 0 16px 0;
}

.style-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.style-option {
    display: block;
    cursor: pointer;
}

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

.option-content {
    padding: 16px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.style-option input[type="radio"]:checked + .option-content {
    border-color: #C9A961;
    background: rgba(201, 169, 97, 0.05);
}

.option-title {
    font-size: 15px;
    font-weight: 600;
    color: #1A3028;
}

.option-desc {
    font-size: 13px;
    color: #6B7280;
}

.cover-preview {
    margin-top: 32px;
}

.cover-preview h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1A3028;
    margin: 0 0 16px 0;
}

.letter-content {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 24px;
    min-height: 400px;
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
    white-space: pre-wrap;
}

.letter-content.editable:focus {
    outline: none;
    border-color: #C9A961;
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

/* ============================================
   LINKEDIN OPTIMIZER
   ============================================ */
.linkedin-sections {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.linkedin-section {
    padding: 24px;
    background: #FAFAFA;
    border-radius: 12px;
}

.linkedin-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1A3028;
    margin: 0 0 20px 0;
}

.current-value,
.suggested-value {
    margin-bottom: 16px;
}

.current-value label,
.suggested-value label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: 8px;
}

.current-value input,
.current-value textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.current-value input:focus,
.current-value textarea:focus {
    outline: none;
    border-color: #C9A961;
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

.suggestion-box {
    padding: 16px;
    background: white;
    border: 1px solid #C9A961;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #1A3028;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #C9A961;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skill-chip:hover {
    background: #C9A961;
    color: white;
}

.skill-name {
    font-size: 14px;
    font-weight: 500;
}

.skill-action {
    font-size: 12px;
    opacity: 0.6;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.material-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #E5E7EB;
}

.btn-regenerate,
.btn-apply-all,
.btn-next-material,
.btn-generate,
.btn-copy,
.btn-copy-all,
.btn-complete {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-regenerate {
    background: white;
    color: #6B7280;
    border: 1px solid #E5E7EB;
}

.btn-apply-all,
.btn-generate {
    background: linear-gradient(135deg, #C9A961, #B8935A);
    color: white;
}

.btn-next-material {
    background: #1A3028;
    color: white;
}

.btn-copy,
.btn-copy-all {
    background: white;
    color: #C9A961;
    border: 1px solid #C9A961;
}

.btn-complete {
    background: linear-gradient(135deg, #4CAF50, #45A049);
    color: white;
}

.btn-regenerate:hover,
.btn-apply-all:hover,
.btn-next-material:hover,
.btn-generate:hover,
.btn-copy:hover,
.btn-copy-all:hover,
.btn-complete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.material-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 15px;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.material-notification.show {
    transform: translateX(0);
}

.material-notification.success {
    border-left: 4px solid #4CAF50;
    color: #4CAF50;
}

.material-notification.error {
    border-left: 4px solid #EF5350;
    color: #EF5350;
}

/* ============================================
   PASTE DIALOG
   ============================================ */
.paste-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paste-dialog {
    background: white;
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.paste-dialog h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1A3028;
    margin: 0 0 20px 0;
}

.paste-dialog textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    resize: vertical;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-cancel,
.btn-confirm {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: white;
    color: #6B7280;
    border: 1px solid #E5E7EB;
}

.btn-confirm {
    background: #C9A961;
    color: white;
}

.btn-cancel:hover,
.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .materials-progress {
        flex-direction: column;
        gap: 20px;
    }
    
    .keywords-grid {
        grid-template-columns: 1fr;
    }
    
    .style-options {
        grid-template-columns: 1fr;
    }
    
    .material-actions {
        flex-direction: column;
    }
    
    .material-actions button {
        width: 100%;
    }
}