/**
 * Versandkosten-Fortschrittsbalken Styles — webpowers UG
 */

.wp-fsb {
    /* Unter Consent-/Cookie-Bannern bleiben (die meist z-index >= 2000 nutzen).
       1030 entspricht dem Bootstrap-Bereich für fixierte Elemente. */
    z-index: 1030;
    width: 100%;
    background: #0d6efd;
    color: #fff;
    box-sizing: border-box;
}

.wp-fsb--top {
    position: relative;
}

.wp-fsb--sticky-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}

.wp-fsb__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 20px;
}

.wp-fsb__content {
    flex: 1;
    min-width: 0;
}

.wp-fsb__msg {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}

.wp-fsb__track {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.wp-fsb__fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.95);
    transition: width 0.4s ease;
}

.wp-fsb--reached .wp-fsb__fill {
    background: #2ecc71;
}

.wp-fsb__cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wp-fsb__cart-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Platz schaffen, wenn die Leiste unten fixiert ist */
body.wp-fsb-active--sticky-bottom {
    padding-bottom: 64px;
}

body.wp-fsb-noscroll {
    overflow: hidden;
}

/* --- Drawer ------------------------------------------------------------- */

.wp-fsb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1040;
}

.wp-fsb-overlay--open {
    opacity: 1;
}

.wp-fsb-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 360px;
    max-width: 90vw;
    background: #fff;
    color: #333;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 1041;
    display: flex;
    flex-direction: column;
}

.wp-fsb-drawer--open {
    transform: translateX(0);
}

.wp-fsb-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
}

.wp-fsb-drawer__title {
    font-size: 16px;
    font-weight: 700;
}

.wp-fsb-drawer__close {
    border: none;
    background: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0 4px;
}

.wp-fsb-drawer__close:hover {
    color: #000;
}

.wp-fsb-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
}

.wp-fsb-drawer__empty {
    font-size: 14px;
}

.wp-fsb-drawer__cartclone {
    position: static !important;
    display: block !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 768px) {
    .wp-fsb__inner {
        padding: 8px 12px;
        gap: 10px;
    }

    .wp-fsb__msg {
        font-size: 12.5px;
    }
}

/* --- Reduced Motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .wp-fsb__fill,
    .wp-fsb-overlay,
    .wp-fsb-drawer {
        transition: none !important;
    }
}
