/* Column Conflict Resolution Modal - Purple Neomorphism Styling */

/* Modal Overlay */
.conflict-modal-overlay {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(163, 177, 198, 0.3);
    backdrop-filter: blur(4px);
}

.conflict-modal-overlay.active {
    display: block;
}

/* Main Modal Container */
.conflict-modal {
    background: #f0f2f5;
    margin: 3% auto;
    padding: 0;
    border-radius: 20px;
    width: 85%;
    max-width: 650px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 
        6px 6px 12px rgba(163, 177, 198, 0.3),
        -6px -6px 12px rgba(255, 255, 255, 0.7);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.conflict-modal-header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.05));
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(163, 177, 198, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.conflict-modal-title {
    color: var(--primary-color, #8b5cf6);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.conflict-modal-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0.5rem 0 0 0;
    font-weight: 400;
}

.conflict-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.conflict-modal-close:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-color, #8b5cf6);
}

/* Modal Body */
.conflict-modal-body {
    padding: 1.5rem;
    max-height: 55vh;
    overflow-y: auto;
    color: #1e293b !important;
    background: #f0f2f5 !important;
    line-height: 1.5;
}

.conflict-section {
    margin-bottom: 1.5rem;
}

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

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    width: 20px;
    height: 20px;
    color: #8b5cf6;
}

/* Conflict Item Cards */
.conflict-item {
    background: #f8fafc;
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 
        inset 4px 4px 8px rgba(163, 177, 198, 0.3),
        inset -4px -4px 8px rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.conflict-item:hover {
    box-shadow: 
        inset 6px 6px 12px rgba(163, 177, 198, 0.4),
        inset -6px -6px 12px rgba(255, 255, 255, 0.8);
}

.conflict-target {
    font-size: 1.1rem;
    font-weight: 600;
    color: #8b5cf6;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conflict-description {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Column Options */
.column-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.column-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f0f2f5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    position: relative;
}

.column-option:hover {
    background: #e5e7eb;
    box-shadow: 
        2px 2px 4px rgba(163, 177, 198, 0.2),
        -2px -2px 4px rgba(255, 255, 255, 0.5);
}

.column-option.selected {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.05));
    box-shadow: 
        4px 4px 8px rgba(163, 177, 198, 0.3),
        -4px -4px 8px rgba(255, 255, 255, 0.6),
        0 0 0 1px rgba(139, 92, 246, 0.2);
}

.column-option.recommended::after {
    content: "Recommended";
    position: absolute;
    top: -8px;
    right: 12px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.column-radio {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    accent-color: #8b5cf6;
}

.column-details {
    flex: 1;
}

.column-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.column-sample {
    color: #64748b;
    font-size: 0.85rem;
    font-family: 'Monaco', 'Menlo', monospace;
    background: rgba(139, 92, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
}

/* Modal Footer */
.conflict-modal-footer {
    padding: 1.5rem 2rem 2.5rem 2rem;
    border-top: 1px solid rgba(163, 177, 198, 0.2);
    background: #f0f2f5 !important;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.footer-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons - Matching news-view-all Style */
.btn-conflict {
    background: #f0f2f5;
    border: none;
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        3px 3px 6px rgba(163, 177, 198, 0.3),
        -3px -3px 6px rgba(255, 255, 255, 0.7);
}

.btn-secondary {
    background: #f0f2f5;
    color: #4a5568;
}

.btn-secondary:hover {
    color: #2d3748;
    background: #f0f2f5;
    text-decoration: none;
    box-shadow: 
        4px 4px 8px rgba(163, 177, 198, 0.4),
        -4px -4px 8px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(163, 177, 198, 0.1);
}

.btn-primary {
    background: #f0f2f5 !important;
    color: rgba(139, 92, 246, 0.9) !important;
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    color: rgba(124, 58, 237, 1) !important;
    background: #f0f2f5 !important;
    text-decoration: none;
    box-shadow: 
        4px 4px 8px rgba(163, 177, 198, 0.4),
        -4px -4px 8px rgba(255, 255, 255, 0.8),
        inset 1px 1px 2px rgba(163, 177, 198, 0.1);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #94a3b8;
}

/* Loading Spinner */
.btn-loading .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tablet and Mobile Responsive Design */
@media (max-width: 1024px) {
    .conflict-modal {
        width: 96vw;
        max-width: none;
        height: 85vh;
        max-height: 85vh;
        margin: 7.5vh auto;
        border-radius: 15px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .conflict-modal-header {
        padding: 1rem 1.25rem;
        flex-shrink: 0;
    }
    
    .conflict-modal-body {
        padding: 1rem 1.25rem;
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
        height: calc(85vh - 140px); /* Total height minus header and footer */
    }
    
    .conflict-modal-footer {
        padding: 1rem 1.25rem 1.5rem 1.25rem !important;
        background: #f0f2f5 !important;
        border-top: 1px solid rgba(163, 177, 198, 0.2);
        flex-shrink: 0;
    }
    
    .conflict-modal-title {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .conflict-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border-radius: 12px;
    }
    
    .conflict-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-actions {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
        gap: 0.75rem;
    }
    
    .btn-conflict {
        flex: 1;
        min-width: auto;
        font-size: 0.85rem;
        padding: 0.8rem 0.75rem;
        border-radius: 10px;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        touch-action: manipulation;
    }
    
    .column-options {
        gap: 0.5rem;
    }
    
    .column-option {
        padding: 0.6rem;
    }
    
    .column-name {
        font-size: 0.9rem;
    }
    
    .column-sample {
        font-size: 0.75rem;
    }
}

/* iPad Specific Fixes */
@media (min-width: 768px) and (max-width: 1024px) {
    .conflict-modal {
        width: 85vw;
        max-width: 700px;
        height: 80vh;
        max-height: 80vh;
        margin: 10vh auto;
    }
    
    .conflict-modal-body {
        height: calc(80vh - 160px);
        padding: 1.5rem;
    }
    
    .conflict-modal-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .conflict-modal-footer {
        padding: 1rem 1.5rem 2rem 1.5rem !important;
    }
    
    .conflict-item {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .conflict-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .conflict-modal-overlay,
    .conflict-modal,
    .conflict-item,
    .column-option,
    .btn-conflict {
        transition: none;
    }
    
    .spinner {
        animation: none;
    }
}

/* Force light theme - remove dark mode overrides */
.conflict-modal {
    background: #f0f2f5 !important;
    color: #1e293b !important;
}

.conflict-item {
    background: #f8fafc !important;
    color: #2d3748 !important;
}

.column-option {
    background: #f0f2f5 !important;
    color: #2d3748 !important;
}

.column-option:hover {
    background: #e5e7eb !important;
}