/**
 * BV WooCommerce Attribute Sets - Frontend Styles
 * 
 * =========================================================================
 * CUSTOMER INTERFACE STYLING
 * =========================================================================
 * This stylesheet creates an intuitive, visually appealing interface for
 * customers to configure products using the plugin's attribute hierarchy.
 * The design focuses on clarity, ease of use, and mobile responsiveness.
 * 
 * DESIGN GOALS:
 * • Clear visual hierarchy that guides customer choices
 * • Intuitive selection states and feedback
 * • Mobile-first responsive design
 * • Integration with popular WooCommerce themes
 * • Accessibility compliance (WCAG 2.1 AA)
 * • Performance optimization (minimal CSS, efficient animations)
 * 
 * CUSTOMER EXPERIENCE PRINCIPLES:
 * • Progressive disclosure - show relevant options based on selections
 * • Clear pricing feedback - immediate visual indication of price changes
 * • Visual confirmation - selected states clearly indicated
 * • Error prevention - disable invalid combinations
 * • Mobile optimization - touch-friendly interfaces
 * 
 * COMPONENT STRUCTURE:
 * 1. Main Container - Overall attribute selection interface
 * 2. Attribute Sets - Logical choice categories (LEGS, SEAT, etc.)
 * 3. Price Groups - Pricing tiers within each category
 * 4. Selection Interface - Radio buttons, dropdowns, color swatches
 * 5. Modal System - Overlay for complex selections
 * 6. Price Display - Dynamic pricing updates
 * 7. Mobile Optimization - Responsive breakpoints and touch UI
 * 
 * VISUAL STATES:
 * • Default - Available for selection
 * • Selected - Currently chosen option
 * • Hover - Interactive feedback
 * • Disabled - Not available based on other selections
 * • Loading - Processing state during AJAX operations
 * 
 * THEME INTEGRATION:
 * Designed to work seamlessly with popular WooCommerce themes while
 * maintaining the plugin's visual identity and functional requirements.
 */

/* =========================================================================
   MAIN CONTAINER & LAYOUT
   ========================================================================= */
/* Primary container for all attribute selection interfaces */

.bv-attribute-sets-container {
    margin: 20px 0;
}

.bv-attribute-sets-container h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.2em;
    border-bottom: 2px solid #00a1a3;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Current selections display */
.bv-current-selections {
    margin-bottom: 20px;
}

.bv-current-selections h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

/* Attribute sets buttons */
.bv-attribute-sets-buttons {
    margin-bottom: 20px;
}

.bv-open-modal-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 20px;
    margin-bottom: 0;
    background: #fff;
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bv-open-modal-btn:hover {
    border-color: #00a1a3;
    background-color: #f0f8ff;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.15);
}

.bv-open-modal-btn:last-child {
    margin-bottom: 0;
}

.bv-set-icon {
    font-size: 24px;
    margin-right: 15px;
    color: #00a1a3;
}

.bv-set-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
	margin-left: 8px;
}

.bv-set-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.bv-set-selection {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bv-set-selection small {
    color: #00a1a3;
    font-weight: 600;
}

.bv-set-arrow {
    font-size: 20px;
    color: #00a1a3;
    transition: transform 0.3s ease;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Price summary */
.bv-price-summary-main {
    padding: 20px;
    background: #fff;
    border: 2px solid #00a1a3;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.bv-price-summary-main .qty {
	border-radius: 22px !important;
}

.bv-price-summary-main .added_to_cart {
    display: none;
}

.bv-price-summary-main .single_add_to_cart_button {
	margin-bottom: 0 !important;
	background-color: #292C3A !important;
	border: 0 !important;
}

.bv-price-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.bv-price-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.bv-price-amount {
    font-size: 24px;
    font-weight: bold;
    color: #00a1a3;
    transition: all 0.3s ease;
}

/* Modal styles */
.bv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.bv-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    height: 100%;
}

.bv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
}

.bv-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.bv-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0 !important;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.bv-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.bv-modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Modal tabs */
.bv-modal-tabs {
    display: flex;
    gap: 15px;
    background: #FFF;
    margin: 0px 35px;
	border: 1px solid #CACACA;
	height: 44px;
	border-radius: 24px;
	box-sizing: content-box !important;
	align-self: flex-start;
}

.bv-tab-btn {
    padding: 10px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666 !important;
    transition: all 0.3s ease;
    border: 1px solid transparent !important;
    border-radius: 22px;
	height: 44px;
	box-shadow: unset !important;
}

.bv-tab-btn:hover {
    background: #e9ecef;
    color: #333;
}

.bv-tab-btn.active {
    background: #fff;
    color: #00A1A3 !important;
    border: 1px solid #00a1a3 !important;
}

.bv-modal-tabs-content {
    padding: 25px 35px;
    overflow-y: auto;
}

.bv-tab-content {
    display: none;
}

.bv-tab-content.active {
    display: block;
}

/* Modal price groups */
.bv-modal-price-group {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e1e1e1;
}

.bv-modal-price-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Unified selection styling */
.bv-modal-unified-selection {
    margin-bottom: 20px;
}

.bv-option-group {
    margin-bottom: 25px;
}

.bv-option-group:last-child {
    margin-bottom: 0;
}

.bv-option-group-header {
    margin-bottom: 10px;
}

.bv-option-group-title {
    color: #333;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bv-option-group-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.bv-option-group-description p {
    margin: 0 0 8px 0;
}

.bv-option-group-description p:last-child {
    margin-bottom: 0;
}

.bv-option-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Attribute sections within price groups */

.bv-attribute-section {
    margin-bottom: 40px;
}

.bv-attribute-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.bv-attribute-header {
    margin-bottom: 12px;
}

.bv-attribute-title {
    color: #555;
    font-size: 14px;
    font-weight: 600;
}

.bv-attribute-description {
    color: #777;
    font-size: 13px;
    line-height: 1.4;
}

.bv-attribute-description p:last-child {
    margin-bottom: 0;
}

/* Compact mode - smaller items, more per row */
.bv-option-group-items-compact {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 8px;
}

.bv-option-group-items-compact .bv-option-name {
    font-size: 11px;
    max-width: 60px;
}

/* Wide mode - larger items, fewer per row */
.bv-option-group-items-wide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.bv-option-group-items-wide .bv-option-name {
    font-size: 13px;
    max-width: 100px;
}

/* Radio button styles for different modes */
.bv-option-group-items-compact .bv-modal-option-radio {
    padding: 8px 12px;
    font-size: 13px;
}

.bv-option-group-items-compact label {
    overflow: hidden;
}

.bv-option-group-items-wide .bv-modal-option-radio {
    padding: 12px 16px;
    font-size: 14px;
}

.bv-option-group-items-wide .bv-modal-option-image {
    flex-direction: row;
    gap: 20px;
}

.bv-option-group-items-wide .bv-modal-option-image .bv-option-image {
    height: 90px;
    width: 90px;
}

.bv-option-group-items-wide .bv-modal-option-image .bv-option-image img {
    height: 100%;
}

.bv-modal-price-group h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bv-group-price {
    color: #00a1a3;
    font-weight: 600;
}

.bv-group-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Modal options grid (for images) */
.bv-modal-options-grid {
    display: grid;
    gap: 15px;
}

.bv-modal-option-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
}

.bv-modal-option-image:hover .bv-option-image, 
.bv-modal-option-image:hover .bv-option-text{
    border-color: #00a1a3;
}

.bv-modal-option-image input[type="radio"] {
    display: none;
}

.bv-modal-option-image input[type="radio"]:checked + .bv-option-image,
.bv-modal-option-image input[type="radio"]:checked + .bv-option-color,
.bv-modal-option-image input[type="radio"]:checked + .bv-option-text {
    border-color: #00a1a3;
}

.bv-modal-option-image input[type="radio"]:checked ~ .bv-option-name {
    color: #00a1a3;
}

.bv-modal-option-image {
    position: relative;
}

.bv-image-magnifier {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 28px;
    height: 28px;
    background: #FFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(2px);
    border: 1px solid #ddd;
}

.bv-image-magnifier:hover {
    background: #ddd;
}

.bv-image-magnifier svg {
    width: 18px;
    height: 18px;
    fill: #333333;
}

.bv-modal-option-image:hover .bv-image-magnifier {
    opacity: 1;
}

.bv-option-image {
    border-radius: 32px;
    border: 2px solid #ddd;
    overflow: hidden;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}

.bv-option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image popup */
.bv-image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.bv-image-popup.show {
    opacity: 1;
}

.bv-image-popup-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.bv-image-popup-content img {
    display: block;
    max-width: 80vw;
    max-height: 80vh;
    object-fit: cover;
    width: auto;
    height: auto;
    min-width: 250px;
}

.bv-image-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
	padding: 0 !important;
}

.bv-image-popup-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.bv-image-popup-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    text-align: center;
}

.bv-image-popup-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.bv-image-popup-group {
    font-size: 14px;
    opacity: 0.9;
}

/* Responsive popup */
@media (max-width: 768px) {
    .bv-image-popup {
        padding: 10px;
    }
    
    .bv-image-popup-content img {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .bv-image-magnifier {
        width: 24px;
        height: 24px;
        bottom: 6px;
        left: 6px;
    }
    
    .bv-image-magnifier svg {
        width: 14px;
        height: 14px;
    }
}

/* Always show magnifier on touch devices */
@media (hover: none) and (pointer: coarse) {
    .bv-image-magnifier {
        opacity: 0.8;
    }
}
.bv-option-color {
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.bv-option-text {
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #333;
    background: #f9f9f9;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.bv-option-name {
    font-size: 12px;
    color: #333;
    text-align: center;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.bv-option-group-items-compact .bv-option-info {
    max-width: 100%;
}

.bv-option-info span {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    hyphens: auto;
}

.bv-option-description {
    font-size: 11px;
    color: #575757;
    text-align: center;
    line-height: 1;
}

/* Modal options list (for radio buttons) */
.bv-modal-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bv-modal-option-radio {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #e1e1e1;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.bv-modal-option-radio:hover {
    border-color: #00a1a3;
    background-color: #f0f8ff;
}

.bv-modal-option-radio input[type="radio"] {
    margin-right: 10px;
}

.bv-modal-option-radio input[type="radio"]:checked {
    accent-color: #00a1a3;
}

.bv-option-label {
    font-size: 14px;
    color: #333;
}

/* Modal footer */
.bv-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 35px;
    border-top: 1px solid #e1e1e1;
    background: #FFF;
}

.bv-modal-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bv-modal-price-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.bv-modal-price-amount {
    font-size: 20px;
    font-weight: bold;
    color: #00a1a3;
}

.bv-modal-actions {
    display: flex;
    gap: 10px;
}

.bv-modal-cancel {
    padding: 10px 20px;
    border: 1px solid #292C3A !important;
    background: #fff !important;
    color: #292C3A !important;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bv-modal-cancel:hover {
    background: #f5f5f5;
    border-color: #999;
}

.bv-modal-confirm {
    padding: 10px 20px;
    background: #292C3A !important;
    color: #fff !important; 
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.bv-modal-confirm:hover {
    background: #005a87;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.bv-price-group,
.bv-attribute-set {
    margin: 15px 0;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
}

.bv-price-group h4,
.bv-attribute-set h4 {
    margin-top: 0;
    color: #00a1a3;
    font-size: 1.1em;
}

.bv-group-description,
.bv-set-description {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.bv-attribute-field {
    margin: 10px 0;
}

.bv-attribute-field label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.bv-attribute-select,
.bv-unified-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.bv-attribute-select:focus,
.bv-unified-select:focus {
    border-color: #00a1a3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.bv-attribute-select.has-value,
.bv-unified-select.has-value {
    border-color: #00a1a3;
}

/* Enhanced styling for unified selects */
.bv-unified-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* Integration with theme styles */
.bv-attribute-sets-container {
    margin: 16px 0;
}

.bv-open-modal-btn,
button.bv-open-modal-btn {
    height: 52px;
    background: white;
    border: 1px solid #cbcbcb !important;
    border-radius: 26px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    border-color: #cacaca;
}

.bv-open-modal-btn:hover {
    border-color: #00a1a3;
    background-color: #f0f8ff;
}

.bv-set-name {
    font-size: 14px;
    font-weight: normal;
    color: #373737;
}

.bv-set-selection {
    font-size: 12px;
    font-weight: 300;
    color: #373737;
}

.bv-set-arrow {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    border: 1px solid #00a1a3;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #00a1a3;
	margin-bottom: 1px;
}

.bv-set-image-circle {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    border: 1px solid #cacaca;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #00a1a3;
    overflow: hidden;
    flex-shrink: 0;
}

.bv-set-image-circle img {
    width: 100%;
}

.bv-price-summary-main {
    background: white;
    border: 1px solid #cacaca;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.bv-price-label {
    font-size: 14px;
    color: #373737;
    margin-right: 8px;
}

.bv-price-amount {
    font-size: 14px;
    font-weight: 600;
    color: #00a1a3;
}

.bv-unified-select optgroup {
    font-weight: bold;
    color: #00a1a3;
    background-color: #f8f9fa;
    padding: 5px 0;
}

.bv-unified-select option {
    padding: 5px 10px;
    font-weight: normal;
}

/* Image grid styling */
.bv-image-group {
    margin-bottom: 20px;
}

.bv-image-group-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #00a1a3;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 5px;
}

.bv-image-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bv-image-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fff;
    min-width: 80px;
    text-align: center;
}

.bv-image-option:hover {
    border-color: #00a1a3;
    background-color: #f0f8ff;
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.2);
}

.bv-image-option input:checked + .bv-attribute-image,
.bv-image-option input:checked + .bv-color-swatch,
.bv-image-option input:checked + .bv-text-option {
    border-color: #00a1a3;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.3);
}

.bv-image-option.selected {
    border-color: #00a1a3;
    background-color: #e8f4fd;
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.bv-attribute-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid #ddd;
    overflow: hidden;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.bv-attribute-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bv-text-option {
    width: 50px;
    height: 50px;
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    background: #f9f9f9;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.bv-option-label {
    font-size: 12px;
    color: #333;
    text-align: center;
    line-height: 1.2;
    max-width: 80px;
    word-wrap: break-word;
    display: flex;
    gap: 5px;
}

.bv-option-label small {
    display: block;
    color: #00a1a3;
    font-weight: 600;
}

.bv-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bv-radio-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
}

.bv-radio-option:hover {
    border-color: #00a1a3;
    background-color: #f0f8ff;
}

.bv-radio-option.selected {
    border-color: #00a1a3;
    background-color: #00a1a3;
    color: #fff;
}

.bv-radio-option input[type="radio"] {
    margin-right: 8px;
}

.bv-color-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bv-color-option {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.bv-color-option:hover {
    border-color: #00a1a3;
    transform: scale(1.1);
}

.bv-color-option.selected {
    border-color: #00a1a3;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.3);
    transform: scale(1.1);
}

.bv-color-swatch {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ccc;
}

.bv-price-summary {
    padding: 15px;
    background-color: #fff;
    border: 2px solid #00a1a3;
    border-radius: 5px;
    text-align: center;
}

.bv-total-price {
    margin: 0;
    font-size: 1.2em;
    color: #00a1a3;
}

.bv-price-amount {
    font-size: 1.3em;
    font-weight: bold;
    transition: all 0.3s ease;
}

.bv-price-amount.updating {
    opacity: 0.6;
    transform: scale(0.95);
    position: relative;
}

.bv-price-amount.updating::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -25px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid #00a1a3;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Prevent body scroll when modal is open */
.bv-modal-open {
    overflow: hidden;
}

/* Prevent body scroll when popup is open */
.bv-popup-open {
    overflow: hidden;
}

/* Responsive design */
@media (max-width: 768px) {
    .bv-woocommerce-form-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px;
    }
    
    .quantity-wrapper {
        justify-content: center;
    }
    
    .bv-modal {
        padding: 10px;
    }
    
    .bv-modal-content {
        max-height: 95vh;
    }
    
    .bv-modal-header {
        padding: 15px 20px;
    }
    
    .bv-modal-tabs-content {
        padding: 20px;
    }
    
    .bv-modal-options-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .bv-modal-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .bv-modal-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .bv-modal-cancel,
    .bv-modal-confirm {
        flex: 1;
    }
    
    .bv-attribute-sets-container {
        margin: 10px 0;
        padding: 15px;
    }
    
    .bv-image-options {
        justify-content: center;
        gap: 8px;
    }
    
    .bv-image-option {
        min-width: 70px;
        padding: 6px;
    }
    
    .bv-attribute-image {
        width: 45px;
        height: 45px;
    }
    
    .bv-text-option {
        width: 45px;
        height: 45px;
        font-size: 11px;
    }
    
    .bv-option-label {
        font-size: 11px;
        max-width: 70px;
    }
    
    .bv-radio-group {
        flex-direction: column;
    }
    
    .bv-radio-option {
        margin-bottom: 5px;
    }
    
    .bv-color-group {
        justify-content: center;
    }
}

/* Admin styling */
.bv-loading {
    padding: 10px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    margin: 10px 0;
}

.form-table .bv-attribute-field {
    margin: 5px 0;
}

.bv-attribute-set-preview ul {
    list-style: disc;
    padding-left: 20px;
}

.bv-price-group-attributes .form-table td {
    padding: 8px 0;
}

.bv-attribute-set-price-groups .form-table td {
    padding: 8px 0;
}

.bv-default-selection-field {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.bv-default-selection-field:last-child {
    border-bottom: none;
}

/* Enhanced animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bv-price-group,
.bv-attribute-set {
    animation: fadeIn 0.3s ease-out;
}

/* Better focus states */
.bv-radio-option:focus-within,
.bv-color-option:focus-within {
    outline: 2px solid #00a1a3;
    outline-offset: 2px;
}

/* Loading state for price calculation */
.bv-price-summary.loading {
    opacity: 0.7;
}

.bv-price-summary.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #00a1a3;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification styles */
.bv-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 999999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
}

.bv-notification.show {
    transform: translateX(0);
}

.bv-notification-success {
    background: #28a745;
    border-left: 4px solid #1e7e34;
}

.bv-notification-error {
    background: #dc3545;
    border-left: 4px solid #c82333;
}

.bv-notification-info {
    background: #17a2b8;
    border-left: 4px solid #138496;
}

/* Loading state for add to cart button */
.add-to-cart-btn:disabled,
button[name="add-to-cart"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.add-to-cart-btn:disabled::after,
button[name="add-to-cart"]:disabled::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .bv-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .bv-notification.show {
        transform: translateY(0);
    }
}

/* Debug styles for admin */
.bv-debug-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 12px;
}

.bv-debug-info h5 {
    margin: 0 0 10px 0;
    color: #856404;
}

.bv-debug-info code {
    background: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}


/* Product Configuration */
.product-configuration {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.config-option {
    height: 51px;
    background: white;
    border: 1px solid #cacaca;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-option-info h4 {
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 2px;
}

.config-option-info p {
    font-size: 12px;
    font-weight: 300;
}

.config-option-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-option-image {
    width: 29px;
    height: 29px;
    border-radius: 50%;
}

.config-option-image.special {
    border: 1px solid #00a1a3;
}

.config-button {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    border: 1px solid #00a1a3;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Quantity and Add to Cart */
.quantity-cart-section {
    background: white;
    border: 1px solid #cacaca;
    border-radius: 12px;
    padding: 16px;
    height: 87px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
}
