/* ═══════════════════════════════════════════════════════════
   FrontBoil — Default UI styles (plain CSS, no Tailwind)
   Override by providing your own templates or CSS.
   ═══════════════════════════════════════════════════════════ */

/* ── Toast Container ────────────────────────────────────── */
#mr-toasts {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: 380px;
}

/* ── Toast Item ─────────────────────────────────────────── */
.mr-toast {
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    color: #fff;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.875rem;
    line-height: 1.4;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: mr-slide-in 0.25s ease-out;
    transition: opacity 0.2s, transform 0.2s;
}
.mr-toast:hover { opacity: 0.9; }
.mr-toast--info    { background: #2563eb; }
.mr-toast--success { background: #16a34a; }
.mr-toast--warning { background: #d97706; }
.mr-toast--error   { background: #dc2626; }

@keyframes mr-slide-in {
    from { opacity: 0; transform: translateX(1rem); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Alert Container ────────────────────────────────────── */
#mr-alerts {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 560px;
    width: calc(100% - 2rem);
}

/* ── Alert Item ─────────────────────────────────────────── */
.mr-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.875rem;
    line-height: 1.4;
    animation: mr-fade-in 0.2s ease-out;
}
.mr-alert--dismissible { cursor: pointer; }
.mr-alert--info    { background: #eff6ff; border-color: #2563eb; color: #1e40af; }
.mr-alert--success { background: #f0fdf4; border-color: #16a34a; color: #166534; }
.mr-alert--warning { background: #fffbeb; border-color: #d97706; color: #92400e; }
.mr-alert--error   { background: #fef2f2; border-color: #dc2626; color: #991b1b; }

@keyframes mr-fade-in {
    from { opacity: 0; transform: translateY(0.5rem); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal Overlay ──────────────────────────────────────── */
#mr-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
    animation: mr-fade-in 0.15s ease-out;
}
#mr-modal-overlay.mr-active {
    display: flex;
}

/* ── Modal ──────────────────────────────────────────────── */
.mr-modal {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-width: 420px;
    width: calc(100% - 2rem);
    padding: 1.5rem;
    font-family: system-ui, -apple-system, sans-serif;
    animation: mr-scale-in 0.2s ease-out;
}

@keyframes mr-scale-in {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.mr-modal__title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.mr-modal__message {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 1.25rem 0;
}

.mr-modal__actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ── Modal Buttons ──────────────────────────────────────── */
.mr-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, opacity 0.15s;
    line-height: 1;
}
.mr-btn:hover { opacity: 0.9; }

.mr-btn--default {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}
.mr-btn--danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}
.mr-btn--secondary {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
}
.mr-btn--secondary:hover {
    background: #f9fafb;
}
