/* Grundlegendes Styling für die Tabelle */
#wholesale-order-form table {
    width: 100%;
    border-collapse: collapse;
}

#wholesale-order-form th, #wholesale-order-form td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#wholesale-order-form th {
    background-color: #f2f2f2;
    position: relative;
}

#wholesale-order-form img {
    border-radius: 4px;
}

/* Stil für die Gesamtkosten der Produkte netto */
#total-product-cost {
    margin-top: 20px;
    font-size: 1.1em;
    text-align: right; /* Rechtsbündige Ausrichtung */
}

/* Stil für die Mehrwertsteuer */
#tax-cost {
    margin-top: 10px;
    font-size: 1.1em;
    text-align: right; /* Rechtsbündige Ausrichtung */
}

/* Stil für den Gesamtpreis brutto */
#total-gross-cost {
    margin-top: 10px;
    font-size: 1.1em;
    text-align: right; /* Rechtsbündige Ausrichtung */
}

/* Stil für die Versandkosten-Vorschau */
#shipping-cost-preview {
    text-align: right;
    margin-top: 10px;
    margin-bottom: 10px;
}

.shipping-note {
    font-size: 0.9em;
    color: #555;
}

/* Spezifischer Stil für den Button-Container */
#wholesale-order-form .wholesale-button-container {
    display: flex !important;
    justify-content: flex-end !important;
    width: 100% !important;
    margin-top: 20px !important;
}

/* Spezifischer Stil für den Button */
#wholesale-order-form .wholesale-button-container #add-to-cart-button {
    padding: 10px 20px !important;
    background-color: #28a745 !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    float: none !important;
    margin: 0 !important;
    display: inline-block !important;
}

/* Hover-Effekt */
#wholesale-order-form .wholesale-button-container #add-to-cart-button:hover {
    background-color: #218838 !important;
}

/* Stil für Fehlermeldungen */
#wholesale-order-message {
    margin-bottom: 15px; /* Abstand nach unten */
}

#wholesale-order-message .error {
    color: red;
    margin-bottom: 10px;
}

/* Stil für Kategorie-Überschriften */
#wholesale-order-form .category-row td {
    background-color: #e9ecef;
    font-size: 1.1em;
}

/* Stil für Wholesale-Preise */
.wholesale-price {
    color: #ff0000; /* Rot für Wholesale-Preise */
    font-weight: bold;
}

/* Stil für die Netto-Notiz */
.netto-note {
    font-size: 0.9em;
    color: #555;
    margin-top: 10px;
    text-align: right; /* Rechtsbündige Ausrichtung */
}

.netto-note .wholesale-price {
    font-weight: bold;
}

/* Stil für Lagerbestand Status Farben */
.stock-status {
    font-weight: bold;
}

.stock-status.green {
    color: green;
}

.stock-status.orange {
    color: orange;
}

.stock-status.red {
    color: red;
}

/* Anpassung der Spaltenbreiten */
#wholesale-order-form th:nth-child(1),
#wholesale-order-form td:nth-child(1) {
    width: 100px; /* Breite für SKU Spalte */
}

#wholesale-order-form th:nth-child(4),
#wholesale-order-form td:nth-child(4) {
    width: 150px; /* Breite für Im Bestand Spalte */
}

/* Stil für die Suchkontrollen */
.wholesale-search-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-left {
    display: flex;
    align-items: center;
}

.search-left select {
    padding: 5px;
    margin-right: 10px;
}

.search-left button {
    padding: 5px 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    cursor: pointer;
}

.search-left button:hover {
    background-color: #0056b3;
}

.search-right {
    display: flex;
    align-items: center;
}

.search-right input[type="text"] {
    padding: 5px;
    width: 200px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Zusätzliche Anpassungen zur Positionierung der Fehlermeldung und des Buttons */
#wholesale-order-form button {
    display: block;
    margin: 20px 0 10px; /* Oben mehr Abstand, unten weniger */
}

.category-row td {
    background-color: #f9f9f9; /* Helles Grau für Kategorieüberschriften */
    font-weight: bold;
    font-size: 1.2em;
    text-align: center; /* Zentrierte Ausrichtung */
    padding: 10px;
    border: none; /* Keine Rahmen für die Kategoriezeile */
}

/* Optional: Abstände für bessere Lesbarkeit */
.category-row td {
    padding-top: 15px;
    padding-bottom: 15px;
}

/* Stil für die Mengen-Wrapper */
.quantity-wrapper {
    display: flex;
    align-items: center;
}

/* Stil für die Minus- und Plus-Buttons (filigraner) */
.quantity-button {
    width: 25px;
    height: 25px;
    background-color: transparent; /* Transparenter Hintergrund */
    color: #007bff; /* Dezenter Blauton für den Text */
    border: 1px solid #007bff; /* Blaue Umrandung */
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px; /* Kleinere Schriftgröße */
    line-height: 23px; /* Vertikale Ausrichtung */
    text-align: center;
    padding: 0;
    margin: 0 2px; /* Kleiner Abstand zwischen den Buttons */
    transition: background-color 0.3s, color 0.3s; /* Sanfte Übergänge für Hover-Effekte */
}

.quantity-button:hover {
    background-color: #e6f0ff; /* Leichtes Blau beim Hover */
    color: #0056b3; /* Dunkleres Blau beim Hover */
}

/* Stil für die maximale Bestellmenge Hinweis */
.max-quantity-note {
    display: block;
    font-size: 0.8em;
    color: #555;
    margin-top: 5px;
}

/* Stil für die Plus- und Minus-Icons (falls Icons verwendet werden) */
.quantity-button i {
    font-size: 12px; /* Kleinere Icon-Größe */
    line-height: 25px; /* Vertikale Ausrichtung */
}

/* Stil für das Mengen-Eingabefeld */
.wholesale-quantity-input {
    width: 50px;
    text-align: center;
    margin: 0 5px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #000 !important; /* Sicherstellen, dass der Text sichtbar ist */
    font-size: 14px; /* Kleinere Schriftgröße für das Eingabefeld */
}

/* Sicherstellen, dass die nativen Spinner nicht angezeigt werden */
.wholesale-quantity-input::-webkit-outer-spin-button,
.wholesale-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wholesale-quantity-input[type=number] {
    -moz-appearance: textfield; /* Firefox */
}

/* Responsives Design */
@media (max-width: 768px) {
    .quantity-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .wholesale-quantity-input {
        margin: 5px 0;
    }

    .quantity-button {
        width: 100%;
        margin-bottom: 5px;
    }
}
/* Stil für den zusätzlichen Text im Reset-Button */
#reset-filters .reset-text {
    display: none; /* Standardmäßig ausblenden */
    margin-left: 5px;
    font-size: 12px;
}

/* Anzeigen des Textes auf größeren Bildschirmen */
@media (min-width: 480px) {
    #reset-filters .reset-text {
        display: inline;
    }
}
/* Stil für Variationen im Order-Formular */
#wholesale-order-form tr.variation-row td {
    background-color: #f1f1f1;
    font-style: italic;
}
/* Versteckt alle Produktzeilen ohne SKU */
tr.product-row[data-sku="Keine SKU"] {
    display: none;
}

/* Sucheingabe Styling */
#text-search {
    transition: border-color 0.3s ease;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}

#text-search.searching {
    border-color: #007bff;
}

/* Mindestlängen-Hinweis */
.search-right {
    position: relative;
}

.search-min-length {
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 0.8em;
    color: #666;
    display: none;
}

/* Lade-Animation für die Tabelle */
#wholesale-order-table-body.loading {
    position: relative;
    min-height: 100px;
}

#wholesale-order-table-body.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

#wholesale-order-table-body.loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}