/* Keep real labels associated with fields while presenting them inside the controls. */
.y3-floating-scope .y3-floating-field {
    position: relative;
    padding: 0;
    margin-bottom: 18px;
}
.y3-floating-scope .y3-floating-field > :is(label,.y3-floating-label) {
    position: absolute !important;
    z-index: 2;
    top: 18px;
    left: 14px;
    right: 14px;
    width: auto;
    height: auto;
    margin: 0 !important;
    padding: 0;
    clip: auto !important;
    clip-path: none !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 15px;
    line-height: 20px;
    font-weight: 400;
    color: #626962;
    pointer-events: none;
    transition: top .15s ease, font-size .15s ease;
}
.y3-floating-scope .y3-floating-field:is(:focus-within,.y3-field-filled) > :is(label,.y3-floating-label) {
    top: 5px;
    font-size: 11px;
    line-height: 16px;
}
.y3-floating-scope .y3-floating-field .woocommerce-input-wrapper { display: block; }
.y3-floating-scope .y3-floating-field :is(input.y3-floating-control,select.y3-floating-control,textarea.y3-floating-control),
.y3-floating-scope .y3-floating-field .select2-selection--single {
    box-sizing: border-box;
    width: 100%;
    height: 56px !important;
    min-height: 56px !important;
    margin: 0;
    padding: 22px 14px 5px !important;
    border-radius: 8px !important;
    font-size: 16px;
    line-height: 24px;
}
.y3-floating-scope .y3-floating-field input::placeholder,
.y3-floating-scope .y3-floating-field textarea::placeholder { color: transparent; }
.y3-floating-scope .y3-floating-field.y3-field-textarea textarea {
    height: 112px !important;
    min-height: 112px !important;
    padding-top: 25px !important;
}
.y3-floating-scope .y3-floating-field .select2-selection__rendered {
    line-height: 24px !important;
    padding: 0 16px 0 0 !important;
}
.y3-floating-scope .y3-floating-field .select2-selection__arrow {
    top: 0;
    height: 54px !important;
}
.y3-floating-scope .y3-floating-field:not(.y3-field-filled):not(:focus-within) .select2-selection__rendered { visibility: hidden; }
.y3-floating-scope .y3-floating-field:not(.y3-field-filled):not(:focus-within) select:not(.select2-hidden-accessible) { color: transparent; }
.y3-floating-scope .y3-floating-field select option { color: #171717; }
/* The hosted card frame has its own 15px gutter: 10 + 15 matches the heading's 25px inset. */
.woocommerce-checkout #payment .payment_box.payment_method_cartadicreditopay_cc {
    padding: 16px 10px !important;
}
.woocommerce-checkout #alpay-card-element,
.woocommerce-checkout #WTP_iframe { width: 100% !important; max-width: 100%; margin: 0; }
@media (prefers-reduced-motion: reduce) {
    .y3-floating-scope .y3-floating-field > :is(label,.y3-floating-label) { transition: none; }
}

/* Clear floated address rows before the next checkout section. */
.y3-floating-scope .woocommerce-shipping-fields,
.y3-floating-scope .woocommerce-additional-fields {
    clear: both;
    display: flow-root;
    padding-top: 24px;
}
.y3-floating-scope #ship-to-different-address,
.y3-floating-scope .woocommerce-additional-fields > h3 {
    margin-top: 0;
    margin-bottom: 18px;
}

/* Account password toggles remain aligned inside the taller input. */
.y3-floating-scope .y3-floating-field :is(.password-input,.account-password-input) { display: block; position: relative; }
.y3-floating-scope .y3-floating-field :is(.password-input,.account-password-input) input { padding-right: 46px !important; }
.y3-floating-scope .y3-floating-field:has(:is(.password-input,.account-password-input)) > :is(label,.y3-floating-label) { right: 46px; }
.y3-floating-scope .y3-floating-field .show-password-input {
    position: absolute;
    top: 16px;
    right: 12px;
    width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    margin: 0;
    background: transparent;
    transform: none;
}
.y3-floating-scope .y3-floating-field #account_display_name_description { display: block; margin-top: 8px; }
.y3-floating-scope .y3-floating-field .show-password-input {
    -webkit-mask-repeat: no-repeat !important;
    mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
    mask-position: center !important;
    -webkit-mask-size: 20px 20px !important;
    mask-size: 20px 20px !important;
}

/* Shared storefront fields, including CF7, coupons, search and review forms. */
.y3-floating-scope .y3-wrapped-label { display: block; font-size: inherit; }
.y3-floating-scope .y3-floating-inline { display: block; flex: 1 1 auto; min-width: 0; }
.y3-floating-scope .coupon .y3-floating-inline { margin-bottom: 0; }
.y3-floating-scope .y3-floating-field .wpcf7-form-control-wrap { display: block; }
.y3-floating-scope .ct-search-form-inner .y3-floating-inline { width: 100%; margin: 0; }
.y3-floating-scope .y3-floating-compact { --y3-field-height: 48px; }
.y3-floating-scope .y3-floating-compact input.y3-floating-control {
    height: var(--y3-field-height) !important;
    min-height: var(--y3-field-height) !important;
    padding: 18px 14px 3px !important;
}
.y3-floating-scope .y3-floating-compact > label { top: calc((var(--y3-field-height) - 20px) / 2); }
.y3-floating-scope .y3-floating-compact:is(:focus-within,.y3-field-filled) > label { top: 3px; font-size: 10px; }
@media (min-width: 768px) {
    .woocommerce-cart .coupon .y3-floating-compact { --y3-field-height: 40px; }
}

/* Browser autofill may update values without an input event. */
.y3-floating-scope .y3-floating-field:has(input:autofill) > :is(label,.y3-floating-label) {
    top: 5px; font-size: 11px; line-height: 16px;
}

/* WoodMart scales screen-reader labels to zero; these labels are visible inside fields. */
.y3-floating-scope .y3-floating-field > label.screen-reader-text { transform: none !important; }
