/* =============================================================
   EXISTING STYLES (unchanged)
   ============================================================= */

.or-js .wc_payment_method[class*="payment_method_sitea_"] {
    display: none;
}
.width-25 {
    width: 25px;
}
#sitea-quick-paypal-btn:hover,
#sitea-pdp-quick-paypal-btn:hover {
    cursor: pointer !important;
}
#sitea-pdp-quick-paypal-btn:hover,
#sitea-pdp-quick-paypal-btn:active,
#sitea-pdp-quick-paypal-btn:focus,
#sitea-pdp-quick-paypal-btn:focus-visible,
#sitea-quick-paypal-btn:hover,
#sitea-quick-paypal-btn:active,
#sitea-quick-paypal-btn:focus,
#sitea-quick-paypal-btn:focus-visible {
    background: #ffc439 !important;
    color: #111 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    transform: none !important;
    filter: none !important;
    outline: none !important;
}
#sitea-quick-paypal {
    text-align: center;
}
#sitea-quick-paypal-btn {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    background: #ffc439;
    color: #111;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}
.wc_payment_method.payment_method_sitea_paypal img {
    padding: 2px 0px;
    max-height: 25px;
}
.wc_payment_method[class*="payment_method_sitea_"] img {
    border-radius: 3px;
}

/* =============================================================
   HIDE NATIVE PLACE_ORDER WHEN SPLIT PANEL IS ACTIVE
   Uses every selector pattern WC themes might apply
   ============================================================= */

#place_order.orch-place-order-hidden,
button#place_order.orch-place-order-hidden,
input#place_order.orch-place-order-hidden,
.woocommerce #place_order.orch-place-order-hidden,
.woocommerce-checkout #place_order.orch-place-order-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* =============================================================
   PAYPAL SPLIT PANEL — Exact Pixel-Perfect Replica
   ============================================================= */

#orch-paypal-split-panel {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important; /* Exact spacing used by PayPal */
    width: 100% !important;
    margin: 16px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* ── Shared base for all 3 buttons ── */
#orch-paypal-split-panel button.orch-pp-btn {
    all: unset;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 45px !important; /* Strict 45px height per PayPal Smart Buttons */
    padding: 0 16px !important;
    border-radius: 4px !important; /* Exact PayPal border radius */
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    font-size: 15px !important; 
    font-weight: 600 !important;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    letter-spacing: 0.2px !important;
    transition: opacity 0.2s ease !important;
}

#orch-paypal-split-panel button.orch-pp-btn:hover:not(:disabled) {
    opacity: 0.85 !important;
}

#orch-paypal-split-panel button.orch-pp-btn:disabled {
    cursor: not-allowed !important;
    opacity: 0.5 !important;
}

#orch-btn-paypal .orch-pp-btn__logo svg {
    height: 28px !important; /* Official PayPal button wordmark height */
    width: auto !important;
}

/* ── 1. Target by ID to force PayPal Yellow ── */
body #orch-paypal-split-panel button#orch-btn-paypal {
    background: #FFC439 !important; /* Official PayPal Gold */
    background-color: #FFC439 !important;
}

/* ── 2. Target by ID to force Pay Later Gold (matches PayPal SDK exactly) ── */
body #orch-paypal-split-panel button#orch-btn-paylater {
    background: #FFC439 !important;
    background-color: #FFC439 !important;
    color: #111 !important;
}

/* ── 3. Target by ID to force Card Dark Grey ── */
body #orch-paypal-split-panel button#orch-btn-card {
    background: #2C2E2F !important; /* Official PayPal Card Button Dark */
    background-color: #2C2E2F !important;
    color: #ffffff !important;
}

/* ── Elements Inside Buttons ── */
.orch-pp-btn__text {
    display: inline-block !important;
    margin-right: 6px !important;
    font-size: 15px !important;
    font-weight: bold !important;
}

.orch-pp-btn__logo,
.orch-pp-btn__card-icons {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.orch-pp-btn__logo svg {
    display: block !important;
    height: 20px !important; /* Strict sizing to match SDK */
    width: auto !important;
}

.orch-pp-powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;

    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    color: #6c7378;
    font-style: italic;
    font-weight: 400;
}

/* Text */
.orch-pp-powered span:first-child {
    line-height: 1;
}

/* Logo */
.orch-pp-powered-logo {
    display: flex;
    align-items: center;
}

/* SVG */
.orch-pp-powered-logo svg {
    height: 16px !important;
    width: auto !important;
    display: block;
}

/* Pay Later button uses gold background — keep original PayPal brand colours on the P icon */
/* #orch-btn-paylater svg path[fill="#253B80"],
#orch-btn-paylater svg path[fill="#179BD7"] {
} */

.orch-pp-btn__card-icons svg {
    display: block !important;
    height: 20px !important;
    width: auto !important;
    margin-right: 8px !important;
}

.orch-pp-btn__card-icons {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.orch-pp-btn__card-text {
    display: inline-block !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 500 !important;
}

#orch-btn-paylater {
    display: flex !important;
    justify-content: center !important;
    gap: 2px !important;
}

.orch-pp-btn__paylater-text {
    font-weight: 400;
    font-size: 16px;
    color: #111;
}

.orch-pp-btn__paylater-icon svg {
    height: 22px !important;
    width: auto !important;
}

/* Force Hide Native Place Order Button using Body Wrapper */
body .woocommerce #payment #place_order.orch-place-order-hidden,
body form.checkout #place_order.orch-place-order-hidden {
    display: none !important;
    opacity: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
}

/* ── Loading spinner ── */
@keyframes orch-pp-spin {
    to { transform: rotate(360deg); }
}

.orch-pp-btn--loading::after {
    content: '' !important;
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    width: 16px !important;
    height: 16px !important;
    margin-top: -8px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-top-color: #ffffff !important;
    animation: orch-pp-spin 0.7s linear infinite !important;
}

/* On yellow PayPal btn use dark spinner */
.orch-pp-btn--paypal.orch-pp-btn--loading::after {
    border: 2px solid rgba(0, 0, 0, 0.2) !important;
    border-top-color: #111 !important;
}

.orch-pp-btn__pre-text {
    display: none !important;
}

#orch-btn-paypal {
    justify-content: center !important;
}

.orch-pp-btn__paylater-icon {
    font-weight: bold;
    font-size: 18px;
    margin-right: 6px;
    display: flex;
    align-items: center;
    margin-right: 6px;
}

#orch-btn-paypal .orch-pp-btn__logo {
    margin: 0 auto !important;
}

/* =============================================================
   DYNAMIC BUTTON STYLES (non-PayPal gateways, unchanged)
   ============================================================= */

   

#place_order.orch-custom-btn img {
    height: 22px;
    width: auto;
    display: inline-block;
}

/* PayPal Yellow (legacy fallback) */
#place_order.orch-paypal-redirect {
    background-color: #FFC439 !important;
    color: #111 !important;
}
#place_order.orch-paypal-redirect:hover {
    background-color: #f2ba36 !important;
}

/* Direct Card (green) */
#place_order.orch-direct-card {
    background-color: #2ecc71 !important;
    color: #2C2E2F !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
}
#place_order.orch-direct-card:hover {
    background-color: #27ae60 !important;
}

/* Credit redirect */
#place_order.btn-credit-redirect {
    background-color: #2C2E2F !important;
    color: #fff !important;
}

#place_order.orch-custom-btn:hover {
    border: none !important;
    box-shadow: unset !important;
}

/* Transparent masking during update */
#place_order.is-updating {
    background-color: transparent !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    border-color: transparent !important;
    color: transparent !important;
    box-shadow: unset !important;
}

.sitea-loader {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #253b80;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    animation: sitea-spin 0.8s linear infinite;
    display: inline-block;
}

/* Prevent the jumpy layout and flicker */
/* Single definition — second duplicate removed */
#place_order.orch-custom-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 50px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    border-radius: 4px !important;
    width: 100% !important;
    border: none !important;
    cursor: pointer !important;
    padding: 15px !important;
    box-shadow: unset !important;
    transition: background 0.2s ease !important;
}

/* The Spinner Animation */
@keyframes sitea-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Single #sitea-quick-paypal-btn:disabled */
#sitea-quick-paypal-btn:disabled {
    background-color: #ffc439 !important;
    opacity: 1 !important;
    cursor: not-allowed;
    color: transparent !important;
}
/* Single .sitea-loader definition */
.sitea-loader {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #253b80;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    animation: sitea-spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes sitea-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}