/* ===================================
   CUSTOM MODAL SYSTEM - MIRROR AI THEME
   ================================== */

/* Modal Overlay */
.mirror-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: mirrorFadeIn 0.2s ease-out forwards;
}

@keyframes mirrorFadeIn {
    to { opacity: 1; }
}

/* Modal Container */
.mirror-modal {
    background: linear-gradient(135deg, #0f1729 0%, #1a1f3a 100%);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(0, 242, 254, 0.1);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    animation: mirrorSlideUp 0.3s ease-out forwards;
}

@keyframes mirrorSlideUp {
    to {
        transform: scale(1) translateY(0);
    }
}

/* Modal Header */
.mirror-modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.mirror-modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* Icon Types */
.mirror-modal-icon.confirm {
    background: rgba(0, 242, 254, 0.1);
    color: #00f2fe;
}

.mirror-modal-icon.alert {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.mirror-modal-icon.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.mirror-modal-icon.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.mirror-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
    flex: 1;
}

/* Modal Body */
.mirror-modal-body {
    padding: 24px 28px;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.6;
    max-height: 50vh;
    overflow-y: auto;
}

.mirror-modal-body::-webkit-scrollbar {
    width: 8px;
}

.mirror-modal-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 4px;
}

.mirror-modal-body::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.5);
    border-radius: 4px;
}

.mirror-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 0.7);
}

/* Modal Footer */
.mirror-modal-footer {
    padding: 20px 28px;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: rgba(15, 23, 42, 0.4);
}

/* Modal Buttons */
.mirror-modal-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    justify-content: center;
}

.mirror-modal-btn:active {
    transform: scale(0.97);
}

/* Primary Button (OK, Confirm, Yes) */
.mirror-modal-btn.primary {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #0a0e27;
    box-shadow: 0 4px 16px rgba(0, 242, 254, 0.3);
}

.mirror-modal-btn.primary:hover {
    box-shadow: 0 6px 24px rgba(0, 242, 254, 0.4);
    transform: translateY(-2px);
}

/* Secondary Button (Cancel, No) */
.mirror-modal-btn.secondary {
    background: rgba(71, 85, 105, 0.3);
    color: #cbd5e1;
    border: 1px solid rgba(71, 85, 105, 0.5);
}

.mirror-modal-btn.secondary:hover {
    background: rgba(71, 85, 105, 0.4);
    border-color: rgba(71, 85, 105, 0.7);
}

/* Danger Button (Delete, Remove) */
.mirror-modal-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.mirror-modal-btn.danger:hover {
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

/* Success Button */
.mirror-modal-btn.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.mirror-modal-btn.success:hover {
    box-shadow: 0 6px 24px rgba(34, 197, 94, 0.4);
    transform: translateY(-2px);
}

/* Warning Button */
.mirror-modal-btn.warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #0a0e27;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}

.mirror-modal-btn.warning:hover {
    box-shadow: 0 6px 24px rgba(251, 191, 36, 0.4);
    transform: translateY(-2px);
}

/* Loading State */
.mirror-modal-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.mirror-modal-btn.loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: mirrorSpin 0.6s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .mirror-modal {
        max-width: 95%;
        margin: 20px;
    }
    
    .mirror-modal-header,
    .mirror-modal-body,
    .mirror-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .mirror-modal-footer {
        flex-direction: column;
    }
    
    .mirror-modal-btn {
        width: 100%;
    }
}
