/**
 * GSDM Custom Hamper Builder — Master Frontend Stylesheet
 * Responsive, accessible, mobile-first styling for the hamper builder,
 * quantity steppers, live price summary box, and cart/order indented component lists.
 */

/* Hamper Builder Container */
.gsdm-hb-builder {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.gsdm-hb-builder__title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: #0f172a;
}

.gsdm-hb-builder__message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background-color: #f1f5f9;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #334155;
}

/* Component Items List */
.gsdm-hb-components-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.gsdm-hb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #f8fafc;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.gsdm-hb-item.is-removed {
    opacity: 0.55;
    background-color: #f1f5f9;
    border-style: dashed;
}

.gsdm-hb-item__thumb img {
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.gsdm-hb-item__info {
    flex: 1;
    min-width: 0;
}

.gsdm-hb-item__name {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: #1e293b;
    word-break: break-word;
}

.gsdm-hb-item__meta {
    font-size: 0.86rem;
    color: #64748b;
}

.gsdm-hb-item__rate-label {
    margin-left: 0.25rem;
}

/* Stepper Controls */
.gsdm-hb-item__controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.gsdm-hb-qty-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #1e293b;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.15s ease;
}

.gsdm-hb-qty-btn:hover:not(:disabled) {
    background-color: #cbd5e1;
}

.gsdm-hb-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gsdm-hb-qty-input {
    width: 48px;
    height: 32px;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0;
    font-weight: 600;
}

.gsdm-hb-remove-btn {
    margin-left: 0.25rem;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    color: #dc2626;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.gsdm-hb-remove-btn:hover {
    background-color: #fee2e2;
}

/* Summary Box */
.gsdm-hb-summary-box {
    padding: 1.15rem 1.35rem;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 5px solid #2563eb;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.gsdm-hb-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.gsdm-hb-summary-row--total {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #93c5fd;
    font-size: 1.15rem;
    color: #1e3a8a;
}

.gsdm-hb-summary-subtext {
    margin-top: 0.4rem;
    color: #64748b;
    font-size: 0.85rem;
}

.gsdm-hb-add-to-cart-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Cart & Order Nested Content Lists */
.gsdm-hb-cart-contents,
.gsdm-hb-order-contents {
    margin: 0.35rem 0 0 1.25rem;
    padding: 0;
    font-size: 0.9rem;
    color: #475569;
}

.gsdm-hb-cart-contents li,
.gsdm-hb-order-contents li {
    margin-bottom: 2px;
}

/* Email Box */
.gsdm-hb-email-contents-box {
    margin: 16px 0;
    padding: 12px 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
}

.gsdm-hb-email-contents-box__title {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #0f172a;
}

.gsdm-hb-email-contents-box__list {
    margin: 6px 0 0 16px;
    padding: 0;
    font-size: 13px;
    color: #334155;
}

@media screen and (max-width: 600px) {
    .gsdm-hb-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .gsdm-hb-item__controls {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
}

