/* Form fields kept as native inputs (static SSR POST) styled to match Material. */
.splitit-form .field {
    margin-bottom: 1.25rem;
}

.splitit-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--mud-palette-text-secondary, #616161);
    margin-bottom: 0.35rem;
}

.splitit-form input,
.splitit-form select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--mud-palette-text-primary, #424242);
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    background: var(--mud-palette-surface, #fff);
    box-sizing: border-box;
}

.splitit-form input:focus,
.splitit-form select:focus {
    outline: none;
    border-color: var(--mud-palette-primary, #2e7d68);
    box-shadow: 0 0 0 1px var(--mud-palette-primary, #2e7d68);
}

.splitit-form .field-error,
.validation-message {
    color: var(--mud-palette-error, #f44336);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.invalid {
    border-color: var(--mud-palette-error, #f44336) !important;
}

/* Native submit button styled like a MudBlazor filled button (works in static SSR). */
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.5;
    color: #fff;
    background-color: var(--mud-palette-primary, #2e7d68);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
    transition: background-color .2s, box-shadow .2s;
}

.btn-submit:hover {
    background-color: #25624f;
}

.btn-submit.full {
    width: 100%;
}

.btn-submit.success {
    background-color: var(--mud-palette-success, #2e7d32);
}

/* Fixed bottom navigation, visible only on narrow viewports (phones). The
   top app-bar nav is too cramped at that width; switch to large tap targets. */
.splitit-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--mud-palette-surface, #fff);
    border-top: 1px solid var(--mud-palette-lines-default, #E5E7EB);
    z-index: 1100;
    padding: 0.35rem 0.5rem;
    justify-content: space-around;
    align-items: center;
}

.splitit-bottom-nav a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: var(--mud-palette-text-secondary, #6B7280);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    flex: 1;
    gap: 0.15rem;
}

.splitit-bottom-nav a:hover,
.splitit-bottom-nav a:focus-visible {
    color: var(--mud-palette-primary, #2E7D68);
}

/* Floating "add expense" button (pool details). Fixed bottom-right; on phones
   it must sit above the fixed bottom nav, otherwise the two overlap. */
.splitit-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1200; /* above the bottom nav (1100) */
}

@media (max-width: 599px) {
    .splitit-bottom-nav { display: flex; }
    /* Reserve vertical space so the fixed nav doesn't hide trailing content. */
    main.mud-main-content { padding-bottom: 72px !important; }
    /* Top-bar shortcuts that the bottom nav already covers — declutter the
       narrow viewport where these wrap badly into the SplitIt brand button. */
    .splitit-top-nav-hide-mobile { display: none !important; }
    /* Clear the bottom nav (72px reserved) so the FAB doesn't overlap it. */
    .splitit-fab { bottom: 88px; }
}

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

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }
