/* Blazor admin utility grids — compact actions, aligned cells */

.sw-utility-grid {
    margin-top: 1rem;
}

.sw-utility-grid .sw-grid-table {
    table-layout: auto;
    width: 100%;
    margin-bottom: 0;
}

.sw-utility-grid .sw-grid-table thead th {
    vertical-align: middle;
    white-space: nowrap;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sw-gray-700, #374151);
    border-bottom: 1px solid var(--sw-gray-300, #d1d5db);
    background-color: var(--sw-gray-50, #f9fafb);
}

.sw-utility-grid .sw-grid-table tbody td {
    vertical-align: middle;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--sw-gray-800, #1f2a37);
}

.sw-utility-grid .sw-grid-table tbody tr.sw-grid-row {
    cursor: default;
}

.sw-utility-grid .sw-grid-table tbody tr.sw-grid-row:hover {
    background-color: rgba(249, 250, 251, 0.85);
}

.sw-utility-grid .sw-grid-filter-row th {
    vertical-align: middle;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    background-color: #fff;
}

.sw-utility-grid .actions-column {
    white-space: nowrap;
    width: 1%;
    text-align: right;
}

.sw-utility-grid .actions-column .dropdown-toggle {
    min-width: 5.5rem;
}

.sw-utility-grid .sw-button-tooltip-wrapper {
    display: inline-block;
    width: auto;
    max-width: 100%;
}

.sw-utility-grid .sw-grid-row-action,
.sw-utility-grid .sw-button-tooltip-wrapper .btn.sw-grid-row-action {
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    white-space: nowrap;
}

.sw-utility-grid .sw-grid-col-compact {
    width: 1%;
    white-space: nowrap;
}

.sw-utility-grid .sw-grid-col-wrap {
    white-space: normal;
    word-break: break-word;
}

.sw-utility-grid .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.sw-utility-grid .badge-success {
    background-color: #1e7e34;
}

.sw-utility-grid .btn-outline-secondary {
    color: var(--sw-gray-700, #374151);
    border-color: var(--sw-gray-500, #6b7280);
    background-color: var(--sw-white, #fff);
}

.sw-utility-grid .text-muted {
    color: var(--sw-gray-600, #4b5563) !important;
}

.sw-utility-grid .btn-toolbar .btn {
    width: auto;
}

.sw-utility-grid .sw-grid-group-row th {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sw-gray-700, #374151);
    background-color: var(--sw-gray-100, #f3f4f6);
    border-top: 1px solid var(--sw-gray-300, #d1d5db);
}

.sw-utility-grid .sw-grid-group-row .btn.sw-grid-group-toggle {
    display: inline-flex;
    padding: 0;
    border: 0;
    background-color: transparent;
    align-items: center;
    gap: 0.5rem;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    text-decoration: none;
}

.sw-utility-grid .sw-grid-group-row .btn.sw-grid-group-toggle:hover {
    background-color: transparent;
    color: var(--sw-primary-700, #1a56db);
}

.sw-utility-grid .sw-grid-group-empty-row td {
    font-size: 0.8125rem;
    font-style: italic;
}

.sw-star-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.sw-star-icon::before {
    content: none;
}

.sw-star-icon.fas {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='black' d='M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='black' d='M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z'/%3E%3C/svg%3E");
}

.sw-star-icon.far {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='black' d='M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.7 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='black' d='M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.7 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z'/%3E%3C/svg%3E");
}

.sw-favorite-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    padding: 0.125rem;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--sw-gray-400, #9ca3af);
    line-height: 1;
}

.sw-favorite-toggle:hover:not([aria-disabled="true"]) {
    color: var(--sw-favorite-600, #e8931a);
}

.sw-favorite-toggle[aria-pressed="true"] {
    color: var(--sw-favorite-500, #faa825);
}

.sw-favorite-toggle:focus-visible {
    outline: 2px solid var(--sw-primary-500, #3f83f8);
    outline-offset: 1px;
}

.sw-favorite-toggle[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
}

.sw-favorites-filter .custom-control-label {
    color: var(--sw-gray-700, #374151);
    font-size: 0.875rem;
    cursor: pointer;
}

.sw-favorites-filter .sw-star-icon {
    color: var(--sw-favorite-500, #faa825);
}

.sw-favorites-filter .sw-favorites-count {
    color: var(--sw-gray-600, #4b5563);
}
