/*
 * Staff screen (wp-admin).
 *
 * Was printed inline in admin/views/staff.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: auto;
    -webkit-overflow-scrolling: touch;
}
.sbs-admin-table-wrap .wp-list-table {
    min-width: 900px;
}
#sbs-staff-table tr.is-selected td {
    background: #f0fdf4 !important;
}
.sbs-portal-access {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    background: #fafafa;
    max-width: 620px;
}
.sbs-portal-access-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}
.sbs-portal-access-row + .sbs-portal-access-row {
    border-top: 1px solid #ececec;
}
.sbs-portal-access-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.sbs-pin-state {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}
.sbs-pin-state.is-set { color: #16a34a; font-weight: 600; }
.sbs-pin-length-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    white-space: nowrap;
}
.sbs-portal-toggle {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0 2px;
    border-top: 1px solid #ececec;
}
.sbs-portal-toggle input[type="checkbox"] { margin-top: 3px; }
.sbs-portal-toggle .sbs-portal-hint { display: block; margin: 2px 0 0; font-size: 12px; }
.sbs-portal-toggle input:disabled + span strong { color: #6b7280; } /* 4.6.2: contrast - was #9ca3af. Disabled labels are WCAG-exempt but were unreadable. */
#sbs-staff-modal-remove-pin { color: #b32d2e; }

.sbs-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.sbs-toggle input { display: none; }
.sbs-toggle-slider {
    position: relative;
    width: 42px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    transition: background .2s;
    flex-shrink: 0;
}
.sbs-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: left .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.sbs-toggle input:checked + .sbs-toggle-slider { background: #10B981; }
.sbs-toggle input:checked + .sbs-toggle-slider::after { left: 21px; }
.sbs-toggle-label { font-size: 13px; color: #555; min-width: 42px; }
.sbs-toggle input:checked ~ .sbs-toggle-label { color: #10B981; font-weight: 600; }
.sbs-saving { opacity: .5; pointer-events: none; }

/* Keep service assignment and employee duration discoverable in every row. */
#sbs-staff-table .sbs-staff-services-control {
    display: grid;
    gap: 6px;
    min-width: 188px;
}
#sbs-staff-table .sbs-staff-services-count {
    color: #64748b;
    font-size: 12px;
    line-height: 1.3;
}
#sbs-staff-table .sbs-staff-services-help { display:flex;align-items:center;gap:4px;color:#64748b;font-size:11px;line-height:1.25; }
#sbs-staff-table .sbs-staff-services-help .dashicons { width:14px;height:14px;font-size:14px; }
#sbs-staff-table .sbs-edit-services {
    display: inline-flex;
    width: max-content !important;
    max-width: 100%;
    min-height: 30px !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 4px 9px !important;
    color: #334155 !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05) !important;
    font-size: 12px !important;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}
#sbs-staff-table .sbs-edit-services:hover,
#sbs-staff-table .sbs-edit-services:focus-visible {
    color: #9d174d !important;
    border-color: #f0a9c8 !important;
    background: #fff7fb !important;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, .12) !important;
}
.sbs-staff-services-toolbar { display:grid;grid-template-columns:minmax(220px,1fr) minmax(170px,220px) auto auto;gap:8px;align-items:center;margin:0 0 10px; }
.sbs-staff-service-search-wrap { position:relative;display:block; }
.sbs-staff-service-search-wrap .dashicons { position:absolute;left:10px;top:50%;transform:translateY(-50%);color:#64748b;pointer-events:none; }
#sbs-staff-service-search { width:100%;min-height:36px;padding-left:36px; }
#sbs-restore-staff-defaults { display:inline-flex;align-items:center;gap:5px;white-space:nowrap; }
.sbs-staff-services-dirty { min-height:18px;margin:0 0 8px;color:#b45309;font-size:12px;font-weight:600; }
.sbs-service-duration-card.sbs-search-hidden { display:none!important; }
@media (max-width:900px) { .sbs-staff-services-toolbar { grid-template-columns:1fr 1fr; } }
#sbs-staff-table .sbs-edit-services .dashicons {
    width: 15px;
    height: 15px;
    color: #ec4899;
    font-size: 15px;
}
@media (max-width: 782px) {
    #sbs-staff-table .sbs-staff-services-cell::before {
        display: block !important;
        margin: 6px 0 4px !important;
        color: #6b7280 !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        letter-spacing: .06em !important;
        text-transform: uppercase !important;
        content: "Services & Duration" !important;
    }
    #sbs-staff-table .sbs-staff-services-control { min-width: 0; }
    #sbs-staff-table .sbs-edit-services { min-height: 28px !important; padding: 4px 8px !important; font-size: 11px !important; }
}
