@import url('bootstrap-icons/font/bootstrap-icons.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html, body {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.button-link {
    text-decoration: unset;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 0.625rem;
}

    .title.title-secondary {
        padding-top: 0.313rem;
        padding-bottom: 0;
        color: var(--bs-secondary-color, #6c757d);
    }

.title-header-text {
    font-size: 11px;
    line-height: 3rem;
    font-weight: 600;
    letter-spacing: 0rem;
    padding: 0.3125rem 0;
}

.title-content-text {
    font-size: 11px;
    font-weight: 400;
    line-height: 2.5rem;
    letter-spacing: 0rem;
}

.main-content {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    height: 100%;
    width: 100%;
    overflow-y: auto;
}

.block-content {
    width: 31.25rem;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-width: 100%;
}

.icon {
    width: var(--icon-width);
    height: var(--icon-height);
    background-color: currentcolor;
    mask-position: center center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-image: var(--icon-mask-image);
    mask-image: var(--icon-mask-image);
}


/* Rounded edges for all DevExpress input fields */

/* TextBox, MemoEdit, SpinEdit, DateEdit */
.dxbl-text-edit,
.dxbl-memo,
.dxbl-spin-edit,
.dxbl-date-edit {
    border-radius: 0.375rem !important;
    overflow: hidden;
}

/* ComboBox / SelectBox / ListEdit */
.dxbl-combo-box,
.dxbl-list-edit {
    border-radius: 0.375rem !important;
    overflow: hidden;
}

/* Tag Box */
.dxbl-tag-box {
    border-radius: 0.375rem !important;
    overflow: hidden;
}

/* The inner input element */
.dxbl-edit-input-container,
.dxbl-text-edit-input-container {
    border-radius: 0.375rem !important;
    overflow: hidden;
}

/* Buttons inside fields (clear button, calendar icon etc.) */
.dxbl-edit-btn:last-child {
    border-radius: 0 0.375rem 0.375rem 0 !important;
}

/* Popup dropdowns */
.dxbl-dropdown-body {
    border-radius: 0.375rem !important;
}

/* =====================================================
   PRODUCTION CONFIRMATION — LIGHT MODE
   ===================================================== */

:root {
    --pc-accent: #2563eb;
    --pc-accent-subtle: rgba(37,99,235,0.08);
    --pc-recommended-bg: rgba(37,99,235,0.07);
    --pc-recommended-txt: #1d4ed8;
    --pc-badge-bg: rgba(180,83,9,0.08);
    --pc-badge-txt: #b45309;

    --pc-bg-primary:     #ffffff;
    --pc-bg-secondary:   #f8fafc;
    --pc-text-primary:   #1e293b;
    --pc-text-secondary: #64748b;
    --pc-border:         #e2e8f0;
}

/* PAGE */
.pc-page {
    padding: 16px;
    background: #f8fafc;
    height: 100%;
    width: 100%;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pc-note {
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
}

.pc-note-inline {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 8px;
}

/* GRID */
.pc-grid .dxbl-grid {
    background: #ffffff;
    color: #1e293b;
    border-color: #e2e8f0;
    font-size: 10px;
}

.pc-grid .dxbl-grid-header-row {
    background: var(--pc-bg-secondary);
    color: var(--pc-text-secondary);
    font-size: 10px;
}

.pc-grid .dxbl-grid-data-row:hover td {
    background: #f8fafc;
}

.pc-grid .dxbl-grid-data-row td {
    font-size: 10px;
    color: var(--pc-text-primary);
    border-color: var(--pc-border);
}

/* REEL GRID RECOMMENDED ROW */
/* ── DxTextBox and DxSpinEdit global font size ── */
.dxbl-text-edit input,
.dxbl-text-edit textarea,
.dxbl-spin-edit input,
.dxbl-text-edit,
.dxbl-spin-edit,
.dxbl-fl-item-caption,
.dxbl-fl-item-caption label {
    font-size: 11px !important;
}

/* ── DxGrid and DxPopup global font size ── */
.dxbl-grid,
.dxbl-grid th,
.dxbl-grid td,
.dxbl-grid .dxbl-grid-header-row,
.dxbl-grid .dxbl-grid-data-row,
.dxbl-grid .dxbl-grid-footer-row,
.dxbl-grid .dxbl-pager {
    font-size: 11px !important;
}

.dxbl-popup .dxbl-popup-body,
.dxbl-popup .dxbl-popup-header,
.dxbl-popup .dxbl-popup-footer,
.dxbl-popup .dxbl-popup-body * {
    font-size: 11px !important;
}

.reel-recommended {
    color: var(--pc-recommended-txt);
    font-weight: 600;
}

/* DELIVERY TABLE (replaces DxGrid for per-row edit control) */
.del-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.del-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-align: left;
    padding: 5px 8px;
    border: 1px solid var(--pc-border);
    white-space: nowrap;
}

.del-table td {
    padding: 3px 8px;
    border: 1px solid var(--pc-border);
    vertical-align: middle;
    color: var(--pc-text-primary);
    font-size: 11px;
}

.del-table tbody tr:hover td {
    background: #f8fafc;
}

.del-table .del-row-active td {
    background: #eff6ff;
}

.del-inline-input {
    width: 100%;
    min-width: 0;
}

/* DETAILS POPUP LAYOUT */
.details-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0;
}

.details-job-btn-row {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.details-columns {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
}

.details-left {
    display: flex;
    flex-direction: column;
}

.details-right {
    border-left: 1px solid #e2e8f0;
    padding-left: 14px;
    display: flex;
    flex-direction: column;
}

/* SECTION LABEL */
.section-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e2e8f0;
}

/* FIELD ROWS */
.field-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.field-label {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    min-width: 110px;
}

.editable-hint {
    color: var(--pc-accent);
    font-size: 10px;
}

/* PRODUCTION FIELDS FOUR-COLUMN */
.prod-fields-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px 12px;
    align-items: end;
}

/* JOB DETAILS THREE-COLUMN */
.jd-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 16px;
    align-items: end;
}

.prod-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.prod-field-label {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* INPUTS — readonly (grey tint) */
.field-input-readonly .dxbl-edit-field {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
    font-size: 11px;
    height: 26px;
}

/* INPUTS — editable (blue accent border) */
.field-input-editable .dxbl-edit-field {
    background: #ffffff !important;
    border-color: var(--pc-accent) !important;
    color: #1e293b !important;
    font-size: 11px;
    height: 26px;
}

.field-input-full {
    flex: 1;
}

/* DELIVERY GRID — grows with content, DX grid auto-heights */
.del-grid .dxbl-grid {
    height: auto !important;
    max-height: none !important;
}

.del-grid .dxbl-grid-table-container {
    overflow-y: visible !important;
}

/* REEL GRID */
.reel-grid .dxbl-grid {
    overflow-y: auto;
}

/* POPUP OVERRIDES */
.dxbl-popup .dxbl-popup-header {
    border-bottom: 1px solid var(--pc-border);
}

.dxbl-popup .dxbl-popup-body {
    overflow-y: auto !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 0 !important;
}

.dxbl-popup .dxbl-popup-footer {
    border-top: 0.5px solid var(--pc-border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 10px 16px;
    flex-shrink: 0 !important;
}

/* =====================================================
   GLOBAL GRID FONT SIZE
   ===================================================== */

/* Entire grid */
.pc-grid .dxbl-grid,
.pc-grid .dxbl-grid * {
    font-size: 11px !important;
}

/* Header specifically */
.pc-grid .dxbl-grid-header-row,
.pc-grid .dxbl-grid-header-row th,
.pc-grid .dxbl-grid-header-row td {
    font-size: 11px !important;
    height: 28px !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}

/* Data rows */
.pc-grid .dxbl-grid-data-row td {
    font-size: 11px !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}



/* main grid wrapper */
.pc-grid {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* actual DevExpress grid */
.pc-grid .dxbl-grid {
    height: 100% !important;
    max-height: 100% !important;
    flex: 1 1 auto;
}

/* grid scroll area */
.pc-grid .dxbl-grid-table-container {
    flex: 1 1 auto;
    overflow-y: auto !important;
}

/* =====================================================
   SMALLER POPUP HEADER
   ===================================================== */

.dxbl-popup .dxbl-popup-header {
    min-height: 34px !important;
    height: 34px !important;
    padding: 4px 12px !important;
}

/* popup title text */
.dxbl-popup .dxbl-popup-header .dxbl-popup-title {
    font-size: 14px !important;
    line-height: 1 !important;
    font-weight: 600;
}

/* close button alignment */
.dxbl-popup .dxbl-popup-close {
    width: 24px !important;
    height: 24px !important;
}

/* =====================================================
   HIDE DEVEXPRESS GRID NEW BUTTON
   ===================================================== */

/* hide toolbar completely */
.pc-grid .dxbl-grid-toolbar {
    display: none !important;
}

/* hide only the New button */
.pc-grid .dxbl-grid-toolbar .dxbl-btn {
    display: none !important;
}

.pc-controls {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 11px;
}

.pc-label {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.pc-date-input {
    width: 130px;
    font-size: 11px;
}

.pc-date-input .dxbl-edit-field {
    font-size: 11px !important;
    height: 26px !important; /* match field-input-readonly height */
}

/* =====================================================
   PRODUCTION CONFIRMATION — DARK MODE (scoped)
   ===================================================== */

.pc-dark {
    background: #0f172a !important;
    color: #f1f5f9;

    --pc-bg-primary:     #1e293b;
    --pc-bg-secondary:   #0f172a;
    --pc-text-primary:   #e2e8f0;
    --pc-text-secondary: #94a3b8;
    --pc-border:         #334155;
}

.pc-dark .pc-note,
.pc-dark .pc-note-inline {
    color: #64748b;
}

.pc-dark .section-label {
    color: #94a3b8;
    border-bottom-color: #334155;
}

.pc-dark .field-label {
    color: #94a3b8;
}

.pc-dark .details-right {
    border-left-color: #334155;
}

.pc-dark .field-input-readonly .dxbl-edit-field {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

.pc-dark .field-input-editable .dxbl-edit-field {
    background: #1e293b !important;
    border-color: #3b82f6 !important;
    color: #f1f5f9 !important;
}

.pc-dark .pc-grid .dxbl-grid {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

.pc-dark .pc-grid .dxbl-grid-data-row td {
    color: #cbd5e1;
    border-color: #334155;
}

.pc-dark .pc-grid .dxbl-grid-data-row:hover td {
    background: #263348;
}

/* =====================================================
   PAGE HEADER (title left, controls right)
   ===================================================== */

.pc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    border-bottom: 1px solid var(--pc-border);
    flex-shrink: 0;
}

.pc-header-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--pc-text-primary);
    letter-spacing: 0.01em;
}

.pc-header .pc-controls {
    padding: 0;
}

/* =====================================================
   POPUP THEME WRAPPER (fixes dark mode inside DxPopup)
   ===================================================== */

.popup-theme-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--pc-bg-primary);
    color: var(--pc-text-primary);
    padding: 12px 16px;
    overflow-y: auto;
    box-sizing: border-box;
}

.popup-theme-wrapper.pc-dark {
    background: #1e293b;
    color: #e2e8f0;
}

.popup-theme-wrapper.pc-dark .section-label {
    color: #94a3b8;
    border-bottom-color: #334155;
}

.popup-theme-wrapper.pc-dark .field-label,
.popup-theme-wrapper.pc-dark .prod-field-label {
    color: #94a3b8;
}

.popup-theme-wrapper.pc-dark .pc-note,
.popup-theme-wrapper.pc-dark .pc-note-inline {
    color: #64748b;
}

.popup-theme-wrapper.pc-dark .details-right {
    border-left-color: #334155;
}

.popup-theme-wrapper.pc-dark .field-input-readonly .dxbl-edit-field {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

.popup-theme-wrapper.pc-dark .field-input-editable .dxbl-edit-field {
    background: #1e293b !important;
    border-color: #3b82f6 !important;
    color: #f1f5f9 !important;
}

.popup-theme-wrapper.pc-dark .pc-grid .dxbl-grid {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

.popup-theme-wrapper.pc-dark .pc-grid .dxbl-grid-data-row td {
    color: #cbd5e1;
    border-color: #334155;
}

.popup-theme-wrapper.pc-dark .pc-grid .dxbl-grid-data-row:hover td {
    background: #263348;
}

/* =====================================================
   STATUS PILL (delivery grid Status column)
   ===================================================== */

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.6;
}

.status-pill-pending   { background: rgba(245,158,11,0.12); color: #d97706; }
.status-pill-confirmed { background: rgba(34,197,94,0.12);  color: #16a34a; }
.status-pill-completed { background: rgba(99,102,241,0.12); color: #4f46e5; }
.status-pill-cancelled { background: rgba(239,68,68,0.12);  color: #dc2626; }
.status-pill-default   { background: rgba(100,116,139,0.12);color: #64748b; }

.pc-dark .status-pill-pending,
.popup-theme-wrapper.pc-dark .status-pill-pending   { background: rgba(245,158,11,0.18); color: #fbbf24; }
.pc-dark .status-pill-confirmed,
.popup-theme-wrapper.pc-dark .status-pill-confirmed { background: rgba(34,197,94,0.18);  color: #4ade80; }
.pc-dark .status-pill-completed,
.popup-theme-wrapper.pc-dark .status-pill-completed { background: rgba(99,102,241,0.18); color: #818cf8; }
.pc-dark .status-pill-cancelled,
.popup-theme-wrapper.pc-dark .status-pill-cancelled { background: rgba(239,68,68,0.18);  color: #f87171; }
.pc-dark .status-pill-default,
.popup-theme-wrapper.pc-dark .status-pill-default   { background: rgba(100,116,139,0.18);color: #94a3b8; }

/* =====================================================
   PRODUCTION DETAILS — 2-COLUMN ROW LAYOUT
   ===================================================== */

.prod-details-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}

.prod-details-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.prod-field-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    gap: 6px;
    min-height: 28px;
}

/* =====================================================
   DELIVERY TABLE (custom HTML table in DetailsPopup)
   ===================================================== */

.del-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}

.del-table th {
    font-size: 11px;
    font-weight: 600;
    color: var(--pc-text-secondary);
    padding: 4px 8px;
    border-bottom: 2px solid var(--pc-border);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.del-table td {
    padding: 4px 8px;
    border-bottom: 1px solid var(--pc-border);
    color: var(--pc-text-primary);
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.del-row-active td {
    background: rgba(37,99,235,0.06);
}

/* inline inputs in editable delivery row */
.del-inline-input {
    width: 100%;
}

.del-inline-input .dxbl-edit-field {
    height: 24px !important;
    font-size: 11px !important;
}

/* dark mode delivery table */
.popup-theme-wrapper.pc-dark .del-table th {
    color: #94a3b8;
    border-bottom-color: #334155;
}

.popup-theme-wrapper.pc-dark .del-table td {
    color: #cbd5e1;
    border-bottom-color: #334155;
}

.popup-theme-wrapper.pc-dark .del-row-active td {
    background: rgba(59,130,246,0.1);
}

.pc-details-popup .dxbl-popup-header-text {
    font-size: 14px !important;
}