/**
 * Sowaka Bundle Selector Styles
 * Beautiful UI for the bundle selection interface
 */

/* Hide default quantity selector when bundle selector is active */
body.bundle-selector-active .quantity:not(.variety-quantity),
body.bundle-selector-active .woocommerce-variation-add-to-cart .quantity,
body.bundle-selector-active form.cart .quantity:not(.variety-quantity),
body.bundle-selector-active .woocommerce-variation-add-to-cart .qty,
body.bundle-selector-active .single_variation_wrap .quantity,
body.bundle-selector-active .qib-button-wrapper,
body.bundle-selector-active .qib-container {
    display: none !important;
    visibility: hidden !important;
}

/* Bundle Selector Container */
#sowaka-bundle-selector {
    margin: 0px 0px 15px 0px;
    padding: 12px;
    background: #F4E6C5;
    border: 1px solid rgba(13, 38, 54, 0.1);
    border-radius: 4px;
}

/* Bundle Header */
.bundle-header {
    margin-bottom: 10px;
}

.bundle-instruction {
    color: #0D2636;
    font-size: 13px;
    margin: 0;
    font-weight: 500;
}

/* Varieties List */
.bundle-varieties-list {
    margin-bottom: 10px;
}

/* Variety List Item */
.variety-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(13, 38, 54, 0.1);
}

.variety-list-item:last-child {
    border-bottom: none;
}

.variety-name {
    font-size: 13px;
    color: #0D2636;
    font-weight: 400;
    flex: 1;
}

/* Quantity Selector */
.variety-quantity {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Quantity Buttons */
.qty-btn {
    width: 22px;
    height: 22px;
    border: 1px solid rgba(13, 38, 54, 0.2);
    background: #ffffff;
    color: #0D2636;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    line-height: 1;
    padding: 6px;
    outline: none;
    border-radius: 50%;
    font-weight: 500;
}

.qty-btn:hover:not(:disabled) {
    background: rgba(13, 38, 54, 0.05);
    border-color: rgba(13, 38, 54, 0.3);
}

.qty-btn:active:not(:disabled) {
    background: rgba(13, 38, 54, 0.1);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Quantity Input */
.variety-qty-input {
    width: 28px;
    height: 22px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #0D2636;
    border: 1px solid rgba(13, 38, 54, 0.2);
    background: #ffffff;
    border-radius: 3px;
    -moz-appearance: textfield;
    appearance: textfield;
    padding: 0;
}

.variety-qty-input::-webkit-inner-spin-button,
.variety-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Bundle Summary */
.bundle-summary {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(13, 38, 54, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-text {
    font-size: 12px;
    color: #0D2636;
}

.summary-text .current-qty {
    font-weight: 600;
    color: #0D2636;
}

/* Summary Messages */
.summary-message {
    font-size: 11px;
}

.message {
    display: inline-block;
    padding: 0;
    font-size: 11px;
}

.message-warning {
    color: #0D2636;
    opacity: 0.7;
}

.message-success {
    color: #0D2636;
    font-weight: 500;
}

/* Add to Cart Button States */
.single_add_to_cart_button.bundle-incomplete {
    opacity: 0.6;
    cursor: not-allowed !important;
}

.single_add_to_cart_button.bundle-complete {
    opacity: 1;
}

/* Notifications */
.sowaka-notification {
    position: fixed;
    top: 100px;
    right: -350px;
    max-width: 350px;
    padding: 15px 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: right 0.3s ease;
    border-left: 4px solid;
}

.sowaka-notification.show {
    right: 20px;
}

.sowaka-notification-warning {
    border-left-color: #f39c12;
    background: #fff3cd;
    color: #856404;
}

.sowaka-notification-error {
    border-left-color: #e74c3c;
    background: #f8d7da;
    color: #721c24;
}

.sowaka-notification-success {
    border-left-color: #27ae60;
    background: #d4edda;
    color: #155724;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}


@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.variety-list-item.pulse {
    animation: pulse 0.2s ease;
}

.variety-list-item.shake-small {
    animation: shake 0.2s ease;
}

#sowaka-bundle-selector.shake {
    animation: shake 0.3s ease;
}



/* Mobile Responsive */
@media (max-width: 768px) {
    #sowaka-bundle-selector {
        padding: 10px;
    }
    
    .variety-list-item {
        padding: 5px 0;
    }
    
    .variety-name {
        font-size: 12px;
    }
    
    .qty-btn {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .variety-qty-input {
        width: 26px;
        height: 20px;
        font-size: 11px;
    }
}

/* Accessibility */
.qty-btn:focus-visible {
    outline: 2px solid #666;
    outline-offset: 1px;
}

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

