/*
 * HakuBot - Custom Modal Dialogs
 */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}

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

.modal-overlay.closing {
    animation: fadeOut 0.2s forwards;
}

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

.modal-dialog {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.2);
    transform: scale(0.9) translateY(20px);
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.modal-overlay.closing .modal-dialog {
    animation: modalSlideOut 0.2s forwards;
}

@keyframes modalSlideOut {
    to {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
}

.modal-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.5rem;
    margin: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    line-height: 1;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--accent);
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.modal-footer {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}

/* Modal types */
.modal-confirm .modal-header {
    border-bottom-color: var(--primary);
}

.modal-warning .modal-header {
    border-bottom-color: var(--accent-yellow);
}

.modal-warning .modal-title {
    background: linear-gradient(135deg, var(--accent-yellow), #ff9d00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-danger .modal-header {
    border-bottom-color: var(--accent);
}

.modal-danger .modal-title {
    background: linear-gradient(135deg, var(--accent), #ff004f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Icon in modal */
.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.modal-icon svg {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 8px currentColor);
}

.modal-confirm .modal-icon {
    color: var(--primary);
}

.modal-warning .modal-icon {
    color: var(--accent-yellow);
}

.modal-danger .modal-icon {
    color: var(--accent);
}
