/**
 * Bundle Package Block Styles
 */

:root {
    --bp-active-bg: #DBFCFF;
}

/* Progress Bar */
.bp-progress {
    position: relative;
}

.bp-progress-steps {
    display: flex;
    justify-content: center;
    position: relative;
    margin: 0 auto;
}

.bp-progress-step {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-items: center;
    position: relative;
    z-index: 1;
    margin: 8px 32px 8px 0;
    font-weight: 400;
}

.bp-progress-number {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: var(--bs-primary);
    border: 1px solid var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.bp-progress-label {
    color: var(--bs-primary);
    text-align: center;
    transition: all 0.3s ease;
    padding-left: 16px;
}

.bp-progress-step.active .bp-progress-number {
    background-color: var(--bs-primary);
    color: white;
}

.bp-progress-step.active .bp-progress-label {
    color: var(--bs-primary);
}

.bp-progress-step.completed .bp-progress-number {
    background-color: var(--bs-primary);
    color: white;
}



/* Steps Container */
.bp-steps-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.bp-steps-container {
    position: relative;
}

.bp-step {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bp-step.active {
    display: block;
    opacity: 1;
}

.bp-step .dropdown a.dropdown-toggle::after{
    border-bottom: 0;
    border-left: .3em solid transparent;
    border-right: .3em solid transparent;
    border-top: .3em solid;
    content: "";
    display: inline-block;
    margin-left: .255em;
    vertical-align: .255em;
}
/* Step Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.mw-640{
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* Bundle Cards (Step 3) */
.bp-bundle-card {
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
}

.bp-bundle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.bp-bundle-card.active {
    background-color: var(--bp-active-bg) !important;
}

.bp-bundle-card .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Choice Cards (Step 5) */
.bp-choice-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.bp-choice-card[data-choice="yes"] {
    background-color: #fff;
}
.bp-choice-card.active[data-choice="yes"] {
    background-color: var(--bp-active-bg);
}
.bp-choice-card[data-choice="no"] {
    background-color: #fff;
}
.bp-choice-card.active[data-choice="no"] {
    background-color: #E7E7E7;
}

.bp-choice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}


#allergyDropdown::after,
#allergyDropdownExtra::after {
    display: none;
}

.step-choice-breakfast input[type="radio"] {
    display: none;
}
.step-choice-breakfast .card .card-title:before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid var(--bs-primary, #6c757d);
    border-radius: 50%;
    display: inline-block;
    text-align: center;
    line-height: 20px;
    margin-left: -33px;
    margin-top: 2px;
    font-size: 35px;
    font-weight: bold;
}
.step-choice-breakfast .card:has(input[type="radio"]:checked) .card-title:before {
    content: "•";
}
.step-choice-breakfast label{
    cursor: pointer;
}
/* Product Cards */
.bp-product-card {
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.bp-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.bp-product-card.active {
    border-color: var(--bs-success, #198754);
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.15);
}

.bp-product-card .bp-selected-badge {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.bp-product-card-wide .bp-quantity-controls {
    background-color: #E5E5E5;
    border-radius: 0 0 6px 6px;
    padding: 0.5rem;
}
.bp-product-card-wide.active .bp-quantity-controls {
    background-color: rgba(26, 89, 95, 0.831);
}
.bp-bundle-cards .badge,
.bp-product-card-wide .badge{
    letter-spacing: 0;
    --bs-badge-padding-x: 0.5rem;
    --bs-badge-padding-y: 0.2rem;
    --bs-badge-font-size: 0.8em;
}
/* cambia colore agli elementi alternando i colori */
.bp-product-card-wide .badge:nth-child(even){
    --bs-info-rgb: 0, 0, 0;
}
.bp-product-card-wide .card-body{
    min-height: 142px;
}

.bp-qty-minus,
.bp-qty-plus {
    cursor: pointer;
    user-select: none;
}

/* @keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} */

/* Wide Product Cards */
.bp-product-card-wide {
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin: 0 0.5rem 1rem 0.5rem;
}

.bp-product-card-wide:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.bp-product-card-wide.active {
    background-color: var(--bp-active-bg) !important;
}

/* Filter Bar */
.bp-filter-bar {
    position: sticky;
    top: 0;
    z-index: 100;
}

.bp-filter-btn,
.bp-filter-btn-extra {
    transition: all 0.2s ease;
}

.bp-filter-btn.active,
.bp-filter-btn-extra.active {
    background-color: var(--bs-primary, #0d6efd);
    color: white;
    border-color: var(--bs-primary, #0d6efd);
}

/* Selection Counter */
.bp-selection-counter {
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Mini Cart */
.bp-mini-cart {
    animation: slideInUp 0.5s ease;
}
.bp-mini-cart .card-header {
    background-color: #6A6969;
    color: white;
}
.bp-mini-cart .bp-remove-item{
    background-color: #6A6969 !important;
}


@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bp-mini-cart-toggle {
    cursor: pointer;
    user-select: none;
}

.bp-mini-cart-toggle:hover {
    opacity: 0.9;
}

.bp-mini-cart-count {
    min-width: 24px;
    text-align: center;
}

.bp-mini-cart-body {
    animation: expandDown 0.3s ease;
}

@keyframes expandDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 400px;
        opacity: 1;
    }
}

/* Navigation Buttons */
.bp-navigation {
    position: sticky;
    bottom: 0;
    padding: 1rem 0;
    z-index: 50;
}

.bp-btn-prev,
.bp-btn-next {
    min-width: 150px;
    transition: all 0.2s ease;
}

.bp-btn-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Summary Section */
.bp-summary .card {
    transition: all 0.3s ease;
}

.bp-summary .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.bp-summary .list-group-item {
    border-left: none;
    border-right: none;
}

.bp-summary .list-group-item:first-child {
    border-top: none;
}

.bp-summary .list-group-item:last-child {
    border-bottom: none;
}

.bp-qty-input{
    width: 4.5rem;
    min-width: 3.631rem;
    background-color: white !important;
    border-radius: 4px !important;
    border: 0 !important;
    padding: 0.75rem 1rem !important;
    line-height: 1;
    text-align: center;
    /* devo assengnare stile input come text */
    -webkit-appearance: none;
    -moz-appearance:textfield;
    appearance: textfield;
}

/* Responsive */
@media (max-width: 768px) {
    .bp-progress-steps {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: start;
    }
    
    .bp-progress-step {
        flex: 0 0 calc(50% - 0.5rem);
        margin-bottom: 10px;
        display: none;
        justify-content: flex-start;
    }
    .bp-progress-step.active{
        display: flex;
    }
    
    .bp-progress-steps::before {
        display: none;
    }
    
    .bp-progress-label {
        font-size: 0.85rem;
    }
    
    .bp-progress-number {
        font-size: 0.875rem;
        margin-right: 0.5rem;
    }
    
    .bp-progress-step.completed .bp-progress-label {
        color: var(--bs-primary);
    }
    
    .bp-filter-bar {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .bp-mini-cart.bottom-0 {
        position: fixed !important;
        bottom: 71px !important;
        right: 0px !important;
        left: 0px !important;
        margin: 0 !important;
    }
    
    .bp-mini-cart .card {
        width: 100% !important;
    }
    
    .bp-navigation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 0.75rem 1rem;
        background-color: white;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    }
    
    .bp-btn-prev,
    .bp-btn-next {
        min-width: auto;
        flex: 1;
    }
}

@media (max-width: 576px) {
    .bp-progress-step {
        flex: 0 0 calc(50% - 10px);
    }
    
    .bp-selection-counter {
        font-size: 0.8rem;
    }
}

/* Loading State */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Utilities */
.bp-info {
    font-size: 0.875rem;
}

.bp-step1-buttons button {
    font-weight: 500;
}

/* Print Styles */
@media print {
    .bp-progress,
    .bp-navigation,
    .bp-mini-cart,
    .bp-filter-bar {
        display: none !important;
    }
}

/* Isotope Grid Fix */
.bp-products-grid,
.bp-extra-products-grid {
    transition: height 0.3s ease;
}

.bp-product-item {
    transition: all 0.3s ease;
    width: 33.3333%;
}
@media (max-width: 860px) {
    .bp-product-item {
        width: 50%;
    }
}
@media (max-width: 576px) {
    .bp-product-item {
        width: 100%;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.bp-bundle-card:focus-within,
.bp-choice-card:focus-within,
.bp-product-card:focus-within {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}

button:focus-visible {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}
