/*** LEIP Report — page-specific styles only.
     Card containers use .table-bg from style.css.
     Headings use .chart-heading and .table-heading from style.css.
     Buttons use .dt-button from DataTables / util.css.               ***/


/*** Section spacing — vertical rhythm between .table-bg cards ***/

.leip-section
{
    margin: 0 0 2rem 0;
}


/*** Form Grid — used for General Info and Energy Calculation rows ***/

.leip-form-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

/* General Info card uses a fixed 2-column grid on wider screens so the
   explicit grid-column/grid-row placements in the markup work correctly.
   On narrow screens it collapses to a single column. */
@media screen and (min-width: 540px)
{
    .leip-section:first-of-type .leip-form-grid
    {
        grid-template-columns: 1fr 1fr;
    }
}

.leip-fg
{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .leip-fg label
    {
        font-size: 1rem;
    }

    .leip-fg label.leip-bold-label
    {
        font-weight: bold;
        white-space: nowrap;
    }

    /* Inputs — matches the .datepicker / .ctrl-holder pattern from style.css */
    .leip-fg input,
    .leip-fg select
    {
        height: 2.375rem;
        line-height: 2.375rem;
        padding: 0 0.75rem;
        font-size: 1.125rem;
        background-color: #ffffff;
        border: 1px solid #dddddd;
        box-sizing: border-box;
    }

        .leip-fg input[type=number]
        {
            text-align: right;
        }

        .leip-fg input:focus,
        .leip-fg select:focus
        {
            outline: none;
            border-color: #dddddd;
        }

    .leip-fg .leip-hint
    {
        font-size: 0.875rem;
        color: #555555;
        font-style: italic;
    }


/*** Tables — internal data-entry tables ***/

.leip-tbl
{
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

    .leip-tbl thead th
    {
        font-size: 1rem;
        font-weight: bold;
        padding: 0.5rem;
        border-bottom: 1px solid #dddddd;
        text-align: left;
    }

    .leip-tbl td
    {
        padding: 0.5rem;
        vertical-align: middle;
    }

        /* Period & Times columns: left-aligned */
        .leip-tbl td:nth-child(1),
        .leip-tbl td:nth-child(2)
        {
            text-align: left;
        }

        /* Numeric columns: right-aligned */
        .leip-tbl td:nth-child(3),
        .leip-tbl td:nth-child(4),
        .leip-tbl td:nth-child(5)
        {
            text-align: right;
        }

    .leip-tbl tbody tr + tr td
    {
        border-top: 1px solid #eeeeee;
    }

.leip-row-label
{
    display: block;
    font-size: 1rem;
    font-weight: bold;
}

.leip-row-sub
{
    display: block;
    font-size: 0.875rem;
    font-weight: normal;
    color: #555555;
}

.leip-tbl input[type=number],
.leip-tbl input[type=text]
{
    width: 100%;
    height: 2.375rem;
    line-height: 2.375rem;
    padding: 0 0.75rem;
    border: 1px solid #dddddd;
    font-size: 1.125rem;
    background-color: #ffffff;
    box-sizing: border-box;
}

.leip-tbl input[type=number]
{
    text-align: right;
}

.leip-tbl input:focus
{
    outline: none;
    border-color: #dddddd;
}

.leip-times-inp[readonly]
{
    background-color: #f9f9f9;
    cursor: default;
}

    .leip-times-inp[readonly]:focus
    {
        border-color: #dddddd;
    }

.leip-computed
{
    display: block;
    height: 2.375rem;
    line-height: 2.375rem;
    padding: 0 0.75rem;
    background-color: #f9f9f9;
    border: 1px solid #dddddd;
    font-size: 1.125rem;
    text-align: right;
    box-sizing: border-box;
}


/*** Summary Grid ***/

.leip-summary-grid
{
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 0.75rem;
    align-items: center;
    margin: 0 0 1.25rem 0;
}

.leip-col-head
{
    font-size: 1rem;
    font-weight: bold;
    text-align: left;
}

.leip-result-box
{
    display: block;
    height: 2.375rem;
    line-height: 2.375rem;
    padding: 0 0.75rem;
    background-color: #f9f9f9;
    border: 1px solid #dddddd;
    font-size: 1.125rem;
    text-align: right;
    box-sizing: border-box;
}

.leip-result-box.leip-hl
{
    font-weight: bold;
    border-color: #5899DA;
}


/*** Button Row ***/

.leip-button-row
{
    text-align: center;
}

    .leip-button-row > .dt-buttons
    {
        display: inline-block;
    }


/*** Status Bar ***/

.leip-status-bar
{
    padding: 0.75rem 1rem;
    font-size: 1rem;
    text-align: center;
    display: none;
    margin: 0 0 1rem 0;
}

.leip-status-ok
{
    background-color: #f0fff0;
    border: 1px solid #5899DA;
    color: #333333;
}

.leip-status-err
{
    background-color: #fff0f0;
    border: 1px solid #dc143c;
    color: #dc143c;
}
