html {
    color-scheme: only light;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Only the active customer support viewport helper owns this attribute. */
@media (max-width: 599px) {
    body[data-support-keyboard-open="true"]:has([data-support-workspace]) .soba-mobile-navigation {
        display: none;
    }
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.mud-tooltip {
    max-width: 220px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #fff !important;
    background-color: #59a362 !important;
    white-space: normal;
    overflow-wrap: break-word;
    pointer-events: none;
    line-height: 1.35;
}

.soba-tooltip-content {
    max-width: 220px;
    white-space: normal;
    overflow-wrap: break-word;
    pointer-events: none;
}

.soba-navigation-drawer {
    overflow: hidden;
    transition:
        width 220ms cubic-bezier(0.22, 1, 0.36, 1),
        left 220ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 180ms ease !important;
}

.soba-navigation-drawer--desktop.mud-drawer--closed
    .soba-navigation-menu .mud-nav-link-text {
    display: none;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .soba-navigation-drawer {
        background: #f8fcf9 !important;
    }
}

@media (min-width: 600px) and (max-width: 600px) {
    .mud-layout.mud-drawer-close-mini-sm-left.mud-drawer-left-clipped-docked .mud-appbar {
        width: 100%;
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .soba-navigation-drawer,
    .soba-navigation-drawer ~ .mud-main-content,
    .mud-overlay {
        transition: none !important;
    }

    .mud-overlay .mud-overlay-scrim {
        animation: none !important;
        -webkit-animation: none !important;
    }
}

@media (forced-colors: active) {
    .soba-navigation-drawer {
        border-right: 1px solid CanvasText !important;
        background: Canvas !important;
        box-shadow: none !important;
    }
}

@media (pointer: coarse) {
    .soba-coordinated-tooltip,
    [data-soba-chart-tooltip] .apexcharts-inner {
        touch-action: pan-y pinch-zoom;
    }
}

.plant-selector-popover {
    width: min(520px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    border: 1px solid rgba(0, 48, 86, 0.14);
    border-radius: 16px !important;
    background: #fbfdfd;
    box-shadow: 0 12px 36px rgba(0, 48, 86, 0.14) !important;
}
.plant-selector-popover .mud-list { padding: 6px; }
.plant-selector-popover .mud-list-item { min-height: 48px; border-radius: 10px; }
.plant-selector-popover .mud-selected-item { color: #003056 !important; background: #edf6ef !important; }
@media (forced-colors: active) {
    .plant-selector-popover { color: CanvasText; background: Canvas; border-color: CanvasText; box-shadow: none !important; }
    .plant-selector-popover .mud-selected-item { color: HighlightText !important; background: Highlight !important; }
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcu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Q3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

@media (max-width: 599px) {
    .plant-selector-popover {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
    }
}

.soba-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Compact, labelled calendar controls stay inside the graph overlay. */
.soba-period-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    max-width: 100%;
    width: max-content;
    margin: 0;
}
.soba-period-field--compact { width: max-content; max-width: 100%; }
.soba-period-label {
    display: block;
    margin: 0;
    color: #496173;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .015em;
}
.soba-period-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    width: 100%;
    min-height: 52px;
    border: 1px solid #c5d5df;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 48, 86, .025);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.soba-period-input-wrap:hover { border-color: #8ba9bc; }
.soba-period-input-wrap:focus-within {
    border-color: #1e5a7a;
    box-shadow: 0 0 0 3px rgba(30, 90, 122, .15);
}
.soba-period-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 50px;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    outline: none;
    background: transparent;
    color: #10324a;
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    color-scheme: light;
}
select.soba-period-input {
    appearance: none;
    cursor: pointer;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23496173' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 16px;
}
.soba-period-input--icon { padding-left: 40px; }
.soba-period-icon {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 18px;
    color: #567083;
    pointer-events: none;
}
.soba-period-input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px #aa3745; }
.soba-period-input::-webkit-date-and-time-value { text-align: left; }
.soba-graph-subtitle { margin: 4px 0 0; color: #567083; font-size: .8rem; line-height: 1.5; }
.soba-period-panel {
    display: flex;
    width: max-content;
    max-width: 100%;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    padding: 8px;
    border: 1px solid #dbe6ee;
    border-radius: 10px;
    background: #f5f9fc;
}
.soba-period-mode { min-width: 0; margin: 0; padding: 0; border: 0; }
.soba-period-mode legend { margin-bottom: 5px; padding: 0; }
.soba-period-segments {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: 2px;
    padding: 0;
    border: 1px solid #dbe6ee;
    border-radius: 12px;
    background: #eaf1f6;
}
.soba-period-option { position: relative; min-width: 0; margin: 0; cursor: pointer; }
.soba-period-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    clip-path: inset(50%);
}
.soba-period-option > span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 40px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #496173;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.25;
    transition: background-color .15s ease, color .15s ease;
}
.soba-period-option:hover > span { background: #dfeaf2; }
.soba-period-option input:checked + span { background: #10324a; color: #fff; font-weight: 700; box-shadow: 0 2px 5px rgba(16, 50, 74, .12); }
.soba-period-option input:focus-visible + span { outline: 2px solid #1e5a7a; outline-offset: 3px; }
.soba-calendar-field { position: relative; }
.soba-calendar-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 6px 8px;
    border: 1px solid #c5d5df;
    border-radius: 8px;
    background: #fff;
    color: #10324a;
    font: inherit;
    font-size: .8rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}
.soba-calendar-trigger > span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soba-calendar-trigger > svg { flex: 0 0 17px; width: 17px; height: 17px; color: #567083; }
.soba-calendar-trigger > .soba-calendar-chevron { flex-basis: 12px; width: 12px; height: 12px; }
.soba-calendar-trigger:hover:not(:disabled) { border-color: #8ba9bc; background: #fbfdff; }
.soba-calendar-trigger[aria-expanded="true"] { border-color: #1e5a7a; }
.soba-calendar-trigger[aria-invalid="true"] { border-color: #aa3745; }
.soba-calendar-trigger:disabled { opacity: .55; cursor: default; }
.soba-calendar-trigger:focus-visible, .soba-calendar-popover button:focus-visible {
    outline: 2px solid #1e5a7a;
    outline-offset: 2px;
}
.soba-calendar-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 8;
    width: 310px;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    overflow: auto;
    border: 1px solid #c5d5df;
    border-radius: 12px;
    background: #fff;
    color: #10324a;
    box-shadow: 0 8px 30px rgba(0, 48, 86, .16), 0 2px 5px rgba(0, 48, 86, .06);
}
.soba-calendar-caption { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 2px 14px; border-bottom: 1px solid #e6edf3; color: #496173; font-size: .75rem; font-weight: 600; }
.soba-calendar-range-hint { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 10px 14px; background: #f5f9fc; color: #496173; font-size: .75rem; line-height: 1.4; }
.soba-calendar-range-hint strong { color: #10324a; font-weight: 600; }
.soba-calendar-close { display: grid; place-items: center; width: 40px; height: 40px; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: #567083; cursor: pointer; }
.soba-calendar-close svg { width: 18px; height: 18px; }
.soba-calendar-close:hover { background: #edf3f7; }
.soba-calendar-popover .mud-picker-static,
.soba-calendar-popover .mud-picker-content { min-width: 0; width: 100%; }
.soba-calendar-popover .mud-picker-calendar-container,
.soba-calendar-popover .mud-picker-month-container { width: 100%; }
.soba-calendar-popover .mud-picker-calendar-content { padding-left: 6px; padding-right: 6px; }
.soba-calendar-popover .mud-day { max-width: 100%; }
.soba-calendar-popover .mud-picker-month:has(.mud-picker-month-selected) { border-radius: 8px; background: #10324a; }
.soba-calendar-popover .mud-picker-month-selected { color: #fff !important; font-size: 1rem; font-weight: 600; }
.soba-calendar-popover button.soba-calendar-preview-in-range { background: #e8f3ec; color: #10324a; }
.soba-calendar-popover button.soba-calendar-preview-edge { background: #10324a !important; color: #fff !important; }
.soba-calendar-popover button.soba-calendar-preview-edge .mud-typography,
.soba-calendar-popover button.soba-calendar-preview-edge .mud-picker-month-label { color: #fff !important; }
.soba-calendar-popover button.soba-calendar-preview-in-range .mud-typography { color: #10324a !important; }
.soba-calendar-popover button.mud-picker-month.soba-calendar-preview-edge { border-radius: 8px; }
.soba-calendar-year-navigation { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; }
.soba-calendar-year-navigation strong { font-size: .9rem; font-weight: 600; }
.soba-calendar-year-navigation button { width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: #10324a; font-size: 1.5rem; cursor: pointer; }
.soba-calendar-year-navigation button:disabled { opacity: .35; cursor: default; }
.soba-calendar-years { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px 12px 12px; }
.soba-calendar-years button { min-height: 44px; border: 0; border-radius: 8px; background: #fff; color: #10324a; font: inherit; font-size: .9rem; cursor: pointer; }
.soba-calendar-years button:hover:not(:disabled), .soba-calendar-year-navigation button:hover:not(:disabled) { background: #edf3f7; }
.soba-calendar-years .soba-calendar-selected { background: #10324a; color: #fff; font-weight: 600; }
.soba-calendar-years .soba-calendar-range-edge { background: #10324a; color: #fff; font-weight: 600; }
.soba-calendar-years .soba-calendar-in-range { background: #e8f3ec; }
.soba-calendar-years .soba-calendar-selected:hover { background: #1e5a7a; }
.soba-calendar-years button:disabled { opacity: .3; cursor: default; }

.soba-power-period-summary { grid-column: 1 / -1; }
.soba-graph-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #567083;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.soba-graph-icon svg { width: 20px; height: 20px; flex: 0 0 20px; }
.soba-graph-icon:hover:not(:disabled) { color: #10324a; background: #edf3f7; }
.soba-graph-icon:focus-visible { color: #10324a; outline: 2px solid #1e5a7a; outline-offset: 1px; }
.soba-graph-icon:disabled { color: #8a9ba7; cursor: default; }
.soba-graph-icon[aria-busy="true"] { cursor: wait; }
.soba-graph-icon::after {
    content: attr(data-soba-tooltip);
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 8;
    display: none;
    width: max-content;
    max-width: min(240px, calc(100vw - 48px));
    padding: 7px 10px;
    border-radius: 6px;
    background: #10324a;
    color: #fff;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(16, 50, 74, .15);
}
.soba-graph-icon:hover::after,
.soba-graph-icon:focus-visible::after { display: block; }
.soba-graph-export-host { display: inline-flex; position: relative; align-items: center; }
.soba-graph-export-host [role="alert"] { position: absolute; right: 0; top: 100%; width: 220px; z-index: 5; }
.soba-period-error { flex-basis: 100%; margin: 0; color: #9d2531; font-size: .8rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) {
    .soba-period-input-wrap, .soba-period-option > span { transition: none; }
}
@media (forced-colors: active) {
    .soba-period-input-wrap, .soba-period-panel, .soba-period-segments { border-color: CanvasText; background: Canvas; }
    select.soba-period-input { appearance: auto; background-image: none; }
    .soba-period-input { color: CanvasText; }
    .soba-period-input-wrap:focus-within { outline: 2px solid Highlight; }
    .soba-period-option input:checked + span { border-color: Highlight; background: Highlight; color: HighlightText; }
    .soba-period-option input:focus-visible + span, .soba-calendar-trigger:focus-visible, .soba-graph-icon:focus-visible { outline-color: Highlight; }
    .soba-graph-icon { color: ButtonText; }
    .soba-graph-icon:disabled { color: GrayText; }
    .soba-graph-icon::after { border: 1px solid CanvasText; background: Canvas; color: CanvasText; }
}
