/**
 * ═══════════════════════════════════════════════════════════════════════════
 * SPLIT-VIEW EDITOR - Styling
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* Toggle Button */
#splitViewToggle {
    transition: all 0.2s;
}

#splitViewToggle.active {
    background: #6366f1;
    color: white;
}

/* Split View Container */
.split-view-container {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 500px;
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}

/* Left and Right Panels */
.split-view-left,
.split-view-right {
    display: flex;
    flex-direction: column;
    min-width: 250px;
}

.split-view-left {
    flex: 0 0 40%;
    background: white;
    border-right: 1px solid #e2e8f0;
}

.split-view-right {
    flex: 1;
    background: white;
}

/* Panel Headers */
.split-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.split-view-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.split-view-header h3 i {
    color: #6366f1;
}

.split-view-tools {
    display: flex;
    gap: 8px;
}

.split-tool-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.split-tool-btn:hover {
    background: #6366f1;
    color: white;
}

.split-tool-btn.active {
    background: #6366f1;
    color: white;
}

/* Content Areas */
.split-view-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.split-view-content::-webkit-scrollbar {
    width: 8px;
}

.split-view-content::-webkit-scrollbar-track {
    background: transparent;
}

.split-view-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.split-view-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Job Description Display */
.job-description-display {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #475569;
}

.job-description-display p {
    margin: 0 0 16px 0;
}

.job-description-display ul {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.job-description-display li {
    margin-bottom: 8px;
}

.job-description-display .placeholder {
    color: #94a3b8;
    font-style: italic;
}

/* Keyword Highlighting */
.keyword-highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* Keywords Section */
#keywordHighlights {
    display: none;
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

#keywordHighlights h4 {
    margin: 0 0 12px 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-tag {
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.keyword-tag:hover {
    background: #6366f1;
    color: white;
}

/* Letter Preview Display */
.letter-preview-display {
    background: white;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    min-height: 400px;
}

.letter-content {
    font-family: 'Georgia', serif;
    font-size: 11pt;
    line-height: 1.6;
    color: #1e293b;
}

.letter-content p {
    margin: 0 0 16px 0;
}

.letter-salutation {
    margin-bottom: 24px !important;
}

.letter-closing {
    margin-top: 32px !important;
}

.letter-preview-display .placeholder {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    padding: 60px 20px;
}

/* Resizer */
.split-view-resizer {
    width: 8px;
    background: #e2e8f0;
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}

.split-view-resizer:hover,
.split-view-resizer.active {
    background: #6366f1;
}

.resizer-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 40px;
    background: white;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.split-view-resizer:hover .resizer-handle,
.split-view-resizer.active .resizer-handle {
    opacity: 1;
}

/* Responsive */
@media (max-width: 900px) {
    .split-view-container {
        flex-direction: column;
        height: auto;
    }
    
    .split-view-left,
    .split-view-right {
        flex: none !important;
        width: 100%;
        min-height: 300px;
    }
    
    .split-view-resizer {
        width: 100%;
        height: 8px;
        cursor: row-resize;
    }
    
    .resizer-handle {
        width: 40px;
        height: 4px;
    }
}

/* Print - hide split view */
@media print {
    .split-view-container {
        display: none !important;
    }
}
