/**
 * Modal & Toast Styles
 * Taiga-Helper Design System
 *
 * Shared modal and toast notification components
 */

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal);
}

.modal-content {
    background: var(--color-bg-card);
    border-radius: var(--radius-3xl);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-modal);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg-section);
}

.modal-header h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-3xl);
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0;
    line-height: 1;
}

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

.modal-body {
    padding: var(--space-5);
    overflow-y: auto;
    max-height: calc(80vh - 130px);
}

.modal-body p {
    margin: var(--space-2) 0;
    font-size: var(--font-size-md);
}

.modal-body .label {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
}

.modal-body .value {
    font-weight: var(--font-weight-medium);
}

.modal-body .progress-bar {
    height: 8px;
    background: var(--color-bg-section);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: var(--space-1);
}

.modal-body .progress-fill {
    height: 100%;
    background: var(--color-primary);
    transition: width var(--transition-slow);
}

.modal-body .badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    margin-top: var(--space-1);
}

.modal-body .badge {
    background: var(--color-bg-section);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
}

.modal-footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--color-border-light);
    text-align: center;
}

.modal-footer .btn-primary {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: var(--font-size-md);
    transition: all var(--transition-fast);
}

.modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    z-index: var(--z-toast);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: #323232;
    color: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    animation: slideIn var(--transition-slow) ease;
    max-width: 400px;
}

.toast-info { background: var(--color-info); }
.toast-error { background: var(--color-error); }
.toast-success { background: var(--color-success); }

.toast-message {
    flex: 1;
    font-size: var(--font-size-md);
}

.toast-close {
    background: transparent;
    border: none;
    color: white;
    font-size: var(--font-size-xl);
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
}

.toast-close:hover { opacity: 1; }
.toast-hiding { animation: slideOut var(--transition-slow) ease forwards; }
