/*
    version | date change | developer | comments
    ------------------------------------------------------------
    1.0     |  5/2/2026   |    JAS    | inital script 

    
    Section Order:
        1) PAGE GENERAL
        2) PANELS GENERAL
2.5) CHEVRON FOR ACCORDION PANEL
        3) PILLS - COUNTERS ABOVE GRIDS
        4) ORDER DETAILS - SERVICE SUMMARY SECTION
        5) ORDER DETAILS - ORDER DETAILS SECTION
        6) GRIDS
        7) BUTTONS
        8) NOTES & SUBMIT
        9) MODAL
        10) LOADING & ERROR HANDLING
        11) GENERAL USE PANEL
11.5) COLLAPSIBLE INSTRUCTIONS
        12) MEDIA ??move this???
        13) PAGE HEADER
        14) PAGE FOOTER
*/

/* 1) PAGE GENERAL */
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f6f6f6;
    color: #111;
}

.page {
    max-width: 960px;
    margin: 0px auto;
    padding: 0 16px 16px;
}

/* 2) PANELS GENERAL*/
.panel {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 20px 20px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    outline: 1px solid #141F2E;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px; 
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
}

.panel-tag {
    font-size: 13px;
    color: #b00020;
}

/* 2.5) CHEVRON FOR ACCORDION PANEL */
#instructionsPanel .chevron {
    width: 12px;
    height: 12px;
    border-right: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: rotate(45deg);
    transition: transform 0.25s ease;
    margin-left: 8px;
}

/* Rotate when collapsed */
#instructionsPanel.collapsed .chevron {
    transform: rotate(-135deg);
}

/* Chevron shift on hover */
#instructionsPanel .panel-header:hover .chevron {
    transform: translateX(2px) rotate(45deg);
}

#instructionsPanel.collapsed .panel-header:hover .chevron {
    transform: translateX(2px) rotate(-135deg);
}



/* 3) PILLS - COUNTERS ABOVE GRIDS */
.tier-pill-container {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.tier-pill {
    background: #f0f0f0;
    border: 1px solid #c5c7cb;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.85rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tier-pill .label {
    color: #000000;
    font-weight: 500; 
}

.tier-pill .value {
    color: #000000;
    font-weight: 500;
}

/* 4) ORDER DETAILS - SERVICE SUMMARY SECTION */
.service-summary-row {
    margin-top: 0px;
    padding-top: 4px;
    margin-bottom: 2px;
}

.service-summary-container {
    display: flex;
    flex-direction: column;
    gap: 12px; 
}

.service-summary-tier-row, 
.service-summary-reports-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px 24px;
}

/* 5) ORDER DETAILS - ORDER DETAILS SECTION */
.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px 24px;
    margin-bottom: 12px;
}

.field-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c1845;
    margin-bottom: 2px;
}

.field-value {
    font-size: 14px;
}

/* 6) GRIDS */
.grid-header,
.grid-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr 1fr 0.8fr 0.8fr;
    align-items: center;
}

.grid-header {
    background: #6c1845;
    color: #ffffff;
    padding: 8px 10px;
    border-radius: 6px 6px 0 0;
    font-size: 13px;
    font-weight: 600;
}

.grid-body {
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}

.grid-row {
    padding: 8px 10px;
    border-top: 1px solid #eee;
    background: #ffffff;
    font-size: 14px;
}

.grid-row:nth-child(odd) {
    background: #fafafa;
}

.col {
    padding-right: 8px;
}

.col.br,
.col.sr {
    text-align: center;
}

.col.edit,
.col.delete {
    text-align: center;
}

/* 7) BUTTONS */
.primary-button {
    background: #141f2e;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
}

.primary-button:disabled {
    opacity: 0.5;
    cursor: default;
}

.grid-button {
    background: #e0e0e0;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
}

.grid-button:disabled {
    opacity: 0.4;
    cursor: default;
}

/* 8) NOTES & SUBMIT */
.notes-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
    margin-top: 4px;
}

.submit-row {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

/* 9) MODAL */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.modal {
    background: #ffffff;
    border-radius: 8px;
    max-width: 520px;
    width: 100%;
    padding: 16px 18px 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.modal-field {
    margin-bottom: 10px;
}

.modal-field label {
    display: block;
    font-size: 13px;
    margin-bottom: 3px;
}

.modal-field input,
.modal-field select,
.modal-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
}

.modal-footer {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.small-modal {
    max-width: 420px;
}

#submitValidationList {
    padding-left: 20px;
}

#submitValidationList li {
    margin-bottom: 8px;
}

#clearConfirmModalBackdrop .modal-body p {
    margin-bottom: 10px;
}


/* 10) LOADING & ERROR HANDLING */
.loading {
    position: fixed;
    bottom: 16px;
    left: 16px;
    background: #141f2e;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.error {
    position: fixed;
    bottom: 16px;
    left: 16px;
    background: #b00020;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

/* 11) GENERAL USE PANEL */
.instructions-body {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* 11.5) COLLAPSIBLE INSTRUCTIONS */
#instructionsPanel .instructions-body {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

#instructionsPanel.collapsed .instructions-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

#instructionsPanel .panel-header {
    cursor: pointer;
}

#instructionsPanel .panel-header:hover {
    opacity: 0.85;
}



/* 12) MEDIA ??move this??? */
@media (max-width: 700px) {
    .grid-header,
    .grid-row {
        grid-template-columns: 2fr 2fr 1fr 1fr 1fr 1fr 1fr;
    }
}

/* 13) PAGE HEADER */
.brand-header {
    background: white;
    border-radius: 8px 8px 0 0; /* TL, TR, BR, BL */
    outline: 1px solid #141F2E;
    outline-offset: 0px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 0;
    margin: 5px 0 0;
    font-family: 'Montserrat', sans-serif;
}

.brand-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.4fr;
    align-items: start;
    padding: 20px 20px 0;
    gap: 12px;
}

.brand-left {
    padding-top: 4px;
}

.brand-center {
    text-align: center;
    padding-bottom: 16px;
}

.brand-center img {
    height: 140px;
}

.brand-right {
    text-align: right;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    color: #333;
    padding-top: 4px;
}

.micro-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #6C1845;
    margin-bottom: 8px;
    text-transform: uppercase;
    text-decoration: underline;
}

.name {
    font-size: 17px;
    font-weight: 600;
    color: #141F2E;
    letter-spacing: 0.3px;
}

.slogan {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-top: 2px;
    letter-spacing: 0.3px;
}

.brand-titlebar {
    background: #141F2E;
    color: white;
    text-align: center;
    padding: 8px 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.page-header {
    max-width: 960px;
    margin: 0 auto;
    padding: 0;
}

/* 14) PAGE FOOTER */
.page-footer {
    max-width: 960px;
    margin: 0px auto 24px;
    padding: 12px 12px 4px;
    text-align: center;
    font-size: 13px;
    color: #444;
    line-height: 1.45;
}
.page-footer .footer-line {
    margin: 2px 0;
}
.page-footer a {
    color: #6C1845;
    text-decoration: none;
    font-weight: 500;
}
.page-footer a:hover {
    text-decoration: underline;
}

