/* Loltec alerts — modales y toasts (storefront + admin fallback) */

:root {
    --loltec-alert-bg: var(--bg-card, #252525);
    --loltec-alert-text: var(--text-primary, #ffffff);
    --loltec-alert-muted: var(--text-secondary, #b0b0b0);
    --loltec-alert-border: var(--border, #333333);
    --loltec-alert-accent: var(--accent, #E52056);
    --loltec-alert-accent-hover: var(--accent-hover, #c41847);
    --loltec-alert-success: #10b981;
    --loltec-alert-error: #ef4444;
    --loltec-alert-warning: #f59e0b;
    --loltec-alert-info: #3b82f6;
}

body.loltec-alert-open {
    overflow: hidden;
}

.loltec-alert-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.65);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.loltec-alert-overlay.is-open {
    opacity: 1;
}

.loltec-alert-panel {
    width: min(100%, 420px);
    background: var(--loltec-alert-bg);
    border: 1px solid var(--loltec-alert-border);
    border-radius: 16px;
    padding: 1.75rem 1.5rem 1.25rem;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
    text-align: center;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.18s ease;
}

.loltec-alert-overlay.is-open .loltec-alert-panel {
    transform: translateY(0) scale(1);
}

.loltec-alert-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.loltec-alert-icon--success { background: rgba(16, 185, 129, 0.15); color: var(--loltec-alert-success); }
.loltec-alert-icon--error { background: rgba(239, 68, 68, 0.15); color: var(--loltec-alert-error); }
.loltec-alert-icon--warning { background: rgba(245, 158, 11, 0.15); color: var(--loltec-alert-warning); }
.loltec-alert-icon--info { background: rgba(59, 130, 246, 0.15); color: var(--loltec-alert-info); }

.loltec-alert-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--loltec-alert-text);
}

.loltec-alert-message {
    margin: 0 0 1.25rem;
    color: var(--loltec-alert-muted);
    line-height: 1.5;
    white-space: pre-line;
}

.loltec-alert-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.loltec-alert-btn {
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.loltec-alert-btn--primary {
    background: var(--loltec-alert-accent);
    color: #fff;
}

.loltec-alert-btn--primary:hover {
    background: var(--loltec-alert-accent-hover);
}

.loltec-alert-btn--primary.is-danger {
    background: var(--loltec-alert-error);
}

.loltec-alert-btn--ghost {
    background: transparent;
    color: var(--loltec-alert-muted);
    border: 1px solid var(--loltec-alert-border);
}

.loltec-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10060;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: min(92vw, 380px);
    pointer-events: none;
}

.loltec-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: var(--loltec-alert-bg);
    border: 1px solid var(--loltec-alert-border);
    color: var(--loltec-alert-text);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
}

.loltec-toast.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.loltec-toast.is-leaving {
    opacity: 0;
    transform: translateX(12px);
}

.loltec-toast span {
    flex: 1;
    line-height: 1.4;
    font-size: 0.95rem;
}

.loltec-toast__close {
    background: none;
    border: none;
    color: var(--loltec-alert-muted);
    cursor: pointer;
    padding: 0;
}

.loltec-toast--success { border-left: 4px solid var(--loltec-alert-success); }
.loltec-toast--success i.fa-check-circle { color: var(--loltec-alert-success); }
.loltec-toast--error { border-left: 4px solid var(--loltec-alert-error); }
.loltec-toast--error i.fa-times-circle { color: var(--loltec-alert-error); }
.loltec-toast--warning { border-left: 4px solid var(--loltec-alert-warning); }
.loltec-toast--warning i.fa-exclamation-triangle { color: var(--loltec-alert-warning); }
.loltec-toast--info { border-left: 4px solid var(--loltec-alert-info); }
.loltec-toast--info i.fa-info-circle { color: var(--loltec-alert-info); }

.loltec-flash-bridge {
    display: none !important;
}

@media (max-width: 768px) {
    .loltec-toast-container {
        top: calc(var(--header-total, 114px) + 0.5rem);
        left: 0.85rem;
        right: 0.85rem;
        max-width: none;
    }
}
