/* General container for the addons block */
.delivery-addons-container {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #3b82f6; /* A nice blue color */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-top: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

/* Group for each category of addons */
.addon-category-group {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb; /* Lighter border */
}

.addon-category-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Title of the addon category */
.addon-category-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
    color: #1f2937; /* Darker gray */
}

/* Rules text (min/max selection) */
.addon-category-rules {
    font-size: 0.9em;
    font-weight: 400; /* Regular weight */
    color: #6b7280; /* Medium gray */
    margin-left: 8px;
}

/* List of addons */
.addons-list {
    display: flex;
    flex-direction: column;
}

/* Wrapper for each checkbox item */
.addons-list .addon-checkbox {
    display: flex;
    align-items: center;
    padding: 12px 4px;
    margin-bottom: 0;
    border-bottom: 1px solid #f3f4f6; /* Very light separator */
    transition: background-color 0.2s ease;
}

.addons-list .addon-checkbox:last-child {
    border-bottom: none;
}

.addons-list .addon-checkbox:hover {
    background-color: #f9fafb;
}

/* Hide the default checkbox */
.addons-list .addon-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

/* The label acts as the container for our custom checkbox and text */
.addons-list .addon-checkbox label {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0;
}

/* Custom checkbox style */
.addons-list .addon-checkbox label::before {
    content: '';
    flex-shrink: 0;
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db; /* Gray border */
    border-radius: 6px;
    margin-right: 12px;
    transition: all 0.2s ease-in-out;
}

/* Style for the checked state */
.addons-list .addon-checkbox input[type="checkbox"]:checked + label::before {
    background-color: #3b82f6;
    border-color: #3b82f6;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 100% 100%;
}

/* Focus style for accessibility */
.addons-list .addon-checkbox input[type="checkbox"]:focus-visible + label::before {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

/* Name of the addon item */
.addon-item-name {
    flex-grow: 1;
}

/* Price of the addon item */
.addon-item-price {
    margin-left: 15px;
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.95em;
}
