/* Lightcurve processor: one token block; Python carries class names only. */

:root {
    --lcp-text-sm: 0.75rem;
    --lcp-text-md: 0.85rem;
    --lcp-space-xs: 0.25rem;
    --lcp-space-sm: 0.375rem;
    --lcp-space-md: 0.5rem;
    --lcp-space-lg: 0.75rem;
    --lcp-page-header-gap: 1.25rem;
    --lcp-page-top-gap: 1.25rem;
    --lcp-radius: 0.3rem;
    --lcp-caution: #c05621;
    --lcp-caution-hover: #8f3d13;
    --lcp-plot-height: clamp(20rem, 55vh, 40rem);
    /* ZP flux row: enlarge value vs unit (tweak these two). */
    --lcp-photcal-zp-value-flex: 4 1 0;
    --lcp-photcal-zp-unit-flex: 0 0 3.5rem;
}

.lcp-page {
    font-size: var(--lcp-text-md);
    padding-top: var(--lcp-page-top-gap);
}

/* Bootstrap form-control / form-select default to 1rem (sm is 0.875rem).
 * Inherit the page token so every input, select, radio and switch matches.
 */
.lcp-page .form-control,
.lcp-page .form-control-sm,
.lcp-page .form-select,
.lcp-page .form-select-sm,
.lcp-page .input-group-text,
.lcp-page .form-check-label,
.lcp-page .btn:not(.lcp-page-about-btn):not(.lcp-help-btn),
.lcp-page .alert,
.lcp-page .popover {
    font-size: inherit;
}

.lcp-page-title {
    font-size: 1.5rem;
    line-height: 1.25;
    margin-bottom: 0;
}

.lcp-page-header {
    margin-bottom: var(--lcp-page-header-gap);
    padding-bottom: var(--lcp-space-lg);
    border-bottom: 1px solid #dee2e6;
}

.lcp-page-about-btn {
    font-size: 1rem;
    padding: var(--lcp-space-sm) var(--lcp-space-lg);
    font-weight: 600;
}

.lcp-section-label {
    font-weight: 400;
}

.lcp-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0;
}

.lcp-data-hub {
    margin-bottom: var(--lcp-page-header-gap);
}

.lcp-data-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--lcp-space-lg);
    row-gap: var(--lcp-space-xs);
}

.lcp-data-slot {
    display: flex;
    align-items: center;
    gap: var(--lcp-space-xs);
    flex: 1 1 20rem;
    min-width: 0;
}

.lcp-upload-target {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    cursor: pointer;
    padding: var(--lcp-space-xs);
    border: 1px dashed transparent;
    border-radius: var(--lcp-radius);
}

.lcp-upload-target-active {
    border-color: #446e9b;
    background-color: rgba(68, 110, 155, 0.08);
}

.lcp-upload-target-reject {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.08);
}

.lcp-upload-target-inner {
    display: flex;
    align-items: center;
    gap: var(--lcp-space-md);
    width: 100%;
    min-width: 0;
}

.lcp-upload-target .btn {
    flex: 0 0 auto;
}

.lcp-upload-name,
.lcp-upload-status {
    display: flex;
    align-items: center;
    gap: var(--lcp-space-xs);
    flex: 1 1 auto;
    min-width: 0;
}

.lcp-upload-name-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: left;
}

.lcp-upload-detail:empty {
    display: none;
}

.lcp-upload-detail {
    margin-top: var(--lcp-space-xs);
    padding: var(--lcp-space-md);
    border: 1px solid #f5c2c7;
    border-radius: var(--lcp-radius);
    background-color: #fdf2f3;
}

.lcp-sidebar-col {
    padding-right: var(--lcp-space-lg);
}

.lcp-sidebar {
    padding: 0;
}

.lcp-page .lcp-workflow-accordion .accordion-button {
    font-size: var(--lcp-text-md);
    font-weight: 700;
    padding: var(--lcp-space-md) var(--lcp-space-lg);
    line-height: 1.25;
    box-shadow: none;
}

.lcp-page .lcp-workflow-accordion .accordion-button:focus {
    box-shadow: none;
}

.lcp-page .lcp-workflow-accordion .accordion-body {
    padding: var(--lcp-space-lg);
}

.lcp-drawer-body > .lcp-sidebar-block:last-child {
    margin-bottom: 0;
}

.lcp-sidebar .form-check,
.lcp-plot-toolbar .form-check {
    margin-bottom: 0;
    min-height: 0;
}

.lcp-sidebar-block {
    display: flex;
    flex-direction: column;
    gap: var(--lcp-space-xs);
    margin-bottom: var(--lcp-space-lg);
}

/* Collapsed drawer sections sit closer than full control blocks. */
.lcp-drawer-collapse-section {
    margin-top: 0;
    margin-bottom: var(--lcp-space-sm);
}

.lcp-drawer-collapse-section .lcp-sidebar-heading-row {
    margin-bottom: 0;
}

/* Space above a collapse: drop the previous block's bottom margin entirely. */
.lcp-sidebar-block:has(+ .lcp-drawer-collapse-section) {
    margin-bottom: 0;
}

.lcp-sidebar-heading-row {
    display: flex;
    align-items: center;
    gap: var(--lcp-space-xs);
    margin-bottom: var(--lcp-space-xs);
}

.lcp-drawer-collapse-btn {
    padding: 0;
    margin: 0;
    line-height: 1;
    color: inherit;
}

.lcp-drawer-collapse-btn:hover,
.lcp-drawer-collapse-btn:focus-visible {
    color: inherit;
}

.lcp-drawer-collapse-body {
    display: flex;
    flex-direction: column;
    gap: var(--lcp-space-xs);
}

/* Calibration ZP flux: value grows; unit stays narrow. Tokens in :root above. */
.lcp-page .skvo-photcal-zp-flux-group .skvo-photcal-zp-value {
    flex: var(--lcp-photcal-zp-value-flex);
    min-width: 0;
}

.lcp-page .skvo-photcal-zp-flux-group .skvo-photcal-zp-unit {
    flex: var(--lcp-photcal-zp-unit-flex);
    min-width: 0;
}

.lcp-field-help {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.lcp-help-btn {
    display: inline;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0 0.1em;
    margin: 0;
    color: #446e9b;
    font-family: "Comic Sans MS", "Comic Sans", cursive;
    font-size: 1.05em;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.lcp-help-btn:hover,
.lcp-help-btn:focus-visible {
    color: #2a4566;
    text-decoration: underline;
    outline: none;
}

.lcp-help-popover {
    max-width: min(24rem, 92vw);
}

.lcp-sidebar-btn-stack {
    display: flex;
    flex-direction: column;
    gap: var(--lcp-space-xs);
}

.lcp-sidebar-btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--lcp-space-xs);
}

.lcp-registry-action {
    padding: 0;
    text-decoration: none;
    white-space: nowrap;
    flex: 0 0 auto;
}

.lcp-plot-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--lcp-space-md);
    margin-bottom: var(--lcp-space-md);
}

.lcp-plot-toolbar-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--lcp-space-xs);
}

.lcp-plot-toolbar-radios {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--lcp-space-md);
    font-size: var(--lcp-text-md);
}

.lcp-plot-column {
    position: relative;
}

.lcp-plot-alert:empty,
.lcp-plot-alert:not(:has(.show)) {
    display: none;
}

.lcp-plot-alert {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    max-width: min(32rem, 72%);
    pointer-events: none;
}

.lcp-plot-alert .alert {
    margin-bottom: 0;
    pointer-events: auto;
}

.lcp-drawer-collapse-title {
    font-weight: 700;
}

.lcp-upload-filename {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lcp-inline-upload {
    flex: 0 0 auto;
    width: auto;
}

.lcp-param-block:empty {
    display: none;
}

.lcp-graph-shell {
    display: block;
}

.lcp-delete-mode .js-plotly-plot,
.lcp-delete-mode .js-plotly-plot .plotly,
.lcp-delete-mode .js-plotly-plot .cursor-pointer,
.lcp-delete-mode .js-plotly-plot .cursor-crosshair {
    cursor: pointer !important;
}

.js-plotly-plot.lcp-extrema-pick,
.js-plotly-plot.lcp-extrema-pick .plotly,
.js-plotly-plot.lcp-extrema-pick .cursor-pointer,
.js-plotly-plot.lcp-extrema-pick .cursor-crosshair,
.js-plotly-plot.lcp-extrema-pick .nsewdrag {
    cursor: crosshair !important;
}

.js-plotly-plot.lcp-tilt-mode,
.js-plotly-plot.lcp-tilt-mode .plotly,
.js-plotly-plot.lcp-tilt-mode .cursor-pointer,
.js-plotly-plot.lcp-tilt-mode .cursor-crosshair,
.js-plotly-plot.lcp-tilt-mode .nsewdrag {
    cursor: crosshair !important;
}

.js-plotly-plot.lcp-interval-mark,
.js-plotly-plot.lcp-interval-mark .plotly,
.js-plotly-plot.lcp-interval-mark .cursor-pointer,
.js-plotly-plot.lcp-interval-mark .cursor-crosshair,
.js-plotly-plot.lcp-interval-mark .nsewdrag {
    cursor: pointer !important;
}

.lcp-graph {
    height: var(--lcp-plot-height);
}

.lcp-plot-stack {
    display: flex;
    flex-direction: column;
    gap: var(--lcp-space-lg);
}

.lcp-plot2-accordion {
    margin-bottom: 0;
}

.lcp-plot2-accordion .accordion-body {
    padding-top: var(--lcp-space-md);
}

.lcp-page .lcp-btn-caution-outline {
    --bs-btn-color: var(--lcp-caution);
    --bs-btn-border-color: var(--lcp-caution);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--lcp-caution);
    --bs-btn-hover-border-color: var(--lcp-caution);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--lcp-caution-hover);
    --bs-btn-active-border-color: var(--lcp-caution-hover);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--lcp-caution);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--lcp-caution);
}
