/* LadeCockpitPro's own styles. Colours, type and sizes come from pro.css (--pro-*), never hard-coded;
   amber stays reserved for the running clock of the *Pro design system and is not used here. */

.lc-page {
    padding-top: 24px;
    padding-bottom: 24px;
}

.lc-page-title {
    margin-bottom: 16px;
}

.lc-section-title {
    margin-top: 32px;
    margin-bottom: 12px;
}

/* FocusOnNavigate puts the focus on the page heading for screen readers; it is not a control. */
h1:focus {
    outline: none;
}

.lc-disclaimer {
    margin-bottom: 24px;
}

/* In-page cards stand on a 1 px Linie border, no shadow (as in FlurfunkPro / ZeitflussPro). */
.lc-card {
    padding: 20px 24px;
    border-color: var(--pro-color-line);
    height: 100%;
}

.lc-vin {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.lc-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.lc-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lc-stat-label {
    font-size: var(--pro-font-size-caption);
    color: var(--pro-color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lc-stat-value {
    font-size: var(--pro-font-size-h3);
    font-weight: var(--pro-font-weight-semibold);
    font-variant-numeric: tabular-nums;
    color: var(--pro-color-text-primary);
}

.lc-stats-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lc-stats-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 760px) {
    .lc-stats-4,
    .lc-stats-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Filter row of the Ladevorgänge page and two-column forms. */
.lc-filters,
.lc-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.lc-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lc-note {
    display: block;
    margin-top: 12px;
}

.lc-inline-form {
    display: inline;
}

.lc-footer {
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid var(--pro-color-line);
    font-size: var(--pro-font-size-caption);
    color: var(--pro-color-text-secondary);
}

.lc-footer a {
    color: inherit;
}

/* Statically rendered Identity forms: plain inputs styled with the tokens. */
.lc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lc-field label {
    font-size: var(--pro-font-size-body2);
    font-weight: var(--pro-font-weight-semibold);
    color: var(--pro-color-text-primary);
}

.lc-input {
    font: inherit;
    font-size: var(--pro-font-size-body1);
    padding: 10px 12px;
    border: 1px solid var(--pro-color-line);
    border-radius: var(--pro-radius-base);
    background: var(--pro-color-surface);
    color: var(--pro-color-text-primary);
}

.lc-input:focus-visible {
    outline: 2px solid var(--pro-color-primary);
    outline-offset: 1px;
    border-color: var(--pro-color-primary);
}

.lc-input.invalid {
    border-color: var(--pro-color-error);
}

.lc-validation {
    font-size: var(--pro-font-size-body2);
    color: var(--pro-color-error);
}

.lc-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--pro-font-size-body2);
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    padding: 12px 16px;
    background: var(--pro-color-surface);
    color: var(--pro-color-text-primary);
    border-top: 1px solid var(--pro-color-line);
}

#blazor-error-ui .reload {
    margin-left: 12px;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 16px;
    top: 10px;
}

.lc-role-select {
    min-width: 200px;
    max-width: 240px;
}

/* Price field next to the role select: wider, so label and unit never meet. */
.lc-price-field {
    min-width: 240px;
    max-width: 300px;
}

/* Form fields: a little smaller text, and a label that never runs into the unit (ct/kWh, km, €/Jahr …). */
.lc-card .mud-input-control .mud-input-slot,
.lc-card .mud-input-control .mud-select-input {
    font-size: 0.9375rem;
}

.lc-card .mud-input-control .mud-input-label {
    font-size: 0.9375rem;
}

.lc-card .mud-input-control:has(.mud-input-adornment-end) .mud-input-label-outlined {
    max-width: calc(100% - 4.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lc-card .mud-input-control .mud-input-adornment-end {
    font-size: 0.8125rem;
    white-space: nowrap;
}

/* Vergleichsrechner (M3). */
.lc-headline {
    font-weight: var(--pro-font-weight-semibold);
}

.lc-list {
    margin: 4px 0 0;
    padding-left: 20px;
}

.lc-subtle {
    font-size: var(--pro-font-size-caption);
    color: var(--pro-color-text-secondary);
}

.lc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--pro-font-size-body2);
}

.lc-table th,
.lc-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--pro-color-line);
    text-align: left;
}

.lc-table th.lc-num,
.lc-table td.lc-num {
    text-align: right;
}

/* Present for screen readers only (the chart's data table). */
.lc-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Public pages (M5): landing page, Impressum, Datenschutz. Page width and the shared bits of the sections. */
.lc-wrap {
    width: min(100% - 2 * clamp(16px, 4vw, 48px), 1120px);
    margin-inline: auto;
}

.lc-prose {
    padding: 48px 0 72px;
    max-width: 46rem;
}

.lc-prose h1 {
    font-size: var(--pro-font-size-h1);
    line-height: var(--pro-font-line-height-h1);
    margin: 0 0 16px;
    color: var(--pro-color-text-primary);
}

.lc-prose h2 {
    font-size: var(--pro-font-size-h2);
    line-height: var(--pro-font-line-height-h2);
    margin: 32px 0 8px;
    color: var(--pro-color-text-primary);
}

.lc-prose h3 {
    font-size: var(--pro-font-size-h3);
    margin: 20px 0 6px;
}

.lc-prose p {
    margin: 0 0 12px;
}

.lc-prose p,
.lc-prose li {
    font-size: var(--pro-font-size-body1);
    line-height: var(--pro-font-line-height-body1);
    color: var(--pro-color-text-primary);
}

.lc-prose ul {
    padding-left: 22px;
}

.lc-placeholder {
    display: inline-block;
    padding: 2px 8px;
    border: 1px dashed var(--pro-color-error);
    border-radius: var(--pro-radius-base);
    color: var(--pro-color-error);
    font-weight: var(--pro-font-weight-semibold);
    font-size: var(--pro-font-size-body2);
}

.lc-danger {
    border-color: var(--pro-color-error) !important;
}

.lc-invite-link {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: var(--pro-font-size-body2);
    word-break: break-all;
}

.lc-details summary {
    cursor: pointer;
    font-size: var(--pro-font-size-body2);
    color: var(--pro-color-primary);
    padding: 4px 0;
}

.lc-details[open] summary {
    margin-bottom: 12px;
}
