/* sbwz-matrika app-specific styles — complements sbwz-tokens.css (the shared, unmodified
   design system file). Keeps sbwz-tokens.css copy-pasteable across SBwZ micro-services while
   this app's own form-field styling lives here, matching the design system's documented
   "Forms" spec exactly (input height 40px, border 1.5px solid --border, focus/error states,
   13px Barlow 600 label). */

.field {
    display: block;
    width: 100%;
    height: 40px;
    margin-bottom: 8px;
    padding: 0 10px;
    box-sizing: border-box;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--input-bg, var(--surface));
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
}

.field:focus {
    outline: none;
    border-color: var(--navy-500, var(--accent));
    box-shadow: 0 0 0 3px rgba(30, 61, 114, 0.10);
}

label.field-label {
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* htmx request indicator — shown only while a request this element triggered is in flight. */
.htmx-indicator {
    opacity: 0;
    transition: opacity 150ms ease-in;
    color: var(--text-muted);
    font-size: 13px;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Phase 2 htmx: shared panel (#modal) + toast (#toast) infrastructure — see
   docs/superpowers/specs/2026-09-15-htmx-phase2-design.md §2.1/2.2. The form-opening fragment
   returned to #modal renders both of the rules below as one backdrop+card block; #toast gets an
   out-of-band swap on any successful action. */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 16, 28, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}

.modal-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
}

/* Fades itself out with a pure CSS animation (no setTimeout/JS) and never intercepts a click,
   even while visible, since it's an ephemeral status message, not an interactive element. */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-on-accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .22);
    z-index: 1100;
    pointer-events: none;
    animation: toast-fade 4s ease-in forwards;
}

.toast-ok {
    background: var(--navy-700);
}

.toast-error {
    background: var(--accent);
}

@keyframes toast-fade {
    0%   { opacity: 0; transform: translate(-50%, 8px); }
    8%   { opacity: 1; transform: translate(-50%, 0); }
    75%  { opacity: 1; }
    100% { opacity: 0; }
}
