.wc-hpa-addons-shell {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin: 30px 0;
    padding: 0;
}

.wc-hpa-addons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wc-hpa-addon {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 0;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.wc-hpa-addon:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.wc-hpa-addon legend {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    padding: 0 8px;
    margin-bottom: 12px;
    border: none;
    width: auto;
}

.wc-hpa-addon legend .required {
    color: #e2401c;
    margin-left: 4px;
}

.wc-hpa-addon__description {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.wc-hpa-addon__controls {
    margin: 0;
}

.wc-hpa-addon__controls input[type="text"],
.wc-hpa-addon__controls input[type="number"],
.wc-hpa-addon__controls input[type="date"],
.wc-hpa-addon__controls input[type="time"],
.wc-hpa-addon__controls input[type="file"],
.wc-hpa-addon__controls select,
.wc-hpa-addon__controls textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    background: #fff;
    transition: border-color 0.2s ease;
}

.wc-hpa-addon__controls input:focus,
.wc-hpa-addon__controls select:focus,
.wc-hpa-addon__controls textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.wc-hpa-addon__controls textarea {
    min-height: 100px;
    resize: vertical;
}

.wc-hpa-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wc-hpa-option:hover {
    background: #f5f5f5;
    border-color: #2271b1;
}

.wc-hpa-option input[type="radio"],
.wc-hpa-option input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.wc-hpa-option input[type="radio"]:checked + span,
.wc-hpa-option input[type="checkbox"]:checked + span {
    font-weight: 500;
    color: #2271b1;
}

.wc-hpa-option > span {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.wc-hpa-option small {
    color: #666;
    font-size: 13px;
    font-weight: normal;
}

.wc-hpa-addon__help {
    margin: 12px 0 0 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.wc-hpa-summary {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.wc-hpa-summary__inner {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wc-hpa-summary__inner h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

.wc-hpa-summary__inner ul {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
}

.wc-hpa-summary__inner ul li {
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    border-bottom: 1px solid #e8e8e8;
}

.wc-hpa-summary__inner ul li:last-child {
    border-bottom: none;
}

.wc-hpa-summary__inner ul li strong {
    color: #333;
    font-weight: 600;
    display: inline-block;
    min-width: 120px;
}

.wc-hpa-summary__price-breakdown {
    margin: 0 0 16px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.wc-hpa-summary__unit-price {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wc-hpa-summary__addons-total {
    margin: 0;
    font-size: 15px;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wc-hpa-summary__unit-price strong {
    color: #333;
    font-weight: 600;
}

.wc-hpa-summary__unit-price span {
    color: #2271b1;
    font-weight: 600;
    font-size: 16px;
}

.wc-hpa-summary__total {
    margin: 16px 0 0 0;
    padding-top: 16px;
    border-top: 2px solid #e0e0e0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wc-hpa-summary__total span {
    color: #2271b1;
    font-size: 18px;
}

.wc-hpa-summary__actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.wc-hpa-summary__actions .quantity {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wc-hpa-summary__actions .quantity label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin: 0;
}

.wc-hpa-summary__actions .quantity input[type="number"] {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.wc-hpa-summary__actions .single_add_to_cart_button,
.wc-hpa-summary__actions button[type="submit"].single_add_to_cart_button {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.wc-hpa-summary__actions .single_add_to_cart_button:hover,
.wc-hpa-summary__actions button[type="submit"].single_add_to_cart_button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wc-hpa-summary__actions .single_add_to_cart_button:active,
.wc-hpa-summary__actions button[type="submit"].single_add_to_cart_button:active {
    transform: translateY(0);
}

/* Loading States */
.wc-hpa-summary__loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 16px;
    background: #f8f9fa;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
}

.wc-hpa-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: wc-hpa-spin 0.8s linear infinite;
}

@keyframes wc-hpa-spin {
    to {
        transform: rotate(360deg);
    }
}

.wc-hpa-loading-text {
    font-size: 14px;
    color: #666;
}

/* Error Messages */
.wc-hpa-form-errors {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #856404;
    font-size: 14px;
}

.wc-hpa-form-errors ul {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.wc-hpa-addon__error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 8px 0;
    color: #721c24;
    font-size: 13px;
    font-weight: 500;
}

.wc-hpa-summary__errors {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
    color: #721c24;
    font-size: 14px;
}

.wc-hpa-summary__errors ul {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Disabled state during loading */
.wc-hpa-addons-shell.wc-hpa-loading .wc-hpa-addon__controls input,
.wc-hpa-addons-shell.wc-hpa-loading .wc-hpa-addon__controls select,
.wc-hpa-addons-shell.wc-hpa-loading .wc-hpa-addon__controls textarea {
    opacity: 0.6;
    pointer-events: none;
}

.wc-hpa-addons-shell.wc-hpa-loading .wc-hpa-summary__actions button {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

/* Enhanced touch targets for mobile */
.wc-hpa-option {
    min-height: 44px; /* Minimum touch target size */
    padding: 14px 12px; /* Increased padding for better touch */
}

.wc-hpa-option input[type="radio"],
.wc-hpa-option input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 2px;
}

/* Tablet breakpoint */
@media (min-width: 769px) and (max-width: 1024px) {
    .wc-hpa-addons-shell {
        grid-template-columns: 1fr 1.2fr;
        gap: 25px;
    }

    .wc-hpa-summary {
        position: sticky;
        top: 20px;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .wc-hpa-addons-shell {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .wc-hpa-summary {
        position: sticky;
        top: 10px;
        z-index: 10;
    }

    .wc-hpa-summary__inner {
        margin-top: 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    /* Larger touch targets on mobile */
    .wc-hpa-option {
        min-height: 48px;
        padding: 16px 12px;
    }

    .wc-hpa-option input[type="radio"],
    .wc-hpa-option input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }

    /* Better spacing on mobile */
    .wc-hpa-addon {
        padding: 16px;
    }

    .wc-hpa-summary__actions button {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

