/* =====================================================
   Invictus Quotes — OfferCart Styles
   Globaler Lieferanten-Cart (Offcanvas + Floating Button)
   ===================================================== */

/* Floating Cart Button */
#offerCartFloatBtn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1040;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 20px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35),
                0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#offerCartFloatBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.45),
                0 6px 16px rgba(0, 0, 0, 0.12);
}
#offerCartFloatBtn:active {
    transform: translateY(0);
}
#offerCartFloatBtn .offer-cart-float-icon {
    font-size: 1.3rem;
}
#offerCartFloatBtn .offer-cart-float-count {
    background: #fff;
    color: #2563eb;
    border-radius: 999px;
    padding: 1px 9px;
    font-size: 0.78rem;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
}
#offerCartFloatBtn .offer-cart-float-sub {
    font-size: 0.72rem;
    opacity: 0.85;
    font-weight: 500;
}

/* Offcanvas Body Layout */
#offerCartOffcanvas {
    width: 580px !important;
}
@media (max-width: 640px) {
    #offerCartOffcanvas { width: 100% !important; }
}
#offerCartOffcanvas .offcanvas-body {
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Items Container */
#offerCartItems {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px 16px;
    background: #fafbfc;
}

/* Supplier-Group Header */
.oc-supplier-group {
    margin-bottom: 14px;
}
.oc-supplier-header {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
}
.oc-supplier-header .badge {
    font-size: 0.68rem;
    font-weight: 600;
}

/* Cart Item Card */
.oc-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    transition: border-color 0.15s ease;
}
.oc-item:hover {
    border-color: #cbd5e1;
}
.oc-mini-label {
    display: block;
    font-size: 0.68rem;
    color: #64748b;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.oc-unit-display {
    padding: 4px 8px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #475569;
    text-align: center;
    min-height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.oc-margin-row {
    padding-top: 6px;
    margin-top: 6px;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.78rem;
}
.oc-remove-btn {
    flex-shrink: 0;
    padding: 2px 6px;
}

/* Footer Sections */
.oc-footer {
    border-top: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}
.oc-meta-toggle {
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #1e293b;
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}
.oc-meta-toggle:hover {
    background: #f8fafc;
}
.oc-meta-toggle .bi-chevron-down {
    transition: transform 0.2s ease;
}
.oc-meta-toggle.collapsed .bi-chevron-down {
    transform: rotate(-90deg);
}

#offerCartMetaForm {
    padding: 12px 16px;
    background: #fafbfc;
    border-bottom: 1px solid #e2e8f0;
}

/* CRM Suggestions Dropdown */
#offerCartCrmSuggestions {
    z-index: 9999;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

/* Summary */
#offerCartSummary {
    padding: 14px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
#offerCartSummary .oc-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.88rem;
}
#offerCartSummary .oc-summary-total {
    font-size: 1.1rem;
    font-weight: 700;
    border-top: 1px solid #cbd5e1;
    padding-top: 8px;
    margin-top: 6px;
}

/* Action Buttons */
.oc-actions {
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
#offerCartGenerateBtn {
    flex: 1;
    font-weight: 600;
}

/* =====================================================
   Supplier-Detail Tab "Positionen"
   Klickbare Artikel-Zeilen + History-Expand
   ===================================================== */

.sup-positions-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
    padding: 10px 12px;
}
.sup-positions-table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}
.sup-pos-row:hover {
    background: #f8fafc;
}
.sup-pos-row.expanded {
    background: #eff6ff;
}
.sup-pos-chevron {
    color: #64748b;
    font-size: 0.85rem;
    transition: transform 0.15s ease;
}
.sup-pos-detail {
    background: #f8fafc;
}
.sup-pos-detail-inner {
    border-left: 3px solid #2563eb;
    background: #fff;
    border-radius: 4px;
    margin: 4px 0;
}

.sup-history-table thead th {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 10px;
    white-space: nowrap;
}
.sup-history-table tbody td {
    padding: 8px 10px;
    vertical-align: middle;
    font-size: 0.86rem;
}
.sup-history-table tbody tr:hover {
    background: #f8fafc;
}
.sup-history-table tbody tr.sup-history-row-warn {
    background: #fffbeb;
}
.sup-history-table tbody tr.sup-history-row-warn:hover {
    background: #fef3c7;
}
.sup-history-table .btn-primary {
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 4px 10px;
}
