/* In-person tasting voucher product page. Values mirror Bravestar's
   table.variations (Places row) and .fair-price tooltip. */

/* Voucher fields: above Add to basket, laid out like the Places row. */
.cr-ipt-voucher .woocommerce-variation-add-to-cart .pdf-coupon-fields {
    order: -1;
    width: 100%;
}

.cr-ipt-voucher .pdf-coupon-fields > p.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    margin: 0;
    padding: 0;
    border-top: 1px solid #F1F1F1;
}

.cr-ipt-voucher .pdf-coupon-fields > p.form-row:last-of-type {
    border-bottom: 1px solid #F1F1F1;
}

.cr-ipt-voucher .pdf-coupon-fields > p.form-row > label {
    padding: 10px 10px 10px 0;
    line-height: 16px;
}

.cr-ipt-voucher .pdf-coupon-fields .woocommerce-input-wrapper {
    padding: 10px 0 10px 10px;
}

.cr-ipt-voucher .pdf-coupon-fields input,
.cr-ipt-voucher .pdf-coupon-fields textarea {
    width: 100%;
}

@media (max-width: 768px) {
    .cr-ipt-voucher .pdf-coupon-fields > p.form-row {
        grid-template-columns: 1fr;
    }

    .cr-ipt-voucher .pdf-coupon-fields > p.form-row > label {
        padding-bottom: 0;
    }

    .cr-ipt-voucher .pdf-coupon-fields .woocommerce-input-wrapper {
        padding-left: 0;
    }
}

/* One voucher per recipient: no quantity picker. */
.cr-ipt-voucher .product-info .product-info-container .quantity {
    display: none !important; /* beats the theme's plus/minus layout */
}

/* Help tooltips. */
.cr-ipt-tip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-size: 14px;
}

.cr-ipt-tip::before {
    content: '\f05a';
    font-family: "Font Awesome 6 Regular";
    font-weight: 400;
}

.cr-ipt-tip-text {
    position: absolute;
    left: 0;
    bottom: calc(100% + 6px);
    z-index: 2;
    width: 260px;
    max-width: 70vw;
    padding: 10px;
    background-color: #1D1D1B;
    color: #FFFFFF;
    font-size: 14px;
    line-height: 19.88px;
    font-weight: 400;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
}

.cr-ipt-tip:hover .cr-ipt-tip-text,
.cr-ipt-tip:focus .cr-ipt-tip-text {
    opacity: 1;
    visibility: visible;
}
