/* Planning: the list, a promotion's planning page, Project Details, and kit plans. */

.plan-group {
    margin-bottom: 1.75rem;
}

    .plan-group h2 {
        font-size: 1.15rem;
    }

    .plan-group .plan-group-empty {
        font-size: 1rem;
        font-weight: normal;
        color: var(--vml-gray-dark);
    }

.plan-warning {
    background-color: #fff6db;
    border-left: 4px solid #e0a800;
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0 0.75rem;
}

.plan-summary {
    margin-bottom: 1.5rem;
}

    .plan-summary th {
        padding: 0.3rem 1.5rem 0.3rem 0;
        vertical-align: top;
        white-space: nowrap;
        font-weight: 600;
    }

    .plan-summary td {
        padding: 0.3rem 0;
    }

/* ---- Project Details dialog ---- */

.vml-modal.plan-details-modal {
    max-width: 46rem;
}

.plan-details-body {
    /* Thirty-odd fields: the form scrolls, the title and buttons stay put. */
    max-height: 68vh;
    overflow-y: auto;
}

.plan-details-table {
    width: 100%;
}

    .plan-details-table th {
        width: 40%;
        padding: 0.35rem 1rem 0.35rem 0;
        font-weight: 600;
        vertical-align: middle;
    }

    .plan-details-table td {
        padding: 0.35rem 0;
    }

    .plan-details-table tr.plan-section th,
    .plan-details-table tr.plan-section td {
        border-top: 1px solid #d6d6d6;
        padding-top: 0.6rem;
    }

    .plan-details-table .form-select,
    .plan-details-table .form-control {
        font-size: 0.95rem;
    }

.plan-narrow {
    max-width: 15rem;
}

.plan-optional {
    font-weight: normal;
    font-size: 0.8rem;
    color: var(--vml-gray-dark);
}

.plan-ref {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.plan-details-missing {
    margin: 0.75rem 1.25rem 0;
}

    .plan-details-missing ul {
        margin: 0.25rem 0 0;
    }

.vml-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    min-height: 0;
}

    .vml-switch .form-check-input {
        margin-top: 0;
        cursor: pointer;
    }

.vml-switch-text {
    font-size: 0.85rem;
    color: var(--vml-gray-dark);
    min-width: 1.75rem;
}

/* ---- Kit plans: on screen and printed ---- */

.kitplan-page {
    max-width: 60rem;
}

.kp-info, .kp-kit-info {
    border-collapse: collapse;
    margin: 0.5rem 0 1rem;
    background-color: var(--vml-white);
}

.kp-info {
    width: 100%;
}

.kp-kit-info {
    min-width: 26rem;
}

    .kp-info th, .kp-info td, .kp-kit-info th, .kp-kit-info td {
        border: 1px solid #bdbdbd;
        padding: 0.3rem 0.5rem;
        text-align: left;
        vertical-align: middle;
    }

    .kp-info th, .kp-kit-info th {
        width: 5%;
        white-space: nowrap;
        background-color: #f4f4f4;
    }

    .kp-info th.kp-center, .kp-kit-info th.kp-center {
        text-align: center;
    }

    .kp-info td.kp-underline {
        border-bottom: 2px solid var(--vml-black);
        line-height: 2.2em;
    }

.kp-caption {
    font-weight: 600;
    margin-top: 1rem;
}

.kp-caption-note {
    font-weight: normal;
    font-size: 0.85rem;
    color: var(--vml-gray-dark);
}

.kp-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.75rem;
    background-color: var(--vml-white);
}

    .kp-table th, .kp-table td {
        border: 1px solid #bdbdbd;
        padding: 0.35rem 0.5rem;
        text-align: left;
    }

    .kp-table th {
        background-color: #f4f4f4;
    }

    .kp-table .num {
        text-align: right;
    }

    .kp-table td.kp-qty {
        font-weight: 600;
        width: 4.5rem;
        text-align: center;
    }

    .kp-table tr.kp-total td {
        font-weight: 600;
    }

        .kp-table tr.kp-total td:first-child {
            text-align: right;
        }

.kp-rule {
    margin: 1.5rem 0;
}

.kp-kit {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #bdbdbd;
}

    .kp-kit:last-child {
        border-bottom: none;
    }

@media print {
    /* Only the page's content: no menu, no buttons, nothing that only makes sense on screen. */
    .sidebar, .no-print, #blazor-error-ui, #reconnect-modal {
        display: none !important;
    }

    .page, main, .content, .est-page {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        max-width: none !important;
    }

    body {
        font-size: 10.5pt;
        background: var(--vml-white);
    }

    .kp-kit, .kp-info, .kp-table tr {
        break-inside: avoid;
    }

    .kp-kit {
        border-bottom: none;
    }

    .kp-info th, .kp-kit-info th, .kp-table th {
        /* Keep the header shading when the browser's "background graphics" is off. */
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    @page {
        size: letter;
        margin: 0.5in;
    }
}

/* ---- Kit plans: editing boxes (screen only) ---- */

.kp-table input.kp-box-name {
    min-width: 10rem;
    padding: 0.2rem 0.4rem;
}

.kp-table input.kp-box-num {
    width: 5.5rem;
    margin-left: auto;
    padding: 0.2rem 0.4rem;
    text-align: right;
}

.kp-box-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin: -0.25rem 0 1rem;
}

    .kp-box-actions .est-hint {
        flex: 1 1 20rem;
        margin: 0;
    }

.kp-box-summary {
    width: auto;
    min-width: 20rem;
}

/* ---- Courier Shipping Info dialog ---- */
.vml-modal.plan-courier-modal {
    max-width: 72rem;
}

.plan-courier-body {
    /* Many groups: the table scrolls, the dates and buttons stay put. */
    max-height: 72vh;
    overflow-y: auto;
}

.plan-courier-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1.5rem;
    margin-bottom: 0.75rem;
}

    .plan-courier-dates label {
        display: flex;
        flex-direction: column;
        font-weight: 600;
        gap: 0.2rem;
    }

    .plan-courier-dates input[type=date] {
        width: 11rem;
    }

.plan-courier-stagger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .plan-courier-stagger label {
        flex-direction: row;
    }

.plan-courier-scroll {
    overflow-x: auto;
}

.plan-courier-table td {
    vertical-align: middle;
}

.plan-courier-table .form-select {
    min-width: 14rem;
}

.plan-courier-date {
    width: 10rem;
}

/* WordPress showed a late delivery in red. */
.plan-courier-late {
    color: #c0392b; /* the app's error red (.error-message) */
    font-weight: 600;
}

/* ---- Labels (WordPress's Job Tracking kitting panel) ---- */
.plan-labels-table {
    width: auto;
    min-width: 40rem;
}

    .plan-labels-table td {
        vertical-align: middle;
    }

.plan-label-done {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.plan-label-result {
    margin-top: 0.75rem;
}

    .plan-label-result h3 {
        font-size: 1.05rem;
        margin-bottom: 0.4rem;
    }
