/**
 * Athenian Unya – Service Order Modal Layout
 * ------------------------------------------------------------
 * Dedicated styling for:
 *  - .unya-modal--service-order
 *  - .unya-so-* layout helpers
 */

/* Base modal adjustments for Service Order */
.unya-modal--service-order .unya-modal-dialog {
    max-width: 1100px;
    width: 100%;
    margin: 3rem auto;
}

/* Shell + grid */
.unya-so-shell {
    padding: 0.75rem 0.75rem 0;
}

.unya-so-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
}

/* Columns */
.unya-so-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.unya-so-col--primary {
    flex: 2 1 0;
    min-width: 0;
}

.unya-so-col--secondary {
    flex: 1.2 1 0;
    min-width: 0;
}

/* Rows (semantic, but also useful if you want spacing overrides) */
.unya-so-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Cards within rows */
.unya-so-card {
    display: flex;
    flex-direction: column;
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.unya-so-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.unya-so-card-body {
    padding: 0.75rem 1rem 1rem;
}

/* Scrollers in the left side */
.unya-so-scroller {
    max-height: 260px;
    overflow-y: auto;
    margin-top: 0.75rem;
    padding-right: 0.25rem;
}

/* Field groups */
.unya-field-group--two-col {
    display: flex;
    gap: 0.75rem;
}

.unya-field-group--two-col .unya-field {
    flex: 1 1 0;
}

/* Table shell inside services */
.unya-modal-table-shell {
    margin-top: 0.75rem;
}

.unya-modal-table-shell .unya-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.unya-modal-table th,
.unya-modal-table td {
    padding: 0.45rem 0.4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.unya-modal-table thead th {
    text-align: left;
    font-weight: 600;
    color: #111827;
}

.unya-modal-table tbody td {
    vertical-align: top;
}

/* Summary list */
.unya-summary-list {
    margin: 0;
    padding: 0;
}

.unya-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.unya-summary-row dt {
    font-weight: 600;
    color: #111827;
}

.unya-summary-row dd {
    margin: 0;
    text-align: right;
    color: #4b5563;
}

/* Summary total */
.unya-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.unya-summary-total-label {
    font-size: 0.9rem;
    color: #111827;
    font-weight: 600;
}

.unya-summary-total-value {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Footer layout */
.unya-so-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem 1rem;
}

.unya-so-footer-left,
.unya-so-footer-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive tweaks */
@media (max-width: 960px) {
    .unya-modal--service-order .unya-modal-dialog {
        margin: 1.5rem auto;
    }

    .unya-so-grid {
        flex-direction: column;
    }

    .unya-so-col--primary,
    .unya-so-col--secondary {
        flex: 1 1 auto;
    }

    .unya-so-scroller {
        max-height: 220px;
    }

    .unya-so-footer-inner {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .unya-so-footer-right {
        justify-content: flex-end;
    }
}
