/* Add to Quote button on product cards and product pages */
.quote-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #e30613;
    border-radius: 8px;
    background: #fff;
    color: #e30613;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.quote-add-btn:hover,
.quote-add-btn:focus-visible {
    background: #e30613;
    color: #fff;
}

.quote-add-btn.is-added {
    border-color: #198754;
    background: #198754;
    color: #fff;
}

.quote-add-btn.is-added:hover,
.quote-add-btn.is-added:focus-visible {
    border-color: #146c43;
    background: #146c43;
}

.quote-add-btn-detail {
    width: auto;
    margin-top: 0;
    padding: 12px 22px;
    font-size: 1rem;
}

.quote-add-related {
    padding: 0 12px 12px;
}

/* Basket button in the top bar */
.hw-basket-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    margin-left: auto;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: transparent;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.hw-basket-btn:hover,
.hw-basket-btn:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.hw-basket-count {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #e30613;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.hw-basket-count[hidden] {
    display: none;
}

@media (min-width: 992px) {
    .hw-basket-btn {
        order: 3;
        margin-left: 12px;
        margin-right: 0;
    }
}

/* Quote form additions */
.quote-request-modal:focus {
    outline: none;
}

.quote-request-form[hidden],
.quote-request-sent[hidden],
.quote-request-error[hidden],
.quote-request-clear[hidden] {
    display: none;
}

.quote-request-error {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fdecea;
    color: #b02a37;
    font-size: 0.9rem;
    font-weight: 600;
}

.quote-request-clear {
    justify-self: start;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
}

.quote-request-sent {
    padding: 8px 0;
    text-align: center;
}

.quote-request-sent h4 {
    margin-bottom: 8px;
    font-weight: 700;
}

.quote-request-sent p {
    margin-bottom: 18px;
}

.quote-request-sent-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Phones: item name on its own line, then quantity and remove side by side,
   so a list of several products stays easy to read. */
@media (max-width: 767px) {
    .quote-request-items .quote-request-item-row {
        grid-template-columns: minmax(0, 1fr) 46px;
        gap: 8px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(28, 28, 28, 0.1);
    }

    .quote-request-items .quote-request-item-row:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .quote-request-items .quote-request-item-input {
        grid-column: 1 / -1;
    }

    .quote-request-items .quote-request-qty-input {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .quote-request-items .quote-request-qty-input::before {
        content: "Qty";
        flex-shrink: 0;
        color: #666;
        font-size: 0.85rem;
        font-weight: 600;
    }

    .quote-request-items .quote-request-remove-item {
        width: 46px;
    }
}

/* Confirmation after adding. Left side, so it stays clear of the WhatsApp button. */
.quote-toast {
    position: fixed;
    left: 16px;
    bottom: 20px;
    z-index: 10030;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100vw - 110px);
    padding: 10px 14px;
    border-radius: 10px;
    background: #232323;
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.quote-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quote-toast-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quote-toast-view {
    flex-shrink: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #ff6b73;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* Paint ordered in a colour: small colour dot inside the item name box */
.quote-request-item-row.has-colour .quote-request-item-input {
    position: relative;
}
.quote-request-item-row.has-colour .quote-request-item-input::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border-radius: 5px;
    background: var(--quote-colour, transparent);
    border: 1px solid rgba(0, 0, 0, 0.15);
    pointer-events: none;
}
.quote-request-item-row.has-colour .quote-request-item-input input {
    padding-left: 36px !important;
}
