.woocommerce ul.payment_methods li.payment_method_wc_gateway_redirect_sun_pay img,
.woocommerce-checkout-payment .payment_method_wc_gateway_redirect_sun_pay img,
.wc_payment_method.payment_method_wc_gateway_redirect_sun_pay img {
    max-height: 28px;
    max-width: 180px;
    width: auto;
    height: auto;
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
}

.sun-pay-row {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}

.sun-pay-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-label-input-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.card-label-row label {
    margin-right: 10px;
    font-weight: bold;
}

.card-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-icon {
    max-width: 48px;
    height: auto;
}

.sun-pay-card-form input[type="text"] {
    padding: 10px 12px;
    font-size: 16px;
    height: 44px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.sun-pay-card-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.sun-pay-card-form {
    margin-top: 10px;
}

.sun-pay-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 4px;
}

.sun-pay-input-group {
    margin-bottom: 16px;
}

#paymentOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    animation: sunpay-fadeIn 0.2s ease-out;
}

@keyframes sunpay-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#paymentPopup {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 92%;
    max-width: 500px;
    height: 86vh;
    max-height: 780px;
    transform: translate(-50%, -50%);
    background: #ffffff;
    z-index: 10000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    animation: sunpay-popupIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sunpay-popupIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

#paymentPopup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
    border-bottom: 1px solid #f0f0f0;
    z-index: 1;
    pointer-events: none;
}

#paymentPopup::after {
    content: '';
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: #e1e1e1;
    border-radius: 2px;
    z-index: 2;
    pointer-events: none;
}

#myIframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #fff;
}

#closePopup {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    color: #555;
    border: 1px solid #e5e5e5;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
    transition: all 0.18s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    -webkit-appearance: none;
    appearance: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#closePopup::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 1.5px;
    background: currentColor;
    transform: rotate(45deg);
    border-radius: 1px;
}

#closePopup::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 1.5px;
    background: currentColor;
    transform: rotate(-45deg);
    border-radius: 1px;
}

#closePopup:hover {
    background: #ff5a5f;
    color: #ffffff;
    border-color: #ff5a5f;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(255, 90, 95, 0.35);
}

#closePopup:active {
    transform: scale(0.96);
}

#closePopup:focus {
    outline: none;
}

#closePopup:focus-visible {
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.4);
}

@media (max-width: 640px) {
    #paymentPopup {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
    }

    #paymentPopup::before {
        height: 50px;
    }

    #paymentPopup::after {
        top: 24px;
    }

    #closePopup {
        top: 9px;
        right: 9px;
        width: 34px;
        height: 34px;
    }
}
