table.table, .table { @apply border-hairline mb-3 w-full border border-separate border-spacing-0 overflow-visible rounded-2xl text-base max-md:mx-0 max-md:block max-md:w-full max-md:overflow-visible max-md:rounded-none max-md:border-0 max-md:text-sm max-md:shadow-none; &[width="100%"] { @apply w-full; } &[width="33%"] { @apply w-1/3; } & .cbi-section-table-titles { @apply font-bold; } & .cbi-section-table-titles.named, & .cbi-section-table-descr.named, & .cbi-section-table-row[data-title] { &::before { @apply border-hairline table-cell px-3 py-3 align-middle text-base font-semibold content-[attr(data-title)] max-md:flex max-md:flex-[0_0_100%] max-md:px-3 max-md:py-2.5 max-md:text-sm md:border-b; } &:not([data-title]), &:has(td.cbi-section-table-titles) { &::before { @apply content-none; } } } & .cbi-section-table-titles.named { &::before { @apply text-text-subtle text-xs font-semibold tracking-wider uppercase; } } & tbody, & .tbody { @apply max-md:block; } & tr, & .tr { @apply max-md:border-hairline max-md:flex max-md:flex-wrap max-md:border-b max-md:px-2 max-md:py-2; @apply has-[.cbi-progressbar]:max-md:flex has-[.cbi-progressbar]:max-md:items-center has-[.cbi-progressbar]:max-md:justify-center; &:first-child { & th, & .th { @apply first:rounded-tl-2xl last:rounded-tr-2xl; } } &:last-child { @apply max-md:border-b-0; &[data-title] { &::before { @apply border-b-0; } } .td { @apply border-b-0; } } &.table-titles, &.cbi-section-table-titles, &.cbi-section-table-descr { @apply max-md:hidden; } &.cbi-rowstyle-1, &.cbi-rowstyle-2 { @apply bg-transparent; } & > .col-1 { @apply max-md:flex-[1_1_2rem] md:w-20 md:max-w-28; } & > .col-2 { @apply whitespace-normal max-md:flex-[2_2_4rem] md:w-32 md:max-w-40; } & > .col-3 { @apply max-md:flex-[3_3_6rem] md:w-44 md:max-w-52; } & > .col-4 { @apply max-md:flex-[4_4_8rem] md:w-56 md:max-w-64; } & > .col-5 { @apply max-md:flex-[5_5_10rem] md:w-68 md:max-w-76; } & > .col-6 { @apply max-md:flex-[6_6_12rem] md:w-80 md:max-w-88; } & > .col-7 { @apply max-md:flex-[7_7_14rem] md:w-92 md:max-w-100; } & > .col-8 { @apply max-md:flex-[8_8_16rem] md:w-104 md:max-w-112; } & > .col-9 { @apply max-md:flex-[9_9_18rem] md:w-116 md:max-w-124; } & > .col-10 { @apply max-md:max-w-[calc(100vw-40px)] max-md:flex-[0_0_100%] md:w-128 md:max-w-136; } } & th, & .th { @apply border-hairline bg-surface-sunken text-text-subtle border-b px-3 py-3 text-left text-xs font-semibold tracking-wider uppercase max-md:flex-[1_1_50%] max-md:border-0 max-md:bg-transparent; #cbi-samba4 & { @apply px-0.5 py-1.5; } &[width="100%"] { @apply w-full max-md:flex-[0_0_100%]; } &[width="33%"] { @apply w-1/3 max-md:flex-[0_0_33.333%]; } &[data-sortable-row="true"] { @apply hover:bg-hover-faint cursor-pointer select-none; &::after { @apply ml-0.5 text-xs content-['']; } &[data-sort-direction="asc"] { &::after { @apply content-['\25B2']; } } &[data-sort-direction="desc"] { &::after { @apply content-['\25BC']; } } } } &[id*="status_leases"] { & .td { @apply max-w-62 max-md:max-w-full; } } & td, & .td { @apply border-hairline table-cell border-b px-3 py-3 align-middle wrap-break-word whitespace-normal max-md:flex-[1_1_50%] max-md:border-0 max-md:px-1 max-md:py-1; &::before { @apply hidden content-[attr(data-title)] max-md:mb-1 max-md:block max-md:text-xs max-md:font-semibold max-md:tracking-wider; } #cbi-samba4 & { @apply px-0.5 py-1.5; } [data-page="admin-system-mounts"] & { @apply max-w-104 max-md:max-w-full; } #wifi_assoclist_table & { @apply max-md:flex-[0_0_100%] max-md:px-3 max-md:py-2; &::before { @apply max-md:mb-1.5; } } & > input[type="text"], & > input[type="password"], & select, & .cbi-dropdown:not(.btn):not(.cbi-button) { @apply w-full; } /* Widgets are nested (td > div > div > widget), so the fixed/min widths from _select.css/_dropdown.css must yield to the column width here. */ & select, & .cbi-dropdown:not(.btn):not(.cbi-button) { @apply min-w-fit; } &.cbi-value-field { /* Mobile cards (bootstrap-style): value fields stack one per row — the row title and long match-rule cells get the full width — while display-only widgets below pair up two per row. */ @apply wrap-anywhere md:max-w-prose max-md:mb-1 max-md:basis-full max-md:self-start max-md:text-left; &[data-widget="CBI.DummyValue"], &[data-widget="CBI.Button"], &[data-widget="CBI.FlagValue"], &[data-widget="dvalue"], &[data-widget="button"], &[data-widget="fvalue"] { @apply max-md:basis-1/2; } } &.cbi-section-actions { @apply max-md:flex-[0_0_100%]; & > div { @apply max-md:w-full; & > .cbi-button { @apply max-md:flex-1; } } } & > .cbi-button { @apply max-md:w-full; } &[width="100%"] { @apply w-full max-md:flex-[0_0_100%]; } &[width="33%"] { @apply w-1/3 max-md:flex-[0_0_33.333%]; } [data-page="admin-network-network"] & { &[data-name="_ifacebox"], &[data-name="_ifacestat"] { @apply max-md:basis-[100%]; } } } } .cbi-section-table { .cbi-section-table-titles { .cbi-section-table-cell { @apply !w-auto; } } }