/*
 * Services screen (wp-admin).
 *
 * Was printed inline in admin/views/services.php on every page load. Moved to a
 * real stylesheet so it is cached between visits, minified by the build, and
 * covered by the asset-integrity gate -- none of which applies to CSS living
 * inside a PHP template.
 */
.sbs-admin-table-wrap {
    width: 100%;
    overflow-x: visible !important;
    overflow-y: visible;
    padding-bottom: 8px;
}
#sbs-services-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    border-collapse: separate !important;
}
#sbs-services-table thead { display: none !important; }
#sbs-services-table tbody {
    display: block !important;
    width: 100% !important;
}
#sbs-services-table tr.sbs-main-service-row {
    display: grid !important;
    grid-template-columns: 44px 34px 76px minmax(280px, 1fr) 88px 88px 132px 88px;
    align-items: center;
    gap: 0;
    width: 100% !important;
    min-width: 0 !important;
    cursor: pointer;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
}
#sbs-services-table tr.sbs-main-service-row:nth-child(4n+1) {
    background: #fbfdff;
}
#sbs-services-table tr.sbs-main-service-row.has-design-upload {
    box-shadow: inset 4px 0 0 #f59e0b;
}
#sbs-services-table tr.sbs-main-service-row.has-design-upload td {
    background: #fffbeb !important;
}
#sbs-services-table tr.sbs-main-service-row.has-design-upload:hover td {
    background: #fef3c7 !important;
}
#sbs-services-table tr.sbs-main-service-row:hover td {
    background: #f8fafc !important;
}
#sbs-services-table tr.is-selected td {
    background: #f0fdf4 !important;
}
#sbs-services-table tr.sbs-main-service-row td {
    display: flex !important;
    align-items: center;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    height: 72px;
    box-sizing: border-box;
    overflow: hidden;
    white-space: normal !important;
    text-overflow: clip !important;
    padding: 10px 12px !important;
    border-bottom: 0 !important;
    vertical-align: middle;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(2) {
    justify-content: center;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(1) {
    justify-content: center;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(3) {
    justify-content: center;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(5) {
    display: block !important;
    padding-top: 12px !important;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(5) strong {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(6),
#sbs-services-table tr.sbs-main-service-row td:nth-child(7),
#sbs-services-table tr.sbs-main-service-row td:nth-child(8),
#sbs-services-table tr.sbs-main-service-row td:nth-child(10) {
    color: #4b5563;
    font-weight: 650;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(4),
#sbs-services-table tr.sbs-main-service-row td:nth-child(9),
#sbs-services-table tr.sbs-main-service-row td:nth-child(11),
#sbs-services-table .sbs-toggle-options,
#sbs-services-table .sbs-options-row {
    display: none !important;
}
#sbs-services-table input.sbs-svc-chk,
#sbs-select-all-services-main {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    cursor: pointer;
}
#sbs-services-table .sbs-order-input {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    text-align: center;
}
#sbs-services-table td:nth-child(5) strong::after {
    content: "Edit";
    display: inline-flex;
    margin-left: 10px;
    padding: 2px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #2563eb;
    background: #eff6ff;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
    vertical-align: 1px;
}
#sbs-services-table .sbs-service-actions { display: none !important; }
.sbs-services-page .yatoon-table-x-scrollbar { display: none !important; }
.sbs-selected-service-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.sbs-selected-services-summary {
    color: #4b5563;
    font-weight: 700;
    margin-right: 4px;
}
.sbs-selected-service-actions .button { min-width: 112px; }
.sbs-option-save-state { color: #6b7280; font-size: 12px; font-weight: 600; }
.sbs-option-save-state.is-dirty { color: #b45309; }
.sbs-option-save-state.is-saved { color: #047857; }
.sbs-rule-pill.design-upload {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    font-weight: 800;
}
.sbs-design-upload-inline-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #f59e0b;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 800;
    vertical-align: 2px;
    white-space: nowrap;
}
@media (max-width: 1200px) {
    #sbs-services-table tr.sbs-main-service-row {
        grid-template-columns: 44px 30px 66px minmax(220px, 1fr) 78px 76px 112px 74px;
    }
    #sbs-services-table tr.sbs-main-service-row td { padding-left: 8px !important; padding-right: 8px !important; }
}
@media (max-width: 900px) {
    #sbs-services-table tr.sbs-main-service-row {
        grid-template-columns: 38px 28px 58px minmax(180px, 1fr) 70px 70px 66px;
    }
    #sbs-services-table tr.sbs-main-service-row td:nth-child(8) { display: none !important; }
    #sbs-services-table tr.sbs-main-service-row td { height: 78px; }
}

.sbs-status-toggle {
    min-width: 72px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    background: #dcfce7;
    color: #15803d;
}
.sbs-status-toggle.is-hidden {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #6b7280;
}
.sbs-status-toggle.is-saving {
    opacity: .65;
    cursor: wait;
}
#sbs-service-modal {
    padding: 24px;
    box-sizing: border-box;
    overflow-y: auto;
}
.sbs-service-modal-panel {
    position: relative;
    background: #fff;
    margin: 24px auto;
    padding: 30px;
    width: min(1080px, calc(100vw - 88px));
    max-width: 1080px;
    border-radius: 10px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}
.sbs-service-modal-close {
    position: sticky;
    top: 0;
    float: right;
    z-index: 2;
    width: 34px;
    height: 34px;
    margin: -12px -12px 4px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #6b7280;
    font-size: 22px;
    line-height: 28px;
    cursor: pointer;
}
.sbs-service-modal-close:hover {
    color: #111827;
    border-color: #cbd5e1;
}
#sbs-modal-options-table { table-layout: fixed; }
#sbs-modal-options-table input,
#sbs-modal-options-table select { box-sizing: border-box; max-width: 100%; }
#sbs-modal-options-table th:nth-child(1),
#sbs-modal-options-table td:nth-child(1) { width: 34%; }
#sbs-modal-options-table th:nth-child(2),
#sbs-modal-options-table td:nth-child(2) { width: 110px; }
#sbs-modal-options-table th:nth-child(3),
#sbs-modal-options-table td:nth-child(3) { width: 126px; }
#sbs-modal-options-table th:nth-child(4),
#sbs-modal-options-table td:nth-child(4) { width: 150px; }
#sbs-modal-options-table th:nth-child(5),
#sbs-modal-options-table td:nth-child(5) { width: 168px; }
@media (max-width: 900px) {
    .sbs-service-modal-panel { width: calc(100vw - 32px); padding: 20px; }
    #sbs-modal-options-table { display: block; overflow-x: auto; white-space: nowrap; }
}

.sbs-admin-table-wrap {
    width: 100%;
    overflow-x: visible !important;
    overflow-y: visible;
    padding-bottom: 8px;
}
#sbs-services-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    border-collapse: separate !important;
}
#sbs-services-table thead { display: none !important; }
#sbs-services-table tbody {
    display: block !important;
    width: 100% !important;
}
#sbs-services-table tr.sbs-main-service-row {
    display: grid !important;
    grid-template-columns: 44px 34px 76px minmax(280px, 1fr) 88px 88px 132px 88px;
    align-items: center;
    gap: 0;
    width: 100% !important;
    min-width: 0 !important;
    cursor: pointer;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
}
#sbs-services-table tr.sbs-main-service-row:nth-child(4n+1) {
    background: #fbfdff;
}
#sbs-services-table tr.sbs-main-service-row:hover td {
    background: #f8fafc !important;
}
#sbs-services-table tr.is-selected td {
    background: #f0fdf4 !important;
}
#sbs-services-table tr.sbs-main-service-row td {
    display: flex !important;
    align-items: center;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    height: 72px;
    box-sizing: border-box;
    overflow: hidden;
    white-space: normal !important;
    text-overflow: clip !important;
    padding: 10px 12px !important;
    border-bottom: 0 !important;
    vertical-align: middle;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(2) {
    justify-content: center;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(1) {
    justify-content: center;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(3) {
    justify-content: center;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(5) {
    display: block !important;
    padding-top: 12px !important;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(5) strong {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(6),
#sbs-services-table tr.sbs-main-service-row td:nth-child(7),
#sbs-services-table tr.sbs-main-service-row td:nth-child(8),
#sbs-services-table tr.sbs-main-service-row td:nth-child(10) {
    color: #4b5563;
    font-weight: 650;
}
#sbs-services-table tr.sbs-main-service-row td:nth-child(4),
#sbs-services-table tr.sbs-main-service-row td:nth-child(9),
#sbs-services-table tr.sbs-main-service-row td:nth-child(11),
#sbs-services-table .sbs-toggle-options,
#sbs-services-table .sbs-options-row {
    display: none !important;
}
#sbs-services-table input.sbs-svc-chk,
#sbs-select-all-services-main {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    cursor: pointer;
}
#sbs-services-table .sbs-order-input {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    text-align: center;
}
#sbs-services-table td:nth-child(5) strong::after {
    content: "Edit";
    display: inline-flex;
    margin-left: 10px;
    padding: 2px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #2563eb;
    background: #eff6ff;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
    vertical-align: 1px;
}
#sbs-services-table .sbs-service-actions { display: none !important; }
.sbs-services-page .yatoon-table-x-scrollbar { display: none !important; }
.sbs-selected-service-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.sbs-selected-services-summary {
    color: #4b5563;
    font-weight: 700;
    margin-right: 4px;
}
.sbs-selected-service-actions .button { min-width: 112px; }
.sbs-option-save-state { color: #6b7280; font-size: 12px; font-weight: 600; }
.sbs-option-save-state.is-dirty { color: #b45309; }
.sbs-option-save-state.is-saved { color: #047857; }
@media (max-width: 1200px) {
    #sbs-services-table tr.sbs-main-service-row {
        grid-template-columns: 44px 30px 66px minmax(220px, 1fr) 78px 76px 112px 74px;
    }
    #sbs-services-table tr.sbs-main-service-row td { padding-left: 8px !important; padding-right: 8px !important; }
}
@media (max-width: 900px) {
    #sbs-services-table tr.sbs-main-service-row {
        grid-template-columns: 38px 28px 58px minmax(180px, 1fr) 70px 70px 66px;
    }
    #sbs-services-table tr.sbs-main-service-row td:nth-child(8) { display: none !important; }
    #sbs-services-table tr.sbs-main-service-row td { height: 78px; }
}

.sbs-status-toggle {
    min-width: 72px;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    background: #dcfce7;
    color: #15803d;
}
.sbs-status-toggle.is-hidden {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #6b7280;
}
.sbs-status-toggle.is-saving {
    opacity: .65;
    cursor: wait;
}
#sbs-service-modal {
    padding: 24px;
    box-sizing: border-box;
    overflow-y: auto;
}
.sbs-service-modal-panel {
    position: relative;
    background: #fff;
    margin: 24px auto;
    padding: 30px;
    width: min(1080px, calc(100vw - 88px));
    max-width: 1080px;
    border-radius: 10px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}
.sbs-service-modal-close {
    position: sticky;
    top: 0;
    float: right;
    z-index: 2;
    width: 34px;
    height: 34px;
    margin: -12px -12px 4px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #6b7280;
    font-size: 22px;
    line-height: 28px;
    cursor: pointer;
}
.sbs-service-modal-close:hover {
    color: #111827;
    border-color: #cbd5e1;
}
#sbs-modal-options-table { table-layout: fixed; }
#sbs-modal-options-table input,
#sbs-modal-options-table select { box-sizing: border-box; max-width: 100%; }
#sbs-modal-options-table th:nth-child(1),
#sbs-modal-options-table td:nth-child(1) { width: 34%; }
#sbs-modal-options-table th:nth-child(2),
#sbs-modal-options-table td:nth-child(2) { width: 110px; }
#sbs-modal-options-table th:nth-child(3),
#sbs-modal-options-table td:nth-child(3) { width: 126px; }
#sbs-modal-options-table th:nth-child(4),
#sbs-modal-options-table td:nth-child(4) { width: 150px; }
#sbs-modal-options-table th:nth-child(5),
#sbs-modal-options-table td:nth-child(5) { width: 168px; }
@media (max-width: 900px) {
    .sbs-service-modal-panel { width: calc(100vw - 32px); padding: 20px; }
    #sbs-modal-options-table { display: block; overflow-x: auto; white-space: nowrap; }
}
