/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.open { display: flex; }

.modal-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(13, 13, 18, 0.5);
}

.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: var(--space-lg);
    z-index: 1;
}

.modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

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

.modal-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
}

.modal-close {
    font-size: 20px;
    color: var(--color-text-tertiary);
    padding: 4px;
    line-height: 1;
}

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

.modal-body { padding: var(--space-lg); }

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

/* Alert messages */
.messages-container { margin-bottom: var(--space-md); }

.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    font-size: 0.85rem;
}

.alert-success { background: var(--color-success-soft); color: #1a5e3a; }
.alert-error, .alert-danger { background: rgba(217, 79, 79, 0.1); color: #991b1b; }
.alert-warning { background: var(--color-warning-soft); color: #92400e; }
.alert-info { background: var(--color-info-soft); color: #1d4ed8; }

.alert-close {
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    color: inherit;
}

.alert-close:hover { opacity: 1; }

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px var(--space-md);
    min-width: 280px;
    max-width: 400px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transform: translateX(120%);
    transition: transform var(--duration-base) var(--ease-out),
                opacity var(--duration-base) var(--ease-out);
    opacity: 0;
}

.toast.show { transform: translateX(0); opacity: 1; }
.toast.hide { transform: translateX(120%); opacity: 0; }

.toast-success { background: var(--color-success-soft); color: #1a5e3a; }
.toast-error { background: rgba(217, 79, 79, 0.1); color: #991b1b; }
.toast-warning { background: var(--color-warning-soft); color: #92400e; }
.toast-info { background: var(--color-info-soft); color: #1d4ed8; }

.toast-content { display: flex; align-items: center; gap: 10px; }
.toast-icon { font-size: 16px; font-weight: bold; }
.toast-message { font-size: 0.85rem; }

.toast-close {
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    color: inherit;
    padding: 0 0 0 12px;
    line-height: 1;
}

.toast-close:hover { opacity: 1; }
