﻿.button-styling-alert {
    height: 45px;
    font-size: 18px;
    color: white;
    border: solid 1px darkred;
    background-color: #A30422;
    border-radius: 4px;
}


.button-styling {
    height: 45px;
    font-size: 18px;
    color: white;
    border: solid 1px black;
    background-color: #0f255e;
    border-radius: 4px;
}

.button-styling-disabled {
    height: 45px;
    font-size: 18px;
    color: white;
    border: solid 1px darkgray;
    background-color: lightgray;
    border-radius: 4px;
}


.step-title-label {
    color: #000;
    font-size: 22px;
    font-weight: 800;
    word-wrap: break-word;
}

.subtitle-label {
    color: #847E7E;
    font-size: 14px;
    font-weight: 600;
    word-wrap: break-word;
}

.machine-cost-box {
    border: 4px solid #b10066; /* tweak to match your screenshot */
    border-radius: 6px;
    max-width: 520px;
    margin: 0 auto;
}

.tipBox {
    border-left: 4px solid #cc0000;
    background: rgba(0,0,0,0.02);
}

.tipTitle {
    color: #cc0000;
    font-weight: 700;
}

.bold-value {
    font-weight: 700;
}

.editor-action-btn.save-btn.dirty {
    border-color: #b42318;
    background: linear-gradient(to bottom, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(180, 35, 24, 0.18);
}

    .editor-action-btn.save-btn.dirty:hover {
        background: linear-gradient(to bottom, #dc2626 0%, #b91c1c 100%);
    }


.sections-tab-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 14px;
    min-height: 620px;
}

/* LEFT PANEL */
.sections-sidebar {
    background: #f7f4ee;
    border: 1px solid #d9d2c6;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.sections-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px 10px 12px;
    border-bottom: 1px solid #e2dbd0;
    background: #f3efe7;
}

.sections-sidebar-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #6b6255;
}

.btn-add-entity {
    border: 1px solid #c8bda9;
    background: linear-gradient(to bottom, #fffdf8 0%, #ece6d9 100%);
    color: #3f382f;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

    .btn-add-entity:hover {
        background: linear-gradient(to bottom, #ffffff 0%, #e8e1d3 100%);
    }

.entity-object-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 6px;
    gap: 6px;
}

.entity-empty-state {
    padding: 18px 12px;
    color: #7c7468;
    font-size: 13px;
}

/* LEFT LIST ITEM */
.object-list-item {
    width: 100%;
    border: 1px solid transparent;
    background: #fbf9f4;
    border-radius: 8px;
    padding: 10px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

    .object-list-item:hover {
        background: #f4efe5;
        border-color: #ddd3c1;
    }

    .object-list-item.selected {
        background: #fffdf8;
        border-color: #cf5d3e;
        box-shadow: inset 3px 0 0 #cf5d3e;
    }

.object-list-item-left {
    min-width: 0;
    flex: 1 1 auto;
}

.object-name {
    font-size: 14px;
    font-weight: 700;
    color: #2f2a24;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.object-number {
    margin-top: 2px;
    font-size: 12px;
    color: #7c7468;
}

.object-rate {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 700;
    color: #3b3b3b;
    white-space: nowrap;
}

/* RIGHT PANEL */
.entity-main-panel {
    background: #f7f4ee;
    border: 1px solid #d9d2c6;
    border-radius: 10px;
    padding: 14px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /*
       Uses the variables from CostAnalysis.razor.css.
       Fallback values are included in case this component renders somewhere else.
    */
    height: calc( 100vh - var(--cost-page-top-offset, 54px) - var(--cost-tabs-height, 46px) - var(--sticky-gap, 12px) - var(--entity-panel-bottom-gap, 26px) );
}

.entity-main-placeholder {
    background: #fcfaf6;
    border: 1px dashed #d7cebf;
    border-radius: 10px;
    min-height: 180px;
    padding: 20px;
    color: #6f675a;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.entity-editor-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    height: 100%;
}

.entity-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.entity-editor-title-wrap {
    min-width: 0;
    flex: 1 1 auto;
}

.entity-editor-title {
    font-size: 28px;
    font-weight: 700;
    color: #2f2a24;
    line-height: 1.1;
}

.entity-editor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.editor-action-btn {
    border: 1px solid #c8bda9;
    background: linear-gradient(to bottom, #fffdf8 0%, #ece6d9 100%);
    color: #3f382f;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

    .editor-action-btn:hover {
        background: linear-gradient(to bottom, #ffffff 0%, #e8e1d3 100%);
    }

    .editor-action-btn.primary {
        border-color: #93b179;
        background: linear-gradient(to bottom, #f5fbef 0%, #dceccd 100%);
    }

/* SECTION TABS */
.entity-section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
    flex: 0 0 auto;
}

.entity-section-tab {
    border: 1px solid #cfc6b9;
    background: linear-gradient(to bottom, #f8f5ee 0%, #ece7dd 100%);
    color: #4a4338;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

    .entity-section-tab:hover {
        background: linear-gradient(to bottom, #f8f9fc 0%, #e1e5ef 100%);
        border-color: #8e98ae;
    }

    .entity-section-tab.active {
        background: linear-gradient(to bottom, #dce2ef 0%, #ABB3C7 100%);
        border-color: #5d687f;
        color: #202a3c;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), 0 0 0 1px rgba(93,104,127,0.18);
    }

/* SECTION CONTENT */
.entity-section-content {
    background: #fcfaf6;
    border: 1px solid #ddd4c7;
    border-radius: 10px;
    padding: 18px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.section-placeholder h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #2f2a24;
}

.section-placeholder p {
    margin: 0;
    font-size: 14px;
    color: #6f675a;
}

.section-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-block {
    background: #f8f5ef;
    border: 1px solid #ddd4c7;
    border-radius: 10px;
    padding: 16px;
}

.section-block-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #746b5f;
    margin-bottom: 14px;
}

.entity-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px 18px;
}

.entity-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.entity-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #4d463d;
}

.entity-field-input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cfc6b9;
    border-radius: 8px;
    background: #fffdf9;
    color: #2f2a24;
    font-size: 14px;
    padding: 9px 12px;
    box-sizing: border-box;
    outline: none;
}

    .entity-field-input:focus {
        border-color: #cf5d3e;
        box-shadow: 0 0 0 3px rgba(207, 93, 62, 0.12);
    }

    .entity-field-input.readonly {
        background: #f1ede5;
        color: #5a5247;
    }


    /* Overhead stylers */


.overhead-form-row {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(360px, 1.1fr);
    gap: 18px;
    align-items: start;
    padding: 14px 0;
    border-bottom: 1px solid #e1d8ca;
}

    .overhead-form-row:first-of-type {
        padding-top: 0;
    }

    .overhead-form-row:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .overhead-form-row.total {
        background: #fffdf8;
        border: 1px solid #d8ccb9;
        border-radius: 10px;
        padding: 14px;
        margin-top: 10px;
    }

.overhead-row-label {
    min-width: 0;
}

.overhead-label-title {
    color: #2f2a24;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
}

.overhead-label-help {
    color: #746b5f;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    margin-top: 4px;
}

.overhead-row-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

    .overhead-row-fields.single {
        grid-template-columns: minmax(0, 1fr);
    }

.section-block-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.overhead-other-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overhead-other-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    background: #fffdf8;
    border: 1px solid #d8ccb9;
    border-radius: 10px;
    padding: 14px;
}

.overhead-other-card-main {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1fr) minmax(260px, 1.2fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
}

.overhead-other-card-actions {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.editor-action-btn.danger {
    border-color: #b42318;
    background: linear-gradient(to bottom, #fff5f5 0%, #f5d0d0 100%);
    color: #7a1c16;
}

    .editor-action-btn.danger:hover {
        background: linear-gradient(to bottom, #fff1f1 0%, #efbcbc 100%);
    }

.overhead-description-input {
    resize: vertical;
    min-height: 72px;
    font-family: inherit;
}

.overhead-other-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 12px;
    background: #f8f5ef;
    border: 1px solid #ddd4c7;
    border-radius: 10px;
    padding: 14px;
    margin-top: 14px;
}

@media (max-width: 1100px) {
    .overhead-other-card-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .section-block-header-row {
        flex-direction: column;
    }

    .overhead-other-card {
        grid-template-columns: 1fr;
    }

    .overhead-other-card-actions {
        justify-content: flex-start;
    }

    .overhead-other-totals {
        grid-template-columns: 1fr;
    }
}

/******************************************/
/*Calculation description readability*/
.emp-calc {
    font-size: 0.95rem;
    line-height: 1.45;
}

.emp-calc-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.emp-calc-formula {
    margin-bottom: 12px;
    color: #666;
}

.emp-calc-row {
    margin-bottom: 10px;
}

.emp-calc-label {
    font-weight: 600;
    margin-bottom: 2px;
}

.emp-calc-value {
    padding-left: 10px;
}

.emp-calc-total {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #ddd;
    font-size: 1rem;
}
/******************************************/

@media (max-width: 900px) {
    .overhead-form-row {
        grid-template-columns: 1fr;
    }

    /*
       Keep Monthly / Yearly side-by-side even when the label stacks above them.
       No onion frying. No field cowardice.
    */
    .overhead-row-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .overhead-row-fields.single {
            grid-template-columns: 1fr;
        }
}

@media (max-width: 560px) {
    .overhead-row-fields {
        grid-template-columns: 1fr;
    }
}

/* RESPONSIVE */
@media (max-width: 800px) {
    .entity-form-grid {
        grid-template-columns: 1fr;
    }

    .sections-tab-layout {
        grid-template-columns: 1fr;
    }

    .sections-sidebar {
        min-height: 260px;
    }

    .entity-editor-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .entity-editor-actions {
        width: 100%;
    }

    .entity-main-panel {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .entity-editor-shell {
        height: auto;
        min-height: 0;
    }

    .entity-section-content {
        overflow: visible;
        min-height: 420px;
    }
}

/******************************************/
/***********  EXPORT TAB   ****************/
.export-panel {
    border-radius: 18px;
    overflow: hidden;
}

.export-hero {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 24px 24px 18px 24px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.export-hero-icon {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--mud-palette-lines-default);
    background-color: rgba(255, 255, 255, 0.03);
}

.export-hero-text {
    flex: 1;
    min-width: 0;
}

.export-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.export-body {
    padding: 24px;
}

.export-points {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.export-point {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.export-side-card {
    padding: 18px;
    border-radius: 14px;
    height: 100%;
}

.export-checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.export-check-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.export-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.export-caption {
    max-width: 700px;
    opacity: 0.85;
}

@media (max-width: 700px) {
    .export-hero {
        flex-direction: column;
    }

    .export-actions {
        align-items: stretch;
    }
}
/******************************************/

/******************************************/
/*********    REALTRAC IMPORT TABS   ******/
.realtrac-transfer-tabs {
    margin-top: 4px;
}

    .realtrac-transfer-tabs .mud-tabs-toolbar {
        margin-bottom: 8px;
    }

.import-drop-zone {
    position: relative;
    margin-top: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

    .import-drop-zone:hover {
        border-color: var(--mud-palette-primary);
        background: rgba(255, 255, 255, 0.035);
    }

    .import-drop-zone.has-file {
        border-color: var(--mud-palette-success);
    }

.import-drop-zone-content {
    min-height: 220px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.import-file-input-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.import-selected-file {
    display: flex;
    justify-content: center;
    align-items: center;
}
/******************************************/

/******************************************/
/*********    YES/NO Dialog   *************/

.yes-no-dialog-content {
    padding: 10px 0 2px 0;
}

.yes-no-dialog-question {
    font-size: 0.98rem;
    line-height: 1.45;
    color: #1f2937;
    font-weight: 500;
}
/******************************************/
