/* Main container */
.woo-pick-mix-container {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* Headings */
.woo-pick-mix-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
}

/* Weight selection section */
.woo-pick-mix-options {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ccc;
}

.woo-pick-mix-options label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.woo-pick-mix-options .price {
    margin-left: 10px;
    font-weight: bold;
}

/* Sweets list */
.woo-pick-mix-sweets-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

/* Individual sweet item */
.woo-pick-mix-sweet-item {
    border: 2px solid transparent;
    padding: 10px;
    text-align: center;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.woo-pick-mix-sweet-item label {
    display: block;
    cursor: pointer;
    margin: 0;
}

/* Lolly image */
.woo-pick-mix-lolly-image {
    margin-bottom: 8px;
}

.woo-pick-mix-lolly-image img {
    max-width: 80px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 3px;
}

/* Lolly name */
.woo-pick-mix-lolly-name {
    font-size: 0.9em;
    display: block;
    min-height: 2.5em;
    line-height: 1.3;
}

/* Hide the actual checkbox visually */
.woo-pick-mix-lolly-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Selected state */
.woo-pick-mix-sweet-item.selected {
    border-color: #4caf50; /* Green border */
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* Disabled state when max is reached */
.woo-pick-mix-sweet-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f0;
}

.woo-pick-mix-sweet-item.disabled label {
    cursor: not-allowed;
}

/* Keep selected items visible even when max reached */
.woo-pick-mix-sweet-item.selected.disabled {
    opacity: 1;
    cursor: pointer;
    background-color: #fff;
}

.woo-pick-mix-sweet-item.selected.disabled label {
    cursor: pointer;
}

/* Error message */
.woo-pick-mix-error {
    margin: 15px 0;
    padding: 10px;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Hide WooCommerce's default variation selection */
.woo-pick-mix-container + .variations,
.woo-pick-mix-container + form.cart .variations,
.woo-pick-mix-container + form.cart .woocommerce-variation-description,
.woo-pick-mix-container + form.cart .woocommerce-variation-price,
.woo-pick-mix-container + form.cart .woocommerce-variation-availability {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .woo-pick-mix-sweets-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .woo-pick-mix-lolly-image img {
        max-width: 60px;
    }
}

@media (max-width: 480px) {
    .woo-pick-mix-sweets-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .woo-pick-mix-lolly-name {
        font-size: 0.8em;
    }
}
