
.jy-gateway-card-input-wrapper {
    position: relative;
    display: block;
}

.jy-gateway-card-input-wrapper input.input-text {
    padding-right: 50px !important;
}


.jy-gateway-card-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #9ca3af;
}

.jy-gateway-card-icon svg {
    width: 100%;
    height: 100%;
    max-width: 36px;
    max-height: 20px;
}


.jy-gateway-cvv-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #9ca3af;
}

.jy-gateway-cvv-icon svg {
    width: 100%;
    height: 100%;
}


#jy-logistics-selector {
    margin-bottom: 1.5em;
    padding: 0;
    border: none;
    background: transparent;
}

#jy-logistics-selector .jy-logistics-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 0.75em 0;
    padding: 0;
}

#jy-logistics-selector .jy-logistics-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#jy-logistics-selector .jy-logistics-item {
    margin-bottom: 0;
    padding: 10px 0;
    border-bottom: 1px solid #efefef;
}

#jy-logistics-selector .jy-logistics-item:last-child {
    border-bottom: none;
}

#jy-logistics-selector .jy-logistics-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

#jy-logistics-selector .jy-logistics-label input[type="radio"] {
    margin-right: 10px;
    flex-shrink: 0;
}

#jy-logistics-selector .jy-logistics-name {
    flex: 1;
}

#jy-logistics-selector .jy-logistics-note {
    color: #777;
    font-size: 13px;
    margin-left: 4px;
}

#jy-logistics-selector .jy-logistics-price {
    font-weight: 600;
    white-space: nowrap;
}

#jy-cod-wrap {
    margin-bottom: 1.5em;
    padding: 0;
    border: none;
    background: transparent;
}

#jy-cod-wrap .jy-cod-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
}

#jy-cod-wrap .jy-cod-label input[type="checkbox"] {
    margin-right: 8px;
}

#jy-cod-wrap .jy-cod-desc {
    margin-top: 0.5em;
    color: #666;
    line-height: 1.5;
}

#jy-cod-wrap .jy-cod-detail-row {
    display: flex;
    justify-content: space-between;
    padding-top: 0.4em;
}

#jy-cod-wrap .jy-cod-detail-row.jy-cod-deposit {
    color: #2e7d32;
    font-weight: 600;
}


.jy-payment-errors {
    margin: 8px 0;
}

.jy-payment-errors .woocommerce-error {
    margin: 0 0 8px 0;
    padding: 10px 14px;
    list-style: none;
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    color: #dc2626;
    font-size: 13px;
    line-height: 1.5;
}


#jy-verify-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#jy-verify-content {
    width: 100%;
    min-height: 100vh;
}


@keyframes jySpinnerSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.jy-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #dbdbdb;
    border-top-color: #262626;
    border-radius: 50%;
    animation: jySpinnerSpin 0.8s linear infinite;
}


/* 支付方式行：radio + 标题左、图标右（WC 结构：li > input + label + .payment_box） */
#payment ul.payment_methods li.wc_payment_method,
.wc_payment_methods li.wc_payment_method {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

#payment ul.payment_methods li.wc_payment_method > input.input-radio,
.wc_payment_methods li.wc_payment_method > input.input-radio {
    flex: 0 0 auto;
    margin-right: 0.5em;
}

#payment ul.payment_methods li.wc_payment_method > label,
.wc_payment_methods li.wc_payment_method > label {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start;
    flex: 1 1 0;
    flex-wrap: nowrap;
    min-width: 0;
    gap: 8px;
    box-sizing: border-box;
    /* 覆盖主题常见的 float / inline 布局 */
    float: none !important;
    width: auto !important;
    max-width: none !important;
}

/* 展开表单独占下一行，避免挤在标题右侧 */
#payment ul.payment_methods li.wc_payment_method > .payment_box,
.wc_payment_methods li.wc_payment_method > .payment_box {
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 图标推到行尾；统一高度，避免信用卡 40px 拼图把行撑得过高 */
#payment ul.payment_methods li.wc_payment_method > label .jy-gateway-card-brands,
#payment ul.payment_methods li.wc_payment_method > label .jy-stripe-gateway-icon,
#payment ul.payment_methods li.wc_payment_method > label .jy-paypal-gateway-icon,
#payment ul.payment_methods li.wc_payment_method > label .jy-klarna-gateway-icon,
#payment ul.payment_methods li.wc_payment_method > label .jy-gateway-icon,
.wc_payment_methods li.wc_payment_method > label .jy-gateway-card-brands,
.wc_payment_methods li.wc_payment_method > label .jy-stripe-gateway-icon,
.wc_payment_methods li.wc_payment_method > label .jy-paypal-gateway-icon,
.wc_payment_methods li.wc_payment_method > label .jy-klarna-gateway-icon,
.wc_payment_methods li.wc_payment_method > label .jy-gateway-icon {
    margin-left: auto !important;
    margin-right: 0 !important;
    flex: 0 0 auto;
    float: none !important;
    line-height: 0;
    max-height: 32px;
}

.jy-gateway-card-brands,
.jy-stripe-gateway-icon,
.jy-paypal-gateway-icon,
.jy-klarna-gateway-icon,
.jy-gateway-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end;
    vertical-align: middle !important;
    line-height: 0;
}

#payment ul.payment_methods li.wc_payment_method > label .jy-gateway-card-brands svg,
#payment ul.payment_methods li.wc_payment_method > label .jy-stripe-gateway-icon svg,
#payment ul.payment_methods li.wc_payment_method > label .jy-paypal-gateway-icon svg,
#payment ul.payment_methods li.wc_payment_method > label .jy-klarna-gateway-icon svg,
#payment ul.payment_methods li.wc_payment_method > label .jy-gateway-icon svg,
#payment ul.payment_methods li.wc_payment_method > label .jy-gateway-icon img,
.wc_payment_methods li.wc_payment_method > label .jy-gateway-card-brands svg,
.wc_payment_methods li.wc_payment_method > label .jy-stripe-gateway-icon svg,
.wc_payment_methods li.wc_payment_method > label .jy-paypal-gateway-icon svg,
.wc_payment_methods li.wc_payment_method > label .jy-klarna-gateway-icon svg,
.wc_payment_methods li.wc_payment_method > label .jy-gateway-icon svg,
.wc_payment_methods li.wc_payment_method > label .jy-gateway-icon img {
    display: block;
    float: none !important;
    max-height: 32px;
    width: auto;
    height: auto;
    max-width: min(120px, 42vw);
}


.jy-gateway-field-error {
    display: block;
    color: #e25950;
    font-size: 13px;
    margin-top: 4px;
    width: 100%;
}


.jy-btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.jy-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
    animation: jy-spin 0.75s linear infinite;
}

@keyframes jy-spin {
    to {
        transform: rotate(360deg);
    }
}
