/**
 * SkinnyBox Customisations - Custom Styles
 *
 * Basic styles for SkinnyBox customisations
 * Note: Product description repositioning is primarily handled by JavaScript
 * Additional styles for product display customizations
 *
 * This CSS file is only loaded on mobile devices via server-side detection.
 * All styles are also wrapped in a mobile media query as a fallback.
 */


 .status_msg {
    display: none;
}

.custom-bar {
    display: none!important;
}


/* Mobile-only styles - applied only when screen width is 768px or less */


@media (max-width: 768px) {
/* Styling for the full-width description row added by JavaScript */
.full-width-description-row td {
    padding: 10px !important;
    border: none !important;
    background-color: transparent !important;
}

/* Style the product description */
.bundled_product_excerpt, .product_excerpt {
    line-height: 1.5;
    color: #333;
    display: block;
    width: 100%;
}

table.bundled_products .bundled_product_summary td.bundled_item_details_col .details {
    max-height: 70px;
}

/* Ensure the description is visible when repositioned */
.full-width-description-row .bundled_product_excerpt,
.full-width-description-row .product_excerpt {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure proper spacing in the table */
.bundled_products tr {
    vertical-align: top;
}

/* Reduce spacing between products */
.bundled_product {
    margin-bottom: 10px;
}

/* Product layout structure */
.selection-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 15px 0;
    padding: 0 10px;
}

/* Checkbox container */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Checkbox label */
.checkbox-label {
    font-weight: bold;
    margin-left: 8px;
    white-space: nowrap;
}

/* Custom checkbox styling */
.custom-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #333; /* Make border bold */
    background-color: white;
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.custom-checkbox.checked {
    background-color: #666;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="white" d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>');
    background-size: 16px 16px;
    background-position: center;
    background-repeat: no-repeat;
}

.custom-checkbox.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #999;
}


/* Custom quantity field styling */
.custom-qty {
    width: 50px;
    height: 50px;
    margin-left: auto;
}

.qty-input {
    width: 100%;
    height: 100%;
    font-weight: bold;
    background-color: #e8e7e3; /* Light beige/gray background to match screenshot */
    border: 1px solid #ddd;
    padding: 0;
    text-align: center;
    border-radius: 0;
    box-sizing: border-box;
    font-size: 18px;
}

/* Selection counter bar */
.selection-counter-bar {
    background-color: #eb00c7;
    color: white;
    padding: 6px 15px;
    border-radius: 5px;
    margin-top: 15px;
    margin-bottom: 15px;
    position: sticky;
    bottom: 110px; /* Set bottom value to match screenshot */
    z-index: 100;
    display: flex;
    align-items: center;
    height: 36px;
    box-sizing: border-box;
    font-weight: bold;
    position: relative;
    overflow: hidden; /* Ensure the progress bar doesn't overflow */
}

/* Linear progress container */
.linear-progress-container {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 6px !important; /* Increased height for better visibility */
    background-color: rgba(255, 255, 255, 0.3) !important;
    overflow: hidden !important;
    z-index: 10 !important; /* Ensure it's above other elements */
}

/* Styling for containers with progress bars */
.woocommerce-info, .component_message.bottom {
    position: relative !important; /* Force relative positioning */
    overflow: visible !important; /* Changed from hidden to visible */
    z-index: 1 !important; /* Ensure proper stacking context */
}

/* Linear progress bar */
.linear-progress-bar {
    height: 100% !important;
    background-color: #0066ff !important; /* Blue color for visibility */
    min-width: 0.5% !important; /* Ensure it's always at least slightly visible */
    width: 0%; /* Will be updated via JavaScript - removed !important to allow JS updates */
    transition: width 0.3s ease !important;
    z-index: 11 !important; /* Ensure it's above the container */
}

/* Milestone effect for linear progress bar */
.linear-progress-bar.milestone {
    animation: progress-glow 1s ease-in-out;
}

@keyframes progress-glow {
    0% { box-shadow: 0 0 5px rgba(0, 102, 255, 0.5); }
    50% { box-shadow: 0 0 15px rgba(0, 102, 255, 0.8); }
    100% { box-shadow: 0 0 5px rgba(0, 102, 255, 0.5); }
}

/* Progress meter styling */
.progress-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
    position: relative;
    clear: both;
}

/* Progress meter */
.progress-meter {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 101;
}

/* Progress bar fill */
.progress-bar {
    height: 100%;
    background-color: #0066ff; /* Changed from white to blue */
    width: 0%; /* Will be updated via JavaScript */
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Percentage text */
.progress-percentage {
    position: absolute;
    font-size: 10px;
    font-weight: bold;
    color: white;
}

/* Percentage text in the progress container */
.progress-container .progress-percentage {
    right: 5px;
    top: -18px;
    font-size: 12px;
}

/* Percentage text in the progress meter */
.progress-meter .progress-percentage {
    position: absolute;
    font-size: 10px;
}

/* Glow effect for milestones */
.progress-meter.milestone {
    animation: glow 1s ease-in-out;
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(0, 102, 255, 0.5); }
    50% { box-shadow: 0 0 15px rgba(0, 102, 255, 0.8); }
    100% { box-shadow: 0 0 5px rgba(0, 102, 255, 0.5); }
}

.counter-text {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    width: 100%;
    align-items: center;
    line-height: 1;
}

/* Style the text elements inside the counter */
.items-to-select, .items-selected {
    white-space: nowrap;
    display: inline-block;
}

.bundled_items_selection_msg,
.bundled_items_selection_status {
    white-space: nowrap !important;
    display: inline-block !important;
    font-size: 14px !important; /* Increased font size */
    line-height: 1.2 !important; /* Slightly increased line height */
    margin: 10px 10px 10px 10px !important;
    padding: 10px 10px 10px 10px !important;
    font-weight: bold !important;
}

/* Ensure the container is properly styled */
.component_message.bottom {
    margin: 0 !important;
    padding: 0 !important;
}

.validation_message {
    display: flex !important;
    align-items: center !important;
    left: 44% !important;
    bottom: 100px !important;
    height: 36px !important; /* Match the height of status_msg */
    margin: 0 !important;
    padding: 0 !important;
    min-height: 36px !important; /* Override any min-height */
    background-color: transparent !important; /* Remove any background color */
}

/* Force the list items to display inline */
.woocommerce-info ul,
.woocommerce-info li {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 36px !important; /* Match the height of status_msg */
    min-height: 36px !important; /* Override any min-height */
}

/* Style the woocommerce-info div */
.woocommerce-info {
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    border-radius: 10px !important;
    position: relative !important;
    padding-bottom: 6px !important; /* Add padding at the bottom for the progress bar */
}


/* Ensure consistent styling for woocommerce-message */
.woocommerce-message {
    background-color: #e94caf !important; /* Match the pink color used in selection counter bar */
    color: white !important;
}

/* Remove background from woocommerce-error */
.woocommerce-error {
    background-color: transparent !important; /* Remove background color */
}

/* Target the li element specifically */
.woocommerce-info li {
    padding: 0 !important;
    margin: 0 !important;
}

/* Repositioned stock message */
.repositioned-stock {
    color: #e94caf !important;
    font-weight: normal;
    margin-top: 5px;
    margin-bottom: 10px;
    display: block;
}

/* Product description styling - remove border */
.full-width-description-row td {
    background-color: transparent !important;
    border: none !important;
}

/* Ensure proper positioning of elements */
.bundled_item_images_col {
    position: relative;
}

.bundled_product_title {
    margin-top: 0 !important;
    margin-bottom: 5px !important;
}

/* Hide original elements that we're replacing */
.bundled_item_qty_col {
    display: none !important;
}

/* Reduce padding in table cells */
.bundled_item_col {
    padding: 10px !important;
}

/* Reduce spacing around product title */
.bundled_product_title {
    margin-top: 0 !important;
    margin-bottom: 5px !important;
}

/* Reduce spacing around product excerpt */
.bundled_product_excerpt {
    margin-top: 5px !important;
    margin-bottom: 10px !important;
}

/* Additional mobile-specific styles */
/* These are already inside the main mobile media query, so no need for another @media block */

/* Ensure the description spans full width */
.full-width-description-row td {
    width: 100% !important;
    display: block !important;
}

/* Add some spacing around the description */
.full-width-description-row .bundled_product_excerpt,
.full-width-description-row .product_excerpt {
    padding: 0 !important;
    margin: 0 !important;
}

/* Adjust spacing for mobile */
.bundled_product {
    margin-bottom: 5px;
}

/* Make selection counter bar full width on mobile */
.selection-counter-bar {
    border-radius: 0;
    margin-left: -15px;
    margin-right: -15px;
    width: calc(100% + 30px);
    height: 36px;
    bottom: 110px; /* Set bottom value to match screenshot */
    position: relative; /* Ensure the linear progress bar is positioned correctly */
    overflow: hidden; /* Ensure the linear progress bar doesn't overflow */
}

/* Ensure text stays on one line on mobile */
.counter-text {
    flex-wrap: nowrap;
    font-size: 13px;
}

/* Add some spacing between the two text elements */
.items-to-select, .items-selected {
    white-space: nowrap;
}

/* Add a small gap between the two text elements */
.items-to-select {
    margin-right: 5px;
}

.bundled_items_selection_msg,
.bundled_items_selection_status {
    font-size: 14px !important; /* Increased font size */
    padding: 38px 10px 10px 10px;
}

/* Force the list items to display inline on mobile */
.woocommerce-info ul,
.woocommerce-info li,
.validation_message {
    height: 36px !important;
}

.validation_message li:first-of-type {
    padding: 10px 10px 38px 10px !important;
}

/* Additional styles to ensure single line display on mobile */
.component_message.bottom,
.validation_message,
.woocommerce-info,
.woocommerce-info ul {
    min-height: 36px !important;
    max-height: 36px !important;
    overflow: visible !important;
}

} /* End of main mobile media query */
