/*
  Deliberately tiny: layout only, no colour and no type. The Radzen theme owns spacing and every
  component; rules here are limited to layout that no component provides. Do not add element-level
  or framework-level overrides - a rule here that fights the theme breaks on the next theme change,
  and theme switching is a supported feature.

  Colour and typeface have one home: wwwroot/css/brand.css, which re-points the theme's own tokens
  and is linked after it. The single scoped exception is Components/Pages/Login.razor.css, the
  sign-in screen's branded layout, which spends the --rps-* tokens brand.css publishes.

  One rule below does carry colour: #blazor-error-ui. It has to, because it is the one thing that
  must stay legible when the circuit is dead - and it spends the theme's own danger tokens rather
  than literals, so it still follows the theme.
*/

/*
  Shown by Blazor itself when a circuit fails; hidden until then. The framework only toggles
  `display`, so everything else about it is ours.
*/

#blazor-error-ui {
    display: none;
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background-color: var(--rz-danger-lighter);
    color: var(--rz-danger-darker);
    border-top: 3px solid var(--rz-danger);
    box-shadow: 0 -0.25rem 0.75rem rgba(0, 0, 0, 0.2);
}

#blazor-error-ui .reload {
    color: inherit;
    margin-inline-start: 0.5rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: inline-end;
    font-size: 1.25rem;
    line-height: 1;
}

/*
  The plan calendar. A month grid is genuinely a table - seven columns of dates, with rows that
  mean whole weeks - so it is one, rather than a grid of divs pretending to be one. Only layout
  lives here; colour comes from the Radzen theme tokens so both themes work.
*/

.rps-calendar {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.rps-calendar th {
    padding: 0.4rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--rz-base-300);
}

.rps-calendar-cell {
    height: 6.5rem;
    vertical-align: top;
    padding: 0.35rem;
    border: 1px solid var(--rz-base-300);
    cursor: pointer;
}

.rps-calendar-cell:hover {
    background-color: var(--rz-base-200);
}

.rps-calendar-weekend {
    background-color: var(--rz-base-100);
}

/* Dates from the months either side, and dates outside the plan: visible for context, not clickable. */
.rps-calendar-outside {
    height: 6.5rem;
    vertical-align: top;
    padding: 0.35rem;
    border: 1px solid var(--rz-base-200);
    opacity: 0.35;
    cursor: default;
}

.rps-calendar-date {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.rps-calendar-demand {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
