/**
 * Problem Merge Modal Styles
 *
 * ARCHITECTURE: Styles for conflict resolution UI
 * WHY: Provides clear visual distinction between user's changes and server's changes
 * NOTE: Uses SOL design system tokens where applicable
 */

/* Overlay */
.sol-merge-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    animation: fadeIn 0.15s ease-out;
}

.sol-merge-modal-overlay.closing {
    animation: fadeOut 0.15s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Modal container */
.sol-merge-modal {
    background: var(--sol-bg-surface, #1e293b);
    border: 1px solid var(--sol-border-subtle, #334155);
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.15s ease-out;
}

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

/* Header */
.sol-merge-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--sol-border-subtle, #334155);
}

.sol-merge-header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--sol-text-primary, #f1f5f9);
}

.sol-merge-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--sol-text-secondary, #94a3b8);
    line-height: 1.5;
}

/* Auto-merged summary */
.sol-auto-merge-summary {
    padding: 1rem 1.5rem;
    background: rgba(34, 197, 94, 0.1);
    border-bottom: 1px solid var(--sol-border-subtle, #334155);
}

.sol-auto-merge-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--sol-text-primary, #f1f5f9);
    margin-bottom: 0.5rem;
}

.sol-merge-icon.success {
    color: #22c55e;
    font-weight: bold;
}

.sol-auto-merge-list {
    margin: 0;
    padding-left: 1.75rem;
    font-size: 0.8125rem;
    color: var(--sol-text-secondary, #94a3b8);
}

.sol-auto-merge-list li {
    margin: 0.25rem 0;
}

/* Conflicts section */
.sol-merge-conflicts {
    padding: 1rem 1.5rem;
}

.sol-no-conflicts {
    text-align: center;
    color: var(--sol-text-secondary, #94a3b8);
    padding: 2rem 0;
}

/* Individual conflict field */
.sol-conflict-field {
    margin-bottom: 1.25rem;
}

.sol-conflict-field:last-child {
    margin-bottom: 0;
}

.sol-conflict-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sol-text-primary, #f1f5f9);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Conflict options (radio buttons) */
.sol-conflict-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sol-conflict-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--sol-bg-elevated, #0f172a);
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.sol-conflict-option:hover {
    background: rgba(59, 130, 246, 0.05);
}

.sol-conflict-option:has(input:checked) {
    border-color: var(--sol-accent, #3b82f6);
    background: rgba(59, 130, 246, 0.1);
}

.sol-conflict-option input[type="radio"] {
    margin-top: 0.25rem;
    accent-color: var(--sol-accent, #3b82f6);
}

.sol-option-content {
    flex: 1;
    min-width: 0;
}

.sol-option-header {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--sol-text-primary, #f1f5f9);
    margin-bottom: 0.25rem;
}

.sol-option-value {
    display: block;
    font-size: 0.875rem;
    color: var(--sol-text-secondary, #94a3b8);
    word-break: break-word;
}

.sol-option-value em {
    font-style: italic;
    opacity: 0.7;
}

/* Footer */
.sol-merge-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--sol-border-subtle, #334155);
    background: var(--sol-bg-elevated, #0f172a);
}

/* Buttons */
.sol-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.sol-btn.primary {
    background: var(--sol-accent, #3b82f6);
    color: white;
    border: none;
}

.sol-btn.primary:hover {
    background: #2563eb;
}

.sol-btn.secondary {
    background: transparent;
    color: var(--sol-text-secondary, #94a3b8);
    border: 1px solid var(--sol-border-subtle, #334155);
}

.sol-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--sol-text-primary, #f1f5f9);
}

/* Responsive */
@media (max-width: 600px) {
    .sol-merge-modal-overlay {
        padding: 0.5rem;
    }

    .sol-merge-modal {
        max-height: 90vh;
    }

    .sol-merge-header,
    .sol-merge-conflicts,
    .sol-merge-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .sol-merge-footer {
        flex-direction: column-reverse;
    }

    .sol-btn {
        width: 100%;
    }
}
