/**
 * Hand-written styles for the package's widgets, registered via FilamentAsset.
 *
 * These are deliberately plain CSS with theme-agnostic values (opacity for muted
 * text, rgba grays for hairlines) so the widgets render correctly in any panel,
 * light or dark, without requiring the consuming app to compile Tailwind
 * against this package's views.
 */

.fsv-list {
    display: flex;
    flex-direction: column;
}

.fsv-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.625rem;
}

.fsv-row:first-child {
    padding-top: 0;
}

.fsv-row:last-child {
    padding-bottom: 0;
}

.fsv-row + .fsv-row {
    border-top: 1px solid rgba(128, 128, 128, 0.15);
}

.fsv-label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
    font-size: 0.875rem;
    line-height: 1.25rem;
    opacity: 0.65;
}

.fsv-value {
    min-width: 0;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    text-align: end;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.fsv-link {
    text-decoration: none;
}

.fsv-link:hover {
    text-decoration: underline;
}

.fsv-link:focus-visible,
.fsv-group-summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.fsv-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding-block: 0.5rem;
    text-align: center;
}

.fsv-empty-icon {
    display: flex;
    padding: 0.75rem;
    border-radius: 9999px;
    background: rgba(128, 128, 128, 0.1);
}

.fsv-empty-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.fsv-empty-text {
    max-width: 32rem;
    font-size: 0.875rem;
    opacity: 0.65;
}

.fsv-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    opacity: 0.72;
}

.fsv-summary strong {
    font-variant-numeric: tabular-nums;
}

.fsv-groups {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fsv-group {
    border: 1px solid rgba(128, 128, 128, 0.22);
    border-radius: 0.75rem;
    overflow: clip;
}

.fsv-group-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.fsv-group-summary::-webkit-details-marker {
    display: none;
}

.fsv-group-summary > span:first-child {
    flex: 1;
}

.fsv-group-summary::after {
    content: "›";
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.65;
    transform: rotate(0deg);
}

.fsv-group[open] > .fsv-group-summary::after {
    transform: rotate(90deg);
}

.fsv-group[open] > .fsv-group-summary {
    border-bottom: 1px solid rgba(128, 128, 128, 0.18);
}

.fsv-count {
    min-width: 2rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: rgba(128, 128, 128, 0.12);
    text-align: center;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.fsv-package-list {
    display: flex;
    flex-direction: column;
}

.fsv-package-row {
    display: grid;
    grid-template-columns: minmax(12rem, 2fr) minmax(10rem, 1fr) minmax(8rem, auto);
    align-items: center;
    gap: 1rem;
    padding: 0.625rem 1rem;
}

.fsv-package-row + .fsv-package-row {
    border-top: 1px solid rgba(128, 128, 128, 0.12);
}

.fsv-package-header {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.6;
}

.fsv-package-name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.8125rem;
}

.fsv-version,
.fsv-package-status {
    min-width: 0;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.fsv-meta {
    font-size: 0.6875rem;
    line-height: 1rem;
    opacity: 0.55;
}

.fsv-npm-row {
    grid-template-columns: minmax(12rem, 2fr) minmax(8rem, 1fr);
}

.fsv-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 48rem) {
    .fsv-package-header {
        display: none;
    }

    .fsv-package-row,
    .fsv-npm-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .fsv-package-status {
        justify-self: start;
    }
}
