/* RedInGo_Pellet: layout pieces the theme's compiled Tailwind CSS may not contain. Plain CSS, no build step. */

.pellet-chip {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.pellet-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: #166534;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25rem;
}

.pellet-ok {
    color: #15803d;
}

.pellet-warn {
    color: #b91c1c;
}

.pellet-offer__discount {
    color: #15803d;
    font-weight: 700;
}

/* product page: quantity first and prominent, then the postcode */
.pellet-choose {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pellet-qty {
    border: 2px solid #166534;
    background: #f0fdf4;
}

.pellet-qty__label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.pellet-qty__input {
    width: 7rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.pellet-chip--active,
.pellet-chip--active:hover {
    background: #166534;
    border-color: #166534;
    color: #fff;
}

.pellet-qty__discount {
    margin-top: 0.5rem;
    color: #15803d;
    font-weight: 700;
}

.pellet-qty__hint {
    font-size: 0.875rem;
}

/* product page: one foldable card per warehouse; the head (warehouse, stock, pallet price) toggles the details */
.pellet-offer.card {
    padding: 0;
    border: 2px solid transparent;
    transition: border-color 0.15s ease-in-out;
}

.pellet-offer--best.card {
    border-color: #166534;
}

.pellet-offer--unavailable {
    opacity: 0.6;
}

.pellet-offer__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.pellet-offer__name {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.pellet-offer__headprice {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    white-space: nowrap;
}

.pellet-offer__chevron {
    flex: none;
    width: 0.6rem;
    height: 0.6rem;
    margin: 0 0.25rem 0.25rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.15s ease-in-out;
}

.pellet-offer--open .pellet-offer__chevron {
    margin-bottom: -0.25rem;
    transform: rotate(-135deg);
}

.pellet-offer__details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem 1rem;
}

.pellet-offer__info,
.pellet-offer__buy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pellet-offer__add {
    justify-content: center;
    width: 100%;
    margin-top: 0.75rem;
}

.pellet-offer__delivery {
    display: flex;
    flex-direction: column;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e7e5e4;
}

@media (min-width: 768px) {
    .pellet-choose {
        grid-template-columns: 1fr 1fr;
    }

    .pellet-offer__details {
        flex-direction: row;
        justify-content: space-between;
    }

    .pellet-offer__buy {
        align-items: flex-end;
        min-width: 18rem;
        text-align: right;
    }

    .pellet-offer__delivery {
        align-items: flex-end;
    }

    .pellet-offer__add {
        width: auto;
        min-width: 14rem;
    }
}

/* pellet category: warehouse tiles + postcode helper */
.pellet-warehouses__intro {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pellet-warehouses__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.pellet-warehouse-tile {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    height: 100%;
    padding: 1rem;
    border: 2px solid #e7e5e4;
    border-radius: 0.75rem;
    background: #fff;
    transition: border-color 0.15s ease-in-out;
}

.pellet-warehouse-tile:hover,
.pellet-warehouse-tile:focus-visible {
    border-color: #166534;
}

.pellet-warehouse-tile--nearest {
    border-color: #166534;
    box-shadow: 0 0 0 1px #166534;
}

.pellet-warehouse-tile .pellet-badge {
    align-self: flex-start;
}

.pellet-warehouse-tile__cta {
    margin-top: auto;
    padding-top: 0.5rem;
    font-weight: 700;
    text-decoration: underline;
}

/* warehouse subcategory header */
.pellet-warehouse-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
}

.pellet-badge--neutral {
    background: #44403c;
}

@media (min-width: 768px) {
    .pellet-warehouses__intro {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }

    .pellet-warehouses__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pellet-warehouse-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1.25rem 1.5rem;
    }
}
