html {
    font-size: 14px;
}

html, body {
    font-family: 'Inter', 'Inter var', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

code {
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 0.85em;
}

/* MudBlazor tweaks to harmonise sizing with MangoQuiz */
.mud-main-content {
    min-height: 100vh;
    display: flex;
}

.mud-chip.mud-chip-size-medium {
    font-size: var(--mud-typography-default-size) !important;
}

.mud-chip.mud-chip-size-small {
    font-size: var(--mud-typography-body2-size) !important;
}

.mud-chip {
    font-size: var(--mud-typography-default-size);
}

.mud-tabs {
    background-color: var(--mud-palette-surface);
}

.mud-input-control > .mud-input-control-input-container > .mud-input-label-inputcontrol {
    font-size: var(--mud-typography-default-size) !important;
}

.mud-simple-table table * tr > td,
.mud-simple-table table * tr th {
    font-size: var(--mud-typography-default-size) !important;
}

.mud-table-cell {
    font-size: var(--mud-typography-default-size) !important;
}

.mud-table-dense .mud-table-cell {
    font-size: var(--mud-typography-body2-size) !important;
}

.mud-nav-link {
    white-space: normal !important;
}

.mud-nav-link.active:not(.mud-nav-link-disabled) {
    border-right: 3px solid var(--mud-palette-primary);
}

.mud-table.mud-data-grid .mud-toolbar {
    height: auto !important;
    padding: 1rem;
}

.mud-table.mud-data-grid .mud-table-pagination-toolbar {
    height: auto !important;
    padding: 0 !important;
}

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

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

/* -----------------------------------------------------------------------
   Responsive page header: title + inline controls that wrap on mobile
   ----------------------------------------------------------------------- */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.page-header__title {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: auto;
}

.page-header__search {
    width: 280px;
    max-width: 100%;
}

/* Utility: let long words/URLs wrap inside table cells instead of overflowing */
.break-word {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Truncated preview cells (used in logs tables on desktop) */
.log-prompt-cell,
.log-error-cell {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-error-cell {
    max-width: 480px;
}

/* -----------------------------------------------------------------------
   Mobile tweaks (MudBlazor already renders a stacked card view when
   <MudTable Breakpoint="..."> is below the breakpoint; we just clean up
   spacing + wrapping for our own custom cells.)
   ----------------------------------------------------------------------- */
@media (max-width: 600px) {
    /* Tighter container padding so content uses the narrow viewport fully */
    .mud-main-content .mud-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Drop desktop-only ellipsis clamps so the full preview is visible
       underneath the DataLabel on stacked cells. */
    .log-prompt-cell,
    .log-error-cell {
        max-width: none !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    /* Make the search field expand to fill the row once it wraps. */
    .page-header__search {
        width: 100%;
    }

    /* Allow long URLs/tokens stacked in card rows to wrap instead of
       overflowing the card. MudTable aligns cells to the right by default,
       which clips right-heavy content — allow it to wrap. */
    .mud-table.mud-table-smalldevices .mud-table-cell {
        word-break: break-word;
        overflow-wrap: anywhere;
    }
}
@media (min-width: 600px) {
  .mud-container--gutters {
    padding-left: 12px;
    padding-right: 12px;
  }
  .pb-sm-6, .py-sm-6 {
    padding-bottom: 12px !important;
    padding-top: 12px !important;
  }
}
.mb-4, .my-4 {
  margin-bottom: 8px !important;
}




/* ─────────────────────────────────────────────────────────────────────────
   Proxy log details dialog (Components/Pages/Logs/ProxyLogDetailsDialog.razor)

   These rules live here instead of a scoped *.razor.css file because the
   Admin App.razor does not currently link the project's
   AiReseller.Admin.styles.css bundle — Blazor CSS isolation is therefore
   inert for this project. Using a global stylesheet with a deliberately
   long `aird-pld-` prefix (AiReseller Admin → Proxy Log Details) keeps
   the styles isolated by naming convention instead.

   When the App.razor scoped-CSS link is fixed in a follow-up infra PR,
   these rules can move back to a .razor.css next to the component.
   ───────────────────────────────────────────────────────────────────── */

.aird-pld-section-title {
    font-weight: 600;
    margin: 0.25rem 0 0.5rem 0;
    display: flex;
    align-items: center;
}

.aird-pld-error-title {
    color: var(--mud-palette-error);
}

.aird-pld-section {
    background-color: var(--mud-palette-background-grey);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
}

.aird-pld-error {
    border-color: var(--mud-palette-error);
}

.aird-pld-field {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem;
    align-items: baseline;
    padding: 0.15rem 0;
}

.aird-pld-label {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.aird-pld-value {
    font-size: 0.9375rem;
    word-break: break-word;
}

.aird-pld-value code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
}

.aird-pld-block {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem;
    max-height: 360px;
    overflow: auto;
    padding: 0.75rem;
    margin: 0;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-word;
}

.aird-pld-tokens {
    margin-top: 0.75rem;
}
