/* ── Predefined amount button-picker ─────────────────────────────── */
.giftcard_price_options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 12px;
}
.giftcard_price_option {
    flex: 0 0 auto;
}

.productpage_form.giftcard_wrapper .productpage_form1.gift-card-receiver,
.productpage_form.giftcard_wrapper .productpage_form1.gift-card-sender,
.productpage_form.giftcard_wrapper .productpage_form1.gc-note-wrap {
    margin-top: 10px;
}

.giftcard_price_option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.giftcard_price_option label {
    display: block;
    min-width: 34px;
    height: 35px;
    line-height: 33px;
    padding: 0 7px;
    border: 1px solid #b4b4b4;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #4a4a4a;
    text-align: center;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    user-select: none;
    box-sizing: border-box;
}
.giftcard_price_option input[type=radio] + label,
.giftcard_price_option input[type=checkbox] + label {
    margin: 0;
}
.giftcard_price_option label:hover {
    background: #000;
    border-color: #000;
    color: #fff;
}
.giftcard_price_option input[type="radio"]:checked + label {
    background: #000;
    border-color: #000;
    color: #fff;
}
.giftcard_price_option input[type="radio"]:checked + label:hover {
    background: #000;
    border-color: #000;
    color: #fff;
}
/* Custom amount field (shown via JS when "Custom" button is selected) */
.giftcard_custom_amount_wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 8px;
}
.giftcard_custom_amount_wrap input[type="number"] {
    height: 35px;
    font-size: 14px;
    border: 1px solid #b4b4b4;
    padding: 0 8px;
    background: #fff;
    -webkit-appearance: none;
    width: 100% !important;
    box-sizing: border-box;
}

/* ── Gift card form — core layout ─────────────────────────────────── */
.productpage_form.giftcard_wrapper {
    width: 100%;
}

.productpage_form.giftcard_wrapper .productpage_form1 {
    display: block;
    margin: 0;
}

/* ── All text / number / email / tel inputs ────────────────────────── */
.productpage_form input:not([type="submit"],[type="radio"],[type="checkbox"],[type="hidden"]) {
    display: block;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    border-bottom: 1px solid #000;
    border-radius: 0;
    padding: 10px 0;
    font-size: 15px;
    line-height: 1.4;
    color: #111;
    height: auto;
    margin: 0;
}

[dir="rtl"] .productpage_form input:not([type="submit"],[type="radio"],[type="checkbox"],[type="hidden"]) {
    text-align: right;
    direction: rtl;
}

.productpage_form input:not([type="submit"],[type="radio"],[type="checkbox"],[type="hidden"]):focus {
    outline: none;
    border-bottom-color: #111;
}

.productpage_form input:not([type="submit"],[type="radio"],[type="checkbox"],[type="hidden"])::placeholder {
    color: #111;
    opacity: 1;
}

/* ── Textarea (note/blessing) ──────────────────────────────────────── */
.productpage_form.giftcard_wrapper .row .giftcard_note textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border: none;
    border-bottom: 1px solid #000;
    border-radius: 0;
    padding: 10px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #111;
    height: 80px;
    resize: none;
}

[dir="rtl"] .productpage_form.giftcard_wrapper .row .giftcard_note textarea {
    text-align: right;
    direction: rtl;
}

.productpage_form.giftcard_wrapper .row .giftcard_note textarea::placeholder {
    color: #111;
    opacity: 1;
}

.productpage_form.giftcard_wrapper .row .giftcard_note textarea:focus {
    outline: none;
    border-bottom-color: #111;
}

/* ── Floating label ────────────────────────────────────────────────── */
.productpage_form.giftcard_wrapper .form-group {
    position: relative;
    padding-top: 16px; /* reserved space for the floated label */
}

.productpage_form.giftcard_wrapper .form-group .floating_label {
    position: absolute;
    top: 16px;   /* aligns with input text baseline */
    left: 0;
    right: 0;
    padding: 10px 0 0; /* matches input padding-top so text sits on same line */
    font-size: 15px;
    line-height: 1.4;
    color: #111;
    margin: 0;
    pointer-events: none;
    transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease, padding 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: transparent;
    z-index: 1;
}

/* Floated state — label sits in the padding zone above the input */
.productpage_form.giftcard_wrapper .form-group.focused .floating_label,
.productpage_form.giftcard_wrapper .form-group.populated .floating_label {
    top: 0;
    padding: 0;
    font-size: 11px;
    color: #666;
}

[dir="rtl"] .productpage_form.giftcard_wrapper .form-group .floating_label {
    text-align: right;
}

/* ── Remove all focus outlines — clean look ───────────────────────── */
.productpage_form.giftcard_wrapper input:focus,
.productpage_form.giftcard_wrapper textarea:focus,
.productpage_form.giftcard_wrapper input[type="radio"]:focus,
.productpage_form.giftcard_wrapper input[type="checkbox"]:focus {
    outline: none;
    box-shadow: none;
}

/* ── Field rows — full width, stacked ─────────────────────────────── */
.productpage_form.giftcard_wrapper .col-md-6,
.productpage_form.giftcard_wrapper .col-md-5,
.productpage_form.giftcard_wrapper .col-12,
.productpage_form.giftcard_wrapper .col-6 {
    width: 100%;
    float: none;
    flex-basis: 100%;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
}

/* Each input section separated by spacing */
.gc-rcv-wrap,
.gc-from-wrap,
.gc-note-wrap,
.gc-phone-wrap {
    margin-top: 0;
    margin-bottom: 0;
}

/* Spacing between individual field wrappers */
.productpage_form.giftcard_wrapper .giftcard_to_email,
.productpage_form.giftcard_wrapper .giftcard_to,
.productpage_form.giftcard_wrapper .giftcard_phone,
.productpage_form.giftcard_wrapper .giftcard_from,
.productpage_form.giftcard_wrapper .giftcard_note {
    margin-bottom: 0;
}

/* Span below email field */
.gc-rcv-wrap .giftcard_to_email span {
    display: none;
}

/* ── Spacing between price picker and fields ──────────────────────── */
.gc-rcv-wrap {
    margin-top: 8px;
}

/* ── Vertical rhythm between every field row ──────────────────────── */
.productpage_form.giftcard_wrapper .giftcard_to,
.productpage_form.giftcard_wrapper .giftcard_to_email,
.productpage_form.giftcard_wrapper .giftcard_phone,
.productpage_form.giftcard_wrapper .giftcard_from,
.productpage_form.giftcard_wrapper .giftcard_note {
    margin-top: 0;
}

.gc-from-wrap,
.gc-note-wrap,
.gc-phone-wrap,
.gc-rcv-wrap .col-12 + .col-12 {
    margin-top: 0;
}

/* ── Radio/checkbox sections ──────────────────────────────────────── */
.productpage_form.giftcard_wrapper .productpage_radio span,
.productpage_form.giftcard_wrapper .productpage_check span {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    margin-top: 16px;
}

.productpage_form.giftcard_wrapper .productpage_radio ul,
.productpage_form.giftcard_wrapper .productpage_check ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.productpage_form.giftcard_wrapper .productpage_radio li,
.productpage_form.giftcard_wrapper .productpage_check li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

[dir="rtl"] .productpage_form.giftcard_wrapper .productpage_radio span,
[dir="rtl"] .productpage_form.giftcard_wrapper .productpage_check span {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .productpage_form.giftcard_wrapper .productpage_radio ul,
[dir="rtl"] .productpage_form.giftcard_wrapper .productpage_check ul {
    text-align: right;
    direction: rtl;
}

/* ── Custom radio & checkbox ──────────────────────────────────────── */
.productpage_form.giftcard_wrapper .productpage_radio input[type="radio"],
.productpage_form.giftcard_wrapper .productpage_check input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #111;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
    margin: 0;
}

.productpage_form.giftcard_wrapper .productpage_radio input[type="radio"] {
    border-radius: 50%;
}

.productpage_form.giftcard_wrapper .productpage_check input[type="checkbox"] {
    border-radius: 3px;
}

/* Radio — filled dot when checked */
.productpage_form.giftcard_wrapper .productpage_radio input[type="radio"]:checked {
    background: #111;
    box-shadow: inset 0 0 0 3px #fff;
}

/* Checkbox — checkmark when checked */
.productpage_form.giftcard_wrapper .productpage_check input[type="checkbox"]:checked {
    background: #111;
}

.productpage_form.giftcard_wrapper .productpage_check input[type="checkbox"]:checked::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    position: absolute;
    top: 1px;
    left: 5px;
    transform: rotate(45deg);
}

.productpage_form.giftcard_wrapper .productpage_radio label,
.productpage_form.giftcard_wrapper .productpage_check label {
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

/* ── Bottom section (price summary + add-to-cart) ─────────────────── */
.productpage_form.giftcard_wrapper .productpage_form_btm {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

[dir="rtl"] .productpage_form.giftcard_wrapper .productpage_form_btm {
    direction: rtl;
}

/* Price + label stacked */
.productpage_form.giftcard_wrapper .productpage_form_btm > div {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.productpage_form.giftcard_wrapper .productpage_form_btm > div strong {
    font-size: 18px;
    line-height: 1.2;
}

.productpage_form.giftcard_wrapper .productpage_form_btm > div span {
    font-size: 13px;
    color: #555;
    line-height: 1.2;
}

.productpage_form.giftcard_wrapper .productpage_form_btm p {
    margin: 0;
    font-size: 16px;
}

/* ── Character counter ─────────────────────────────────────────────── */
.productpage_form .maxlength,
.productpage_form .remlength {
    font-size: 12px;
    color: #666;
    margin: 4px 0 0;
}

[dir="rtl"] .productpage_form .maxlength,
[dir="rtl"] .productpage_form .remlength {
    text-align: right;
}

/* ── Added to cart confirmation message ───────────────────────────── */
.matat-gc-added-message {
    margin-top: 12px;
    padding: 10px 14px;
    background: #f0faf0;
    border: 1px solid #b2dfb2;
    color: #2d6a2d;
    font-size: 14px;
    line-height: 1.4;
}

/* Suppress theme jQuery Validate labels — plugin uses .gc-field-error instead.
   Exclude .allerror which is the plugin's own general error banner. */
.giftcard_wrapper .error_info:not(.allerror),
.giftcard_wrapper label.error {
    display: none !important;
}

/* ── Per-field validation errors ──────────────────────────────────── */
.gc-field-error {
    display: none;
    color: #c00;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}

.form-group.has-error > input,
.form-group.has-error > textarea {
    border-bottom-color: #c00;
}

.form-group.has-error .floating_label {
    color: #c00;
}

/* Price options (outside .form-group) error */
#gc-error-giftcard_price {
    display: none;
    color: #c00;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}

/* ── Hide ₪ em beside flexible price input ─────────────────────────── */
.productpage_form.giftcard_wrapper .productpage_form1 input#giftcard_price + em {
    display: none;
}

@media (min-width: 769px) and (max-width: 991px) {
    .single-product .product .product-images {
        width: 48%;
        float: right;
    }
}

/* All viewports: single-column fields */
@media (min-width: 992px) {
    .productpage_form.giftcard_wrapper .col-md-6 {
        width: 100%;
        flex-basis: 100%;
        max-width: 100%;
        float: none;
    }
}

.woocommerce div.product.product_cat-gift-cards div.summary {
    max-width: 540px;
    width: 100%;
    float: none;
    margin: 0 auto;
    padding-right: 0;
    padding-left: 0;
    padding-top: 0;
}

.woocommerce div.product.product_cat-gift-cards .product-images {
    display: none !important;
}

.woocommerce div.product.product_cat-gift-cards div.summary > * {
    float: none;
}

.woocommerce div.product.product_cat-gift-cards div.summary .magnify-lens {
    display: none !important;
}

.woocommerce div.product.product_cat-gift-cards div.summary .price {
    display: none;
}

.woocommerce div.product.product_cat-gift-cards div.summary .product_title {
    font-size: 32px;
}
.matat-gift-card-product .price,
.matat-gift-card-product .quantity {
    display: none !important;
}
/* Hide WooCommerce's native add-to-cart button; the plugin provides its own */
.matat-gift-card-product form.cart button[name="add-to-cart"]:not(.matat_gc_add_to_cart) {
    display: none !important;
}

/* ── Plugin Add to Cart button — Vibes-style ──────────────────────── */
button.matat_gc_add_to_cart {
    background: #000;
    color: #fff;
    border: 1px solid #000;
    box-shadow: none;
    border-radius: 0;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    display: inline-block;
    text-align: center;
    width: 100%;
}
button.matat_gc_add_to_cart:hover,
button.matat_gc_add_to_cart:focus {
    background: #fff;
    border-color: #000;
    color: #000;
    box-shadow: none;
    outline: none;
}
.matat-gift-card-product .error {
    color: #f00 !important;
}
.matat-gift-card-product ul {
    margin : 0 10px;
}
.matat-gift-card-product li {
    list-style: none;
}
.productpage_form.giftcard_wrapper .category_check span.box {
    display: inline-block;
    margin: 0 10px;
}
.productpage_form.giftcard_wrapper .at-a-time-wrap li{
    padding: 5px;
}

.productpage_form.giftcard_wrapper input[type="date"],
.productpage_form.giftcard_wrapper input[type="time"] {
    position: relative;
}

.productpage_form.giftcard_wrapper input[type="date"]::-webkit-calendar-picker-indicator,
.productpage_form.giftcard_wrapper input[type="time"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    color: transparent;
    background: transparent;
    z-index: 999;
}
