/* Base styling is provided by Tailwind (dist/admin.css). Only the Blazor
   circuit error banner and validation helpers remain here. */

#blazor-error-ui {
    color-scheme: light only;
    background: #ffe9a8;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.9rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Ein Fehler ist aufgetreten.";
    }

/* Suppress the focus outline on headings programmatically focused after
   navigation (FocusOnNavigate) – standard Blazor template behaviour. */
h1:focus, h2:focus, [tabindex]:focus {
    outline: none;
}

/* EditForm validation states */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid var(--color-bullmann-wine-red, #721b24);
}

.validation-message {
    color: var(--color-bullmann-wine-red, #721b24);
}

/* Rich-text (TinyMCE) editor – round the self-styled oxide shell to match inputs */
.rte-wrapper .tox-tinymce {
    border-color: rgba(166, 123, 91, 0.3); /* warm-oak/30 */
    border-radius: 0.5rem;
}

/* "Saved" confirmation – a brief pop so it's obvious the action succeeded. */
@keyframes save-pop {
    0%   { opacity: 0; transform: scale(0.9); }
    60%  { opacity: 1; transform: scale(1.04); }
    100% { opacity: 1; transform: scale(1); }
}
.save-confirm {
    animation: save-pop 0.35s ease-out;
}
@media (prefers-reduced-motion: reduce) {
    .save-confirm { animation: none; }
}

/* Global action feedback toasts (top-right), driven by ToastService. */
@keyframes toast-in {
    0%   { opacity: 0; transform: translateX(1.5rem); }
    100% { opacity: 1; transform: translateX(0); }
}
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    border-radius: 0.6rem;
    border: 1px solid;
    box-shadow: 0 10px 30px rgba(44, 46, 48, 0.15);
    font-weight: 500;
    pointer-events: auto;
    animation: toast-in 0.3s ease-out;
}
.toast-success { background: #dcfce7; color: #166534; border-color: #86efac; }
.toast-error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.toast-info    { background: #fbf9f4; color: #2c2e30; border-color: rgba(166, 123, 91, 0.3); }
.toast-close { display: inline-flex; opacity: 0.55; background: none; border: 0; cursor: pointer; color: inherit; }
.toast-close:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .toast { animation: none; }
}
