/* Compact service selection UI — shared across user panel and admin */

.service-select-container.select2-container,
.service-select-container.select2-container--default {
    width: 100% !important;
    font-family: var(--font-sans, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
}

.service-select-container .select2-selection--single {
    min-height: 38px;
    height: auto !important;
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.service-select-container .select2-selection__rendered {
    width: 100% !important;
    padding: 0 28px 0 0 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.service-select-container .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 6px !important;
}

.service-select-dropdown.select2-dropdown {
    border-radius: 8px;
    overflow: hidden;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.service-select-dropdown .select2-search--dropdown {
    padding: 8px;
}

.service-select-dropdown .select2-search__field {
    font-size: 12px;
    line-height: 1.35;
    padding: 6px 8px;
    border-radius: 6px;
}

.service-select-dropdown .select2-results__options {
    max-height: 320px !important;
}

.service-select-dropdown .select2-results__option {
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.35;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.service-select-dropdown .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: rgba(13, 110, 253, 0.08);
    color: inherit;
}

.service-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    width: 100%;
}

.service-option--selected {
    align-items: center;
}

.service-option__id {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.35;
    white-space: nowrap;
    padding-top: 1px;
}

.service-option__content {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 10px;
    min-width: 0;
}

.service-option__name {
    flex: 1 1 100%;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    color: inherit;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.service-option--selected .service-option__name {
    flex: 1 1 auto;
    min-width: 0;
}

.service-option__meta {
    font-size: 11px;
    font-weight: 600;
    color: #0d6efd;
    line-height: 1.35;
    white-space: nowrap;
    margin-left: auto;
}

.service-option__placeholder {
    font-size: 12px;
    line-height: 1.35;
    color: #6b7280;
}

.category-option .service-option__content {
    display: block;
}

.category-option .service-option__name {
    flex: none;
}

/* Native compact selects (fallback without Select2) */
select.compact-select,
select.compact-select.form--control,
select.compact-select.form-select,
select.compact-select.form-control,
.compact-select + .select2-container .select2-selection--single {
    font-size: 12px;
    line-height: 1.35;
}

select.compact-select,
select.compact-select.form--control,
select.compact-select.form-select,
select.compact-select.form-control {
    padding: 8px 10px;
}

select.compact-select option {
    font-size: 12px;
    line-height: 1.35;
    white-space: normal;
}

/* Admin API service search table */
.api-service-search-table {
    font-size: 12px;
    line-height: 1.35;
}

.api-service-search-table th,
.api-service-search-table td {
    font-size: 12px;
    line-height: 1.35;
    vertical-align: top;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
    padding: 0.55rem 0.65rem;
}

.api-service-search-table .service-table__id {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

.api-service-search-table .service-table__name {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
}

.api-service-search-table .service-table__rate {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #0d6efd;
    white-space: nowrap;
}

.api-service-search-table .service-table__category {
    font-size: 11px;
    color: #6b7280;
}

#apiServiceSearchInput {
    font-size: 12px;
    line-height: 1.35;
    padding: 8px 10px;
}

.custom-table {
    font-size: 12px;
    line-height: 1.35;
}

.custom-table th,
.custom-table td {
    font-size: 12px;
    line-height: 1.35;
    vertical-align: top;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

@media (max-width: 767px) {
    .service-select-dropdown .select2-results__options {
        max-height: 260px !important;
    }

    .service-option__meta {
        margin-left: 0;
    }
}
