/* ============================================================
 * Aurora Toast System
 * Append to public/assets/css/style.css (or load as a separate file)
 * ============================================================ */

.aurora-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: calc(100vw - 2rem);
}

.aurora-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 0.875rem;
    min-width: 280px;
    max-width: 420px;
    background: var(--card, #fff);
    color: var(--card-foreground, #0f1c24);
    border: 1px solid var(--border, #e2e8f0);
    border-left-width: 4px;
    border-radius: 0.625rem;
    box-shadow: 0 10px 25px -10px rgba(15, 28, 36, 0.18), 0 4px 10px -6px rgba(15, 28, 36, 0.08);
    font-size: 0.9rem;
    line-height: 1.45;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.aurora-toast.visible { opacity: 1; transform: translateX(0); }

.aurora-toast-success { border-left-color: var(--primary, #1cbfa7); }
.aurora-toast-success .aurora-toast-icon { color: var(--primary, #1cbfa7); }

.aurora-toast-error   { border-left-color: var(--destructive, #e25555); }
.aurora-toast-error   .aurora-toast-icon { color: var(--destructive, #e25555); }

.aurora-toast-warning { border-left-color: var(--sun, #f5cc4f); }
.aurora-toast-warning .aurora-toast-icon { color: var(--sun, #f5cc4f); }

.aurora-toast-info    { border-left-color: var(--ocean, #4aa9d3); }
.aurora-toast-info    .aurora-toast-icon { color: var(--ocean, #4aa9d3); }

.aurora-toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 1px;
}

.aurora-toast-message {
    flex: 1;
    word-wrap: break-word;
}

.aurora-toast-close {
    flex-shrink: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--muted-foreground, #64748b);
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 0.125rem;
    margin: -0.125rem -0.25rem 0 0;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.aurora-toast-close:hover {
    background: var(--muted, #f1f5f9);
    color: var(--foreground, #0f1c24);
}

@media (max-width: 540px) {
    .aurora-toast-container { top: 0.75rem; right: 0.75rem; left: 0.75rem; max-width: none; }
    .aurora-toast { min-width: 0; width: 100%; }
}

/* ============================================================
 * Aurora Confirm Dialog
 * ============================================================ */

.aurora-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 28, 36, 0.55);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.aurora-confirm-overlay.visible { opacity: 1; }

.aurora-confirm-dialog {
    background: var(--card, #fff);
    color: var(--card-foreground, #0f1c24);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 0.875rem;
    box-shadow: 0 20px 50px -20px rgba(15, 28, 36, 0.4);
    padding: 1.5rem;
    max-width: 26rem;
    width: 100%;
    transform: scale(0.97);
    transition: transform 0.2s ease;
}
.aurora-confirm-overlay.visible .aurora-confirm-dialog { transform: scale(1); }

.aurora-confirm-title {
    font-family: var(--font-display, var(--font, system-ui));
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--foreground, #0f1c24);
    letter-spacing: -0.01em;
}

.aurora-confirm-description {
    color: var(--muted-foreground, #64748b);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0 0 1.25rem;
}

.aurora-confirm-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.aurora-btn-cancel, .aurora-btn-confirm {
    padding: 0.5rem 1.125rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
    min-height: 2.25rem;
}

.aurora-btn-cancel {
    background: var(--muted, #f1f5f9);
    color: var(--foreground, #0f1c24);
    border: 1px solid var(--border, #e2e8f0);
}
.aurora-btn-cancel:hover { background: var(--accent, #e2e8f0); }

.aurora-btn-confirm {
    background: var(--primary, #1cbfa7);
    color: var(--primary-foreground, #07171a);
    border: 1px solid transparent;
}
.aurora-btn-confirm:hover { opacity: 0.92; }
.aurora-btn-confirm.destructive {
    background: var(--destructive, #e25555);
    color: #fff;
}

@media (max-width: 420px) {
    .aurora-confirm-actions { flex-direction: column-reverse; }
    .aurora-btn-cancel, .aurora-btn-confirm { width: 100%; }
}

/* ============================================================
 * Generate Page — Loading Overlay
 * ============================================================ */

.aurora-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.aurora-loading-overlay.visible { opacity: 1; visibility: visible; }

.aurora-loading-inner {
    text-align: center;
    max-width: 26rem;
}

.aurora-loading-orb {
    width: 84px;
    height: 84px;
    margin: 0 auto 1.5rem;
    position: relative;
    border-radius: 50%;
    background: var(--gradient-hero, linear-gradient(135deg, #1cbfa7, #2db8a1, #4aa9d3));
    box-shadow: 0 0 0 0 rgba(28, 191, 167, 0.4), 0 20px 40px -10px rgba(28, 191, 167, 0.4);
    animation: aurora-pulse 2.2s ease-in-out infinite;
}
.aurora-loading-orb::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
}
.aurora-loading-orb::before {
    content: '✦';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary, #1cbfa7);
    z-index: 1;
    animation: aurora-spin 4s linear infinite;
}

@keyframes aurora-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(28, 191, 167, 0.4), 0 20px 40px -10px rgba(28, 191, 167, 0.4); }
    50%      { box-shadow: 0 0 0 18px rgba(28, 191, 167, 0), 0 20px 40px -10px rgba(28, 191, 167, 0.4); }
}
@keyframes aurora-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.aurora-loading-step {
    font-family: var(--font-display, var(--font, system-ui));
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--foreground, #0f1c24);
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    min-height: 1.75rem;
    transition: opacity 0.4s ease;
}

.aurora-loading-substep {
    color: var(--muted-foreground, #64748b);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
    min-height: 1.5rem;
    transition: opacity 0.4s ease;
}

.aurora-loading-progress {
    width: 220px;
    height: 4px;
    background: var(--muted, #f1f5f9);
    border-radius: 999px;
    margin: 0 auto;
    overflow: hidden;
}
.aurora-loading-progress-bar {
    height: 100%;
    background: var(--gradient-hero, linear-gradient(90deg, #1cbfa7, #4aa9d3));
    border-radius: 999px;
    width: 0%;
    transition: width 0.6s ease;
}

.aurora-loading-fade { opacity: 0.3; }
