/**
 * Conflict Resolution UI Styles
 * Part of Phase 4: Conflict Resolution
 */

/* Modal Overlay */
.conflict-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

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

.conflict-modal-closing {
    animation: fadeOut 0.3s ease-in-out;
}

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

/* Modal Container */
.conflict-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

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

/* Header */
.conflict-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(139, 0, 255, 0.3);
}

.conflict-modal-header h2 {
    margin: 0 0 8px 0;
    color: #ff6b6b;
    font-size: 24px;
}

.conflict-modal-header p {
    margin: 0;
    color: #aaa;
    font-size: 14px;
}

/* Body */
.conflict-modal-body {
    padding: 24px;
}

.conflict-info {
    padding: 12px;
    background: rgba(139, 0, 255, 0.1);
    border-left: 3px solid #8b00ff;
    margin-bottom: 24px;
    border-radius: 4px;
    color: #ddd;
    font-size: 14px;
}

/* Comparison Layout */
.conflict-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.conflict-option {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(139, 0, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.conflict-option:hover {
    background: rgba(139, 0, 255, 0.1);
    border-color: #8b00ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 255, 0.3);
}

.conflict-option h3 {
    margin: 0 0 12px 0;
    color: #fff;
    font-size: 16px;
}

.conflict-timestamp {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}

.conflict-data {
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    margin-bottom: 12px;
    min-height: 100px;
    color: #ddd;
}

.conflict-version {
    font-size: 12px;
    color: #8b00ff;
    font-weight: bold;
}

.data-display {
    font-size: 14px;
    line-height: 1.6;
}

.data-json {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: #b8b8b8;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Divider */
.conflict-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.vs-text {
    background: linear-gradient(135deg, #8b00ff, #ff6b6b);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

/* Recommendation */
.conflict-recommendation {
    padding: 16px;
    background: rgba(139, 0, 255, 0.05);
    border-left: 3px solid #8b00ff;
    border-radius: 4px;
    color: #ddd;
    font-size: 14px;
    line-height: 1.6;
}

/* Footer */
.conflict-modal-footer {
    padding: 24px;
    border-top: 1px solid rgba(139, 0, 255, 0.3);
    display: flex;
    gap: 12px;
    justify-content: center;
}

.conflict-btn {
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 200px;
}

.conflict-btn-local {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border-color: #3498db;
}

.conflict-btn-local:hover {
    background: #3498db;
    color: white;
}

.conflict-btn-server {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border-color: #2ecc71;
}

.conflict-btn-server:hover {
    background: #2ecc71;
    color: white;
}

.conflict-btn-merge {
    background: rgba(139, 0, 255, 0.2);
    color: #8b00ff;
    border-color: #8b00ff;
}

.conflict-btn-merge:hover {
    background: #8b00ff;
    color: white;
}

/* Conflict Badge (notification) */
.conflict-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
    z-index: 9999;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.conflict-badge:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.7);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .conflict-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .conflict-comparison {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .conflict-divider {
        transform: rotate(90deg);
        margin: 12px 0;
    }
    
    .conflict-modal-footer {
        flex-direction: column;
    }
    
    .conflict-btn {
        max-width: none;
    }
}
