/**
 * Application Review Phase Styles
 * Phase 3: Review and refinement interface
 */

.review-phase-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.review-header {
    text-align: center;
    margin-bottom: 30px;
}

.review-header h2 {
    font-size: 28px;
    color: #1a1a1a;
    margin-bottom: 10px;
    font-weight: 600;
}

.review-header p {
    color: #666;
    font-size: 16px;
}

/* Progress Overview */
.review-progress {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.progress-stat {
    text-align: center;
    color: white;
}

.stat-label {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: bold;
}

.stat-value.excellent {
    color: #4ade80;
}

.stat-value.good {
    color: #fbbf24;
}

.stat-value.needs-work {
    color: #f87171;
}

/* Materials Preview */
.review-materials {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.review-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
}

.review-section:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #1f2937;
    margin: 0;
}

.section-icon {
    font-size: 24px;
}

.section-actions {
    display: flex;
    gap: 10px;
}

.section-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: white;
    color: #4b5563;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.section-actions button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.section-actions .icon {
    font-size: 16px;
}

.section-content {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

/* Material Preview */
.material-preview {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
}

.preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #9ca3af;
}

.resume-mini-preview,
.letter-mini-preview,
.linkedin-mini-preview {
    font-size: 14px;
}

.preview-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.preview-header strong {
    display: block;
    color: #1f2937;
    margin-bottom: 5px;
}

.preview-meta {
    color: #6b7280;
    font-size: 13px;
}

.preview-summary,
.preview-opening,
.preview-body,
.preview-about {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 15px;
}

.preview-highlights ul {
    margin: 10px 0;
    padding-left: 20px;
}

.preview-highlights li {
    color: #6b7280;
    margin-bottom: 5px;
}

.preview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.word-count {
    color: #9ca3af;
    font-size: 12px;
}

.match-indicator {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.match-indicator.high-match {
    background: #dcfce7;
    color: #16a34a;
}

.match-indicator.medium-match {
    background: #fef3c7;
    color: #d97706;
}

.match-indicator.low-match {
    background: #fee2e2;
    color: #dc2626;
}

.tone-indicator {
    color: #6366f1;
    font-size: 12px;
    font-weight: 500;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.keyword-tag {
    background: #e0e7ff;
    color: #4338ca;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Material Insights */
.material-insights {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
}

.material-insights h4 {
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 12px;
    font-weight: 600;
}

.insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.4;
}

.insight-item.success {
    color: #16a34a;
}

.insight-item.warning {
    color: #d97706;
}

.insight-item.info {
    color: #2563eb;
}

.insight-icon {
    flex-shrink: 0;
    font-size: 16px;
}

/* AI Suggestions */
.review-suggestions {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.review-suggestions h3 {
    font-size: 20px;
    color: #92400e;
    margin-bottom: 20px;
}

.suggestions-container {
    min-height: 150px;
}

.suggestion-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.suggestions-list {
    display: grid;
    gap: 15px;
}

.suggestion-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.suggestion-card.priority-high {
    border-color: #dc2626;
}

.suggestion-card.priority-medium {
    border-color: #f59e0b;
}

.suggestion-card.priority-low {
    border-color: #3b82f6;
}

.suggestion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.priority-badge {
    background: #1f2937;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: bold;
}

.suggestion-header h4 {
    margin: 0;
    font-size: 16px;
    color: #1f2937;
}

.suggestion-desc {
    color: #4b5563;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.suggestion-action {
    display: flex;
    justify-content: flex-end;
}

.btn-apply-suggestion {
    padding: 8px 16px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-apply-suggestion:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

/* Checklist */
.review-checklist {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
}

.review-checklist h3 {
    font-size: 20px;
    color: #1f2937;
    margin-bottom: 20px;
}

.checklist-items {
    display: grid;
    gap: 15px;
}

.checklist-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.checklist-item:hover {
    background: #f3f4f6;
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.checklist-item input[type="checkbox"]:checked + .check-text {
    color: #16a34a;
    text-decoration: line-through;
}

.check-text {
    color: #4b5563;
    font-size: 15px;
    transition: all 0.2s;
}

/* Actions */
.review-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.primary-actions {
    display: flex;
    gap: 15px;
}

.btn-secondary {
    padding: 12px 24px;
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-ai-improve {
    padding: 12px 24px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ai-improve:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary.ready {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

/* Preview Modal */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
}

.preview-modal.active {
    opacity: 1;
}

.preview-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

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

.preview-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1f2937;
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
}

.preview-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

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

/* Inline Editor */
.inline-editor {
    width: 100%;
}

.editor-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.btn-save-edit,
.btn-cancel-edit {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save-edit {
    background: #10b981;
    color: white;
    border: none;
}

.btn-save-edit:hover {
    background: #059669;
}

.btn-cancel-edit {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-cancel-edit:hover {
    background: #f9fafb;
}

/* Notifications */
.review-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 10001;
    max-width: 350px;
}

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

.review-notification.success {
    border-left: 4px solid #10b981;
}

.review-notification.warning {
    border-left: 4px solid #f59e0b;
}

.review-notification.error {
    border-left: 4px solid #ef4444;
}

.review-notification.info {
    border-left: 4px solid #3b82f6;
}

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .review-progress {
        flex-direction: column;
        gap: 20px;
    }
    
    .section-content {
        grid-template-columns: 1fr;
    }
    
    .review-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .primary-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .primary-actions button {
        width: 100%;
    }
    
    .preview-modal-content {
        width: 95%;
        max-height: 90vh;
    }
}