/* Base product-page gift certificate fields ----------------------------- */
.espy-gc-fields {
    margin: 24px 0;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fafafa;
}

.espy-gc-fields h3 {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 300;
}

.espy-gc-fields .form-row {
    margin-bottom: 16px;
}

.espy-gc-fields label {
    display: block;
    margin-bottom: 6px;
    font-weight: 300;
}

.espy-gc-fields input,
.espy-gc-fields textarea {
    width: 100%;
    max-width: 100%;
}

/* Shortcode/landing-page purchase form ---------------------------------- */
.espy-gc-shortcode-product,
.espy-gc-shortcode-product * {
    box-sizing: border-box;
}

.espy-gc-shortcode-product {
    --espy-gc-bg: transparent;
    --espy-gc-text: #000;
    --espy-gc-muted: #8f93a3;
    --espy-gc-border: #d5d5d5;
    --espy-gc-border-focus: #9f9f9f;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: var(--espy-gc-bg) !important;
    color: var(--espy-gc-text) !important;
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 300 !important;
    line-height: 18px !important;
    letter-spacing: 0 !important;
}

.espy-gc-shortcode-product .price,
.espy-gc-shortcode-product .espy-gc-product-price,
.espy-gc-shortcode-product .product_meta,
.espy-gc-shortcode-product .woocommerce-product-rating,
.espy-gc-shortcode-product .woocommerce-tabs,
.espy-gc-shortcode-product .related,
.espy-gc-shortcode-product .upsells,
.espy-gc-shortcode-product .reset_variations,
.espy-gc-shortcode-product .woocommerce-variation,
.espy-gc-shortcode-product .woocommerce-variation-description,
.espy-gc-shortcode-product .woocommerce-variation-price,
.espy-gc-shortcode-product .woocommerce-variation-availability,
.espy-gc-shortcode-product .espy-gc-fields h3,
.espy-gc-shortcode-product .quantity,
.espy-gc-shortcode-product input.qty {
    display: none !important;
}

.espy-gc-shortcode-product form.cart,
.espy-gc-shortcode-product form.variations_form,
.espy-gc-shortcode-product .espy-gc-purchase-form {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    float: none !important;
    clear: both !important;
}

.espy-gc-shortcode-product .espy-gc-form-row,
.espy-gc-shortcode-product .espy-gc-fields .form-row,
.espy-gc-shortcode-product .espy-gc-fields p.form-row {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 30px !important;
    padding: 0 !important;
    float: none !important;
    clear: both !important;
}

.espy-gc-shortcode-product .espy-gc-form-row-value {
    margin-bottom: 30px !important;
}

.espy-gc-shortcode-product label,
.espy-gc-shortcode-product .espy-gc-fields label,
.espy-gc-shortcode-product .espy-gc-form-row label {
    display: block !important;
    width: 100% !important;
    margin: 0 0 15px !important;
    padding: 0 !important;
    color: var(--espy-gc-text) !important;
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 300 !important;
    line-height: 18px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-decoration: none !important;
}

.espy-gc-shortcode-product .espy-gc-value-label {
    font-size: 12px !important;
    line-height: 18px !important;
    margin-bottom: 15px !important;
}

.espy-gc-shortcode-product .required,
.espy-gc-shortcode-product abbr.required {
    color: inherit !important;
    text-decoration: none !important;
    border: 0 !important;
}

.espy-gc-shortcode-product select,
.espy-gc-shortcode-product .espy-gc-variation-select,
.espy-gc-shortcode-product .espy-gc-fields input,
.espy-gc-shortcode-product .espy-gc-fields textarea {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 10px 16px !important;
    border: 1px solid var(--espy-gc-border) !important;
    border-radius: 0 !important;
    background-color: #fff !important;
    color: var(--espy-gc-text) !important;
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 300 !important;
    line-height: 18px !important;
    box-shadow: none !important;
    outline: none !important;
    appearance: auto !important;
}

.espy-gc-shortcode-product select,
.espy-gc-shortcode-product .espy-gc-variation-select {
    min-height: 36px !important;
    padding: 10px 16px !important;
    font-size: 12px !important;
    line-height: 18px !important;
}

.espy-gc-shortcode-product .espy-gc-fields input {
    min-height: 36px !important;
}

.espy-gc-shortcode-product .espy-gc-fields textarea {
    min-height: 90px !important;
    resize: vertical !important;
}

.espy-gc-shortcode-product select:focus,
.espy-gc-shortcode-product .espy-gc-fields input:focus,
.espy-gc-shortcode-product .espy-gc-fields textarea:focus {
    border-color: var(--espy-gc-border-focus) !important;
    box-shadow: none !important;
}

.espy-gc-shortcode-product .espy-gc-fields input::placeholder,
.espy-gc-shortcode-product .espy-gc-fields textarea::placeholder {
    color: var(--espy-gc-muted) !important;
    opacity: 1 !important;
}

.espy-gc-shortcode-product .espy-gc-fields {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.espy-gc-shortcode-product .single_variation_wrap,
.espy-gc-shortcode-product .woocommerce-variation-add-to-cart,
.espy-gc-shortcode-product .espy-gc-submit-row {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    clear: both !important;
    float: none !important;
    text-align: center !important;
}

.espy-gc-shortcode-product .single_add_to_cart_button,
.espy-gc-shortcode-product button.single_add_to_cart_button,
.espy-gc-shortcode-product .espy-gc-submit-button,
.espy-gc-shortcode-product .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 270px !important;
    min-height: 30px !important;
    margin: 0 auto !important;
    padding: 8px 24px !important;
    border: 1px solid #000 !important;
    border-radius: 999px !important;
    background: #000 !important;
    color: #fff !important;
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 300 !important;
    line-height: 18px !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

.espy-gc-shortcode-product .single_add_to_cart_button:hover,
.espy-gc-shortcode-product .button:hover,
.espy-gc-shortcode-product .espy-gc-submit-button:hover {
    background: #222 !important;
    color: #fff !important;
}

.espy-gc-shortcode-product .single_add_to_cart_button.disabled,
.espy-gc-shortcode-product .single_add_to_cart_button:disabled {
    opacity: 0.65 !important;
}

.espy-gc-error {
    padding: 14px 16px;
    background: #fff3cd;
    border: 1px solid #f1d98b;
    color: #543f00;
}

@media (max-width: 767px) {
    .espy-gc-shortcode-product .espy-gc-form-row,
    .espy-gc-shortcode-product .espy-gc-fields .form-row,
    .espy-gc-shortcode-product .espy-gc-fields p.form-row {
        margin-bottom: 24px !important;
    }

    .espy-gc-shortcode-product .single_add_to_cart_button,
    .espy-gc-shortcode-product button.single_add_to_cart_button,
    .espy-gc-shortcode-product .espy-gc-submit-button,
    .espy-gc-shortcode-product .button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 320px !important;
    }
}


/* Keep the landing-page form fluid inside the Elementor/container width. */
.espy-gc-shortcode-product,
.espy-gc-shortcode-product .espy-gc-purchase-form,
.espy-gc-shortcode-product .espy-gc-form-row,
.espy-gc-shortcode-product .espy-gc-fields,
.espy-gc-shortcode-product .espy-gc-fields .form-row,
.espy-gc-shortcode-product .espy-gc-fields p.form-row {
    inline-size: 100% !important;
    width: 100% !important;
    max-width: none !important;
}

.espy-gc-shortcode-product select,
.espy-gc-shortcode-product input[type="text"],
.espy-gc-shortcode-product input[type="email"],
.espy-gc-shortcode-product textarea {
    inline-size: 100% !important;
    width: 100% !important;
    max-width: none !important;
}

/* QR validation page ----------------------------------------------------- */
.espy-gc-validation-body {
    background: #f6f4f1;
    margin: 0;
    font-family: Arial, sans-serif;
    color: #151515;
}

.espy-gc-validation {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.espy-gc-card {
    width: min(100%, 620px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 55px rgba(0,0,0,.12);
    padding: 32px;
}

.espy-gc-eyebrow {
    margin: 0 0 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #777;
}

.espy-gc-card h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 6vw, 44px);
    line-height: 1.1;
}

.espy-gc-status {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    margin: 0 0 22px;
}

.espy-gc-status-active { background: #e8f7ed; color: #146c2e; }
.espy-gc-status-redeemed { background: #fff3cd; color: #7a5700; }
.espy-gc-status-void { background: #fde2e2; color: #8a1f1f; }
.espy-gc-status-not_found { background: #eee; color: #555; }

.espy-gc-details {
    display: grid;
    gap: 12px;
    margin: 0 0 24px;
}

.espy-gc-details div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.espy-gc-details dt {
    color: #777;
    font-weight: 700;
}

.espy-gc-details dd {
    margin: 0;
}

.espy-gc-warning {
    background: #fff3cd;
    padding: 12px 14px;
    border-radius: 10px;
}

.espy-gc-note {
    color: #777;
}

.espy-gc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.espy-gc-actions .button,
.espy-gc-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none;
    background: #111;
    color: #fff;
    font-weight: 700;
}

.espy-gc-action-void { background: #8a1f1f; }
.espy-gc-action-active { background: #146c2e; }
.espy-gc-action-redeemed { background: #7a5700; }

@media (max-width: 767px) {
    .espy-gc-details div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}


/* Gift certificate meta in cart/checkout --------------------------------- */
.woocommerce-cart .variation,
.woocommerce-checkout .variation,
.elementor-widget-woocommerce-cart .variation,
.elementor-widget-woocommerce-checkout-page .variation {
    display: block !important;
    max-width: min(100%, 420px) !important;
    margin: 6px 0 0 !important;
    padding: 0 !important;
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 300 !important;
    line-height: 18px !important;
    color: #000 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.woocommerce-cart .variation dt,
.woocommerce-cart .variation dd,
.woocommerce-checkout .variation dt,
.woocommerce-checkout .variation dd,
.elementor-widget-woocommerce-cart .variation dt,
.elementor-widget-woocommerce-cart .variation dd,
.elementor-widget-woocommerce-checkout-page .variation dt,
.elementor-widget-woocommerce-checkout-page .variation dd {
    display: inline !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 300 !important;
    line-height: 18px !important;
    color: #000 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.woocommerce-cart .variation dt,
.woocommerce-checkout .variation dt,
.elementor-widget-woocommerce-cart .variation dt,
.elementor-widget-woocommerce-checkout-page .variation dt {
    font-weight: 300 !important;
}

.woocommerce-cart .variation dt::after,
.woocommerce-checkout .variation dt::after,
.elementor-widget-woocommerce-cart .variation dt::after,
.elementor-widget-woocommerce-checkout-page .variation dt::after {
    content: ": ";
}

.woocommerce-cart .variation dd::after,
.woocommerce-checkout .variation dd::after,
.elementor-widget-woocommerce-cart .variation dd::after,
.elementor-widget-woocommerce-checkout-page .variation dd::after {
    content: "";
    display: block;
    margin-bottom: 1px;
}

.woocommerce-cart .variation dd p,
.woocommerce-checkout .variation dd p,
.elementor-widget-woocommerce-cart .variation dd p,
.elementor-widget-woocommerce-checkout-page .variation dd p,
.woocommerce-cart .espy-gc-cart-meta-value,
.woocommerce-checkout .espy-gc-cart-meta-value,
.elementor-widget-woocommerce-cart .espy-gc-cart-meta-value,
.elementor-widget-woocommerce-checkout-page .espy-gc-cart-meta-value {
    display: inline !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.woocommerce-cart table.cart .product-name,
.woocommerce-cart table.cart td.product-name,
.woocommerce-checkout-review-order-table .product-name,
.elementor-widget-woocommerce-cart .product-name,
.elementor-widget-woocommerce-cart td.product-name,
.elementor-widget-woocommerce-checkout-page .product-name {
    max-width: 420px !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.woocommerce-cart table.cart,
.elementor-widget-woocommerce-cart table.cart {
    table-layout: auto !important;
}

@media (max-width: 767px) {
    .woocommerce-cart .variation,
    .woocommerce-checkout .variation,
    .elementor-widget-woocommerce-cart .variation,
    .elementor-widget-woocommerce-checkout-page .variation,
    .woocommerce-cart table.cart .product-name,
    .woocommerce-cart table.cart td.product-name,
    .woocommerce-checkout-review-order-table .product-name,
    .elementor-widget-woocommerce-cart .product-name,
    .elementor-widget-woocommerce-cart td.product-name,
    .elementor-widget-woocommerce-checkout-page .product-name {
        max-width: 100% !important;
    }
}


/* Front-end gift certificate validation ---------------------------------- */
.espy-gc-form-errors {
    width: 100% !important;
    margin: 0 0 24px !important;
    padding: 12px 14px !important;
    border: 1px solid #7a1f1f !important;
    background: #fff5f5 !important;
    color: #7a1f1f !important;
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 300 !important;
    line-height: 18px !important;
}

.espy-gc-form-errors[hidden] {
    display: none !important;
}

.espy-gc-form-errors strong {
    display: block !important;
    margin: 0 0 6px !important;
    font: inherit !important;
    font-weight: 400 !important;
    color: inherit !important;
}

.espy-gc-form-errors ul {
    margin: 0 !important;
    padding-left: 18px !important;
}

.espy-gc-form-errors li {
    margin: 0 0 2px !important;
    padding: 0 !important;
}

.espy-gc-field-error,
.espy-gc-character-counter {
    display: block !important;
    margin: 6px 0 0 !important;
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 300 !important;
    line-height: 18px !important;
}

.espy-gc-field-error {
    color: #7a1f1f !important;
}

.espy-gc-character-counter {
    color: #8f93a3 !important;
    text-align: right !important;
}

.espy-gc-character-counter.is-over-limit {
    color: #7a1f1f !important;
}

.espy-gc-shortcode-product .espy-gc-has-error input,
.espy-gc-shortcode-product .espy-gc-has-error textarea,
.espy-gc-shortcode-product .espy-gc-has-error select,
.espy-gc-fields .espy-gc-has-error input,
.espy-gc-fields .espy-gc-has-error textarea,
.espy-gc-fields .espy-gc-has-error select,
.espy-gc-has-error input[name^="espy_gc_"],
.espy-gc-has-error textarea[name^="espy_gc_"],
.espy-gc-has-error select[name^="espy_gc_"] {
    border-color: #7a1f1f !important;
}

.espy-gc-submit-button.is-loading {
  opacity: 0.65;
  cursor: wait !important;
}


/* Inline validation and character counter -------------------------------- */
.espy-gc-form-errors {
    margin: 0 0 18px !important;
    padding: 12px 14px !important;
    border: 1px solid #b00020 !important;
    background: #fff5f6 !important;
    color: #b00020 !important;
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 300 !important;
    line-height: 18px !important;
}

.espy-gc-form-errors strong {
    display: block !important;
    margin: 0 0 4px !important;
    font-weight: 400 !important;
}

.espy-gc-form-errors ul {
    margin: 0 !important;
    padding-left: 18px !important;
}

.espy-gc-field-error,
.espy-gc-character-counter {
    display: block !important;
    margin-top: 6px !important;
    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 300 !important;
    line-height: 18px !important;
}

.espy-gc-field-error {
    color: #b00020 !important;
}

.espy-gc-character-counter {
    color: #8f93a3 !important;
    text-align: right !important;
}

.espy-gc-character-counter.is-over-limit {
    color: #b00020 !important;
}

.espy-gc-has-error input,
.espy-gc-has-error select,
.espy-gc-has-error textarea {
    border-color: #b00020 !important;
}

.espy-gc-submit-button.is-loading,
.espy-gc-submit-button:disabled {
    pointer-events: none !important;
    opacity: 0.7 !important;
}
