/* RapitwebGreen - Sidebar Panels - Minimal */

.b-sidebar {
    --bs-offcanvas-width: 380px;
    --bs-offcanvas-bg: var(--white);
}

    .b-sidebar.offcanvas-end {
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.08);
    }

    .b-sidebar.offcanvas-start {
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.08);
    }

/* Header */
.b-sidebar-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray);
    gap: 0.75rem;
}

    .b-sidebar-header .btn-close {
        opacity: 0.5;
        flex-shrink: 0;
    }

        .b-sidebar-header .btn-close:hover {
            opacity: 1;
        }

    .b-sidebar-header strong {
        font-size: 1rem;
        font-weight: 600;
        margin: 0;
    }

    .b-sidebar-header a {
        color: var(--main);
        text-decoration: none;
    }

/* Body */
.b-sidebar-body {
    padding: 1.5rem 1rem;
    flex: 1;
    overflow-y: auto;
}

    .b-sidebar-body .spinner-border {
        width: 36px;
        height: 36px;
        border-width: 3px;
        color: var(--main);
    }

    .b-sidebar-body .d-flex.flex-column {
        height: 100%;
        justify-content: center;
        text-align: center;
    }

    .b-sidebar-body .b-icon {
        font-size: 1.5rem;
        color: var(--muted);
        opacity: 1;
        margin-bottom: 1rem;
    }

    .b-sidebar-body .text-muted {
        font-size: 0.9rem;
        color: var(--muted);
    }

    /* Items */
    .b-sidebar-body .item {
        display: flex;
        gap: 1rem;
        padding: 1rem 0;
        border-bottom: 1px solid var(--gray);
        width: 100%;
        font-family: .85rem !important;
    }


        .b-sidebar-body .item:last-child {
            border-bottom: none;
        }
        /* Image */
        .b-sidebar-body .item a:first-child {
            border-radius: var(--radius-md);
            overflow: hidden;
            background: var(--gray);
            display: block;
            flex-shrink: 0;
        }

            .b-sidebar-body .item a:first-child img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                max-width: 75px
            }

        .b-sidebar-body .item img {
            margin-left:unset
        }
        /* Content */
        .b-sidebar-body .item .col {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .b-sidebar-body .item a {
            color: var(--text);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.8rem !important;
            padding: 2px 5px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            background: unset
        }

            .b-sidebar-body .item a:hover {
                color: var(--main);
            }

        .b-sidebar-body .item .attributes {
            font-size: 0.8rem;
            color: var(--muted);
        }

        .b-sidebar-body .item .price,
        .b-sidebar-body .item .quantity {
            font-size: 0.7rem;
            color: var(--muted);
        }

            .b-sidebar-body .item .price strong,
            .b-sidebar-body .item .quantity strong {
                color: var(--text);
                font-weight: 600;
            }
        /* Delete button */
        .b-sidebar-body .item .deleteitem {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: none;
            cursor: pointer;
            color: var(--muted);
            transition: color 0.2s ease;
            padding: 0;
            flex-shrink: 0;
        }

            .b-sidebar-body .item .deleteitem:hover {
                color: var(--danger);
            }

            .b-sidebar-body .item .deleteitem i {
                font-size: 1.1rem;
            }
/* Footer */
.b-sidebar-footer {
    padding: 0;
    border-top: 1px solid var(--gray);
    background: var(--bg);
}

.b-sidebar-footer .bg-dark {
    background: var(--dark) !important;
    padding: 1rem !important;
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 0 !important;
}

.b-sidebar-footer .bg-dark > div:first-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 70px;
    text-align: center;
}

.b-sidebar-footer .bg-dark > div:last-child {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.b-sidebar-footer .text-white {
    color: var(--white);
}

.b-sidebar-footer .h5 {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--white);
    margin: 0;
    line-height: 1.2;
}

.b-sidebar-footer .h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
    line-height: 1;
}

.b-sidebar-footer .btn {
    background: var(--white);
    color: var(--dark);
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 999px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 36px;
}

.b-sidebar-footer .btn:hover {
    background: var(--main);
    color: var(--white);
}
/* Responsive */
@media (max-width: 576px) {
    .b-sidebar {
        --bs-offcanvas-width: 100%;
    }

    .b-sidebar-header {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

        .b-sidebar-header strong {
            font-size: 0.95rem;
        }

    .b-sidebar-body {
        padding: 1rem 0.75rem;
    }

        .b-sidebar-body .item {
            gap: 0.75rem;
            padding: 0.75rem 0;
            width: 100%;
            background: var(--gray);
            border: 1px solid #fff;
            border-radius: 1rem;
        }

            .b-sidebar-body .item a:first-child {
                width: 70px;
                height: 70px;
            }

            
    .b-sidebar-footer .bg-dark {
        padding: 1rem;
    }

    .b-sidebar-footer .h5 {
        font-size: 0.8rem;
    }

    .b-sidebar-footer .h4 {
        font-size: 1.1rem;
    }

    .b-sidebar-footer .btn {
        padding: 0.65rem 1rem;
        font-size: 0.8rem;
    }

    .b-sidebar-footer .py-3 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}
/* Dark mode */
[dark-theme="true"] .b-sidebar-body .item {
    border-bottom-color: var(--gray);
}

[dark-theme="true"] .b-sidebar-footer {
    border-top-color: var(--gray);
}
/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .b-sidebar-header .btn-close,
    .b-sidebar-body .item .deleteitem,
    .b-sidebar-footer .btn {
        transition: none;
    }
}
