/* ============================================================
   Preismatrix-Styles
   Eingebunden ueber FilamentAsset im AdminPanelProvider.
   ============================================================ */

/* Kunden-Navigation */
.customer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: white;
    border: 1px solid rgb(229 231 235);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

:is(.dark) .customer-nav {
    background: rgb(17 24 39);
    border-color: rgba(255 255 255 / 0.1);
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgb(209 213 219);
    background: white;
    color: rgb(55 65 81);
    cursor: pointer;
    transition: all 0.15s;
}

:is(.dark) .nav-btn {
    background: rgb(31 41 55);
    border-color: rgba(255 255 255 / 0.15);
    color: rgb(209 213 219);
}

.nav-btn:hover:not(:disabled) {
    background: rgb(243 244 246);
    border-color: rgb(156 163 175);
}

:is(.dark) .nav-btn:hover:not(:disabled) {
    background: rgb(55 65 81);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-label {
    display: flex;
    align-items: center;
    min-width: 180px;
    justify-content: center;
}

.nav-position {
    font-size: 14px;
    font-weight: 600;
    color: rgb(17 24 39);
}

:is(.dark) .nav-position {
    color: white;
}

.nav-separator {
    width: 1px;
    height: 24px;
    background: rgb(209 213 219);
}

:is(.dark) .nav-separator {
    background: rgba(255 255 255 / 0.15);
}

.nav-page-size {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-size-label {
    font-size: 12px;
    color: rgb(107 114 128);
    white-space: nowrap;
}

:is(.dark) .page-size-label {
    color: rgb(156 163 175);
}

.page-size-select {
    padding: 4px 24px 4px 8px;
    border: 1px solid rgb(209 213 219);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    background: white;
    color: rgb(17 24 39);
    cursor: pointer;
    appearance: auto;
}

:is(.dark) .page-size-select {
    background: rgb(31 41 55);
    border-color: rgba(255 255 255 / 0.15);
    color: white;
}

.page-size-select:focus {
    outline: none;
    border-color: rgb(59 130 246);
    box-shadow: 0 0 0 2px rgba(59 130 246 / 0.25);
}

/* Gruppen-Header */
.group-header td {
    background: rgb(249 250 251);
    padding: 8px 12px !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(55 65 81);
    border-bottom: 1px solid rgb(229 231 235) !important;
    border-top: 2px solid rgb(229 231 235) !important;
}

:is(.dark) .group-header td {
    background: rgba(255 255 255 / 0.04);
    color: rgb(209 213 219);
    border-bottom-color: rgba(255 255 255 / 0.1) !important;
    border-top-color: rgba(255 255 255 / 0.1) !important;
}

.price-matrix-table tbody tr:first-child.group-header td {
    border-top: none !important;
}

.group-header:hover td {
    background: rgb(249 250 251) !important;
}

:is(.dark) .group-header:hover td {
    background: rgba(255 255 255 / 0.04) !important;
}

.group-color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.group-count {
    font-weight: 400;
    color: rgb(156 163 175);
    margin-left: 4px;
    font-size: 11px;
}

:is(.dark) .group-count {
    color: rgb(107 114 128);
}

/* Tabelle */
.price-matrix-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 13px;
    table-layout: fixed;
}

.price-matrix-table thead th {
    background: rgb(249 250 251);
    border-bottom: 2px solid rgb(229 231 235);
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(107 114 128);
    white-space: nowrap;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

:is(.dark) .price-matrix-table thead th {
    background: rgb(17 24 39);
    border-bottom-color: rgba(255 255 255 / 0.1);
    color: rgb(156 163 175);
}

.price-matrix-table tbody td {
    padding: 6px 12px;
    border-bottom: 1px solid rgb(243 244 246);
}

:is(.dark) .price-matrix-table tbody td {
    border-bottom-color: rgba(255 255 255 / 0.05);
}

.price-matrix-table tbody tr:hover td {
    background: rgb(249 250 251);
}

:is(.dark) .price-matrix-table tbody tr:hover td {
    background: rgba(255 255 255 / 0.03);
}

/* Spalten */
.col-article {
    width: auto;
    min-width: 180px;
    max-width: 480px;
}

.article-name {
    font-weight: 500;
    color: rgb(17 24 39);
    white-space: nowrap;
    padding-right: 16px;
}

:is(.dark) .article-name {
    color: white;
}

.col-netto {
    width: 90px;
    text-align: right;
}

.netto-price {
    width: 90px;
    text-align: right;
    color: rgb(107 114 128);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

:is(.dark) .netto-price {
    color: rgb(156 163 175);
}

/* Kundenspalten teilen sich den restlichen Platz gleichmaessig */
.col-customer {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Preis-Input */
.price-cell {
    padding: 4px 6px !important;
    text-align: center;
}

.price-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid rgb(229 231 235);
    border-radius: 6px;
    text-align: right;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    background: transparent;
    color: rgb(107 114 128);
    transition: all 0.15s;
}

:is(.dark) .price-input {
    border-color: rgba(255 255 255 / 0.1);
    color: rgb(156 163 175);
}

.price-input.has-value {
    color: rgb(17 24 39);
    font-weight: 600;
    background: rgb(239 246 255);
    border-color: rgb(147 197 253);
}

:is(.dark) .price-input.has-value {
    color: rgb(219 234 254);
    background: rgba(59 130 246 / 0.15);
    border-color: rgba(59 130 246 / 0.4);
}

.price-input:focus {
    outline: none;
    border-color: rgb(59 130 246);
    box-shadow: 0 0 0 2px rgba(59 130 246 / 0.25);
    color: rgb(17 24 39);
}

:is(.dark) .price-input:focus {
    color: white;
}

.price-input::placeholder {
    color: rgb(209 213 219);
    font-weight: 400;
}

:is(.dark) .price-input::placeholder {
    color: rgb(75 85 99);
}
