.match2pay-row {
    display: flex;
}
.match2pay-row label {
    margin-right: 15px;
}
.watcher-widget {
    margin-top: 20px;
}

#match2pay-payment-form {
    margin-top: 20px;
}
.match2pay-pay-with {
    margin-top: 20px;
}

.match2pay-payment-setting{
    margin-top: 20px;
    max-width: 450px;
    margin: 20px auto;
    background: rgb(255, 255, 255);
    border: 3px solid rgb(255, 204, 0);
    border-radius: 20px;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Currency selector header */
.match2pay-payment-setting .match2pay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 16px 0;
}

.match2pay-payment-setting .match2pay-title {
    font-size: 24px;
    font-weight: 600;
    color: rgb(0, 0, 0);
    margin: 0;
}

.match2pay-payment-setting .match2pay-currency-icon {
    width: 40px;
    height: 40px;
    background: rgb(255, 204, 0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: rgb(0, 0, 0);
}

.match2pay-payment-setting label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgb(0, 0, 0);
    margin: 0 0 8px 0;
}

.match2pay-payment-setting .required {
    color: rgb(0, 0, 0);
}

/* Button styling */
.match2pay-payment-setting .button.alt.match2pay-pay-with {
    background: rgb(255, 204, 0) !important;
    color: rgb(0, 0, 0) !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 !important;
    width: auto !important;
}

.match2pay-payment-setting .button.alt.match2pay-pay-with:hover {
    background: rgba(255, 204, 0, 0.8) !important;
    transform: translateY(-1px) !important;
}

/* ===== CURRENCY SELECTOR STYLING ===== */

/* Ultimate theme isolation wrapper */
.match2pay-select-isolation-wrapper {
    all: initial !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    color: rgb(0, 0, 0) !important;
    width: 250px !important;
    margin-right: 8px !important;
    position: relative !important;
    z-index: 9999 !important;
    isolation: isolate !important;
    contain: layout style paint !important;
    box-sizing: border-box !important;
    display: block !important;
}

.match2pay-select-inner-wrapper {
    all: unset !important;
    display: block !important;
    width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
}

/* React Select Control */
.match2pay-crypto__control {
    display: flex !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 4px 8px !important;
    border: 1px solid rgb(102, 102, 102) !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: rgb(0, 0, 0) !important;
    background-color: rgb(255, 255, 255) !important;
    box-shadow: none !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 1 !important;
    font-family: inherit !important;
    align-items: center !important;
}

.match2pay-crypto__control:hover {
    border-color: rgb(102, 102, 102) !important;
}

.match2pay-crypto__control--is-focused {
    border-color: rgb(255, 204, 0) !important;
    box-shadow: none !important;
}

/* Value Container */
.match2pay-crypto__value-container {
    display: flex !important;
    align-items: center !important;
    padding: 2px 8px !important;
    overflow: visible !important;
    flex: 1 !important;
}

/* Single Value Display */
.match2pay-crypto__single-value {
    display: flex !important;
    align-items: center !important;
    color: rgb(0, 0, 0) !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
}

/* Hide All Indicators */
.match2pay-crypto__indicators,
.match2pay-crypto__dropdown-indicator,
.match2pay-crypto__indicator-separator {
    display: none !important;
}

/* Dropdown Menu - Portaled to Body */
.match2pay-crypto__menu,
body > div[class*="match2pay-crypto__menu"] {
    position: fixed !important;
    z-index: 99999 !important;
    background-color: rgb(255, 255, 255) !important;
    border: 1px solid rgb(102, 102, 102) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 15px !important;
}

.match2pay-crypto__menu-list,
body > div[class*="match2pay-crypto__menu-list"] {
    padding: 0 !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* Menu Options */
.match2pay-crypto__option,
body > div[class*="match2pay-crypto__option"] {
    display: block !important;
    padding: 12px 16px !important;
    color: rgb(0, 0, 0) !important;
    background-color: rgb(255, 255, 255) !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    border: none !important;
    margin: 0 !important;
    text-align: left !important;
    text-transform: uppercase !important;
}

/* Selected Option */
.match2pay-crypto__option--is-selected,
body > div[class*="match2pay-crypto__option--is-selected"] {
    background-color: rgb(255, 204, 0) !important;
    color: rgb(0, 0, 0) !important;
}

/* Focused Option (not selected) */
.match2pay-crypto__option--is-focused:not(.match2pay-crypto__option--is-selected),
body > div[class*="match2pay-crypto__option--is-focused"]:not([class*="match2pay-crypto__option--is-selected"]) {
    background-color: rgb(250, 250, 250) !important;
    color: rgb(0, 0, 0) !important;
}

/* Selected + Focused Option */
.match2pay-crypto__option--is-selected.match2pay-crypto__option--is-focused,
body > div[class*="match2pay-crypto__option--is-selected"][class*="match2pay-crypto__option--is-focused"] {
    background-color: rgb(230, 184, 0) !important;
    color: rgb(0, 0, 0) !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .match2pay-payment-setting {
        margin: 16px 12px !important;
        padding: 20px !important;
        max-width: none !important;
    }
    
    .match2pay-payment-setting .match2pay-title {
        font-size: 20px !important;
    }
    
    .match2pay-select-isolation-wrapper {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 8px !important;
    }
    
    .match2pay-payment-setting .button.alt.match2pay-pay-with {
        width: 100% !important;
    }
}

/* ===== PAYMENT DETAILS ===== */

.match2pay-payment-details{
    margin-top: 10px;
    text-align: center;
}

#payment .payment_methods .match2pay-wallet-address {
    margin-top: 20px;
    margin-bottom: 20px;
}

.match2pay-wallet-address{
    background: #f5f5f5;
    text-align: center;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.match2pay-wallet-address img {
    height: 1em;
    width: 1em;
    margin-left: 15px;
    vertical-align: middle;
}

#payment .payment_methods .match2pay-payment-notice{
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #999;
}

.match2pay-payment-conversion-rate{
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.match2pay-copied{
    background: #388e3c;
    color: white;
}

.match2pay-accent{
    color: black;
    font-weight: bold;
}

.single-currency{
    display: flex;
    justify-content: center;
}

/* ===== CLASSIC CHECKOUT ERROR/SUCCESS STYLES ===== */

.match2pay-error {
    padding: 12px 16px;
    margin: 10px 0;
    background-color: #f8d7da;
    color: #721c24 !important;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 14px;
}

.match2pay-success {
    padding: 12px 16px;
    margin: 10px 0;
    background-color: #d4edda;
    color: #155724 !important;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    font-size: 14px;
}

/* ===== CLASSIC CHECKOUT CONTAINER FIXES ===== */

.match2pay-payment-box {
    background: transparent;
    color: inherit;
}

.match2pay-classic-root {
    background: transparent;
    color: inherit;
}

/* Ensure good contrast in all themes */
.match2pay-payment-setting * {
    color: #000 !important;
}

.match2pay-payment-setting label {
    color: #000 !important;
    font-weight: 600;
}

.match2pay-payment-setting select {
    color: #000 !important;
    background: #fff !important;
    border: 1px solid #ccc !important;
}

.match2pay-payment-setting button {
    color: #fff !important;
    background: #0073aa !important;
    border-color: #0073aa !important;
}

.match2pay-payment-setting button:hover {
    background: #005a87 !important;
    border-color: #005a87 !important;
}

.match2pay-payment-setting button:disabled {
    background: #ccc !important;
    border-color: #ccc !important;
    color: #666 !important;
}

/* Amount display styling - ensure proper yellow background */
.match2pay-amount-display {
    background: rgb(255, 204, 0) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin: 16px 0 !important;
    text-align: center !important;
    color: #000 !important;
}

.match2pay-summary {
    background: rgb(250, 250, 250) !important;
    border: 1px solid rgb(102, 102, 102) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin: 16px 0 !important;
    color: #000 !important;
}

.match2pay-amount__title,
.match2pay-summary__title {
    color: #000 !important;
    font-weight: 600;
}

.match2pay-amount__value,
.match2pay-summary__value,
.match2pay-summary__label {
    color: #000 !important;
}

#match2pay_embedded_payment_form_loading_txt {
    color: #000 !important;
}

/* ===== CLASSIC CHECKOUT STYLING IMPROVEMENTS ===== */

/* Remove WooCommerce default payment box styling for Match2Pay only */
.payment_method_match2pay .payment_box {
    background: transparent !important;
    color: inherit !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.payment_method_match2pay .payment_box::before {
    display: none !important;
}

/* Ensure the main container matches block styling exactly */
.payment_method_match2pay .match2pay-payment-setting {
    margin: 20px auto !important;
    max-width: 450px !important;
    background: rgb(255, 255, 255) !important;
    border: 3px solid rgb(255, 204, 0) !important;
    border-radius: 20px !important;
    padding: 24px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    box-sizing: border-box !important;
}

/* Header styling matching block design */
.payment_method_match2pay .match2pay-payment-setting .match2pay-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin: 0 0 16px 0 !important;
}

.payment_method_match2pay .match2pay-payment-setting .match2pay-title {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: rgb(0, 0, 0) !important;
    margin: 0 !important;
}

.payment_method_match2pay .match2pay-payment-setting .match2pay-currency-icon {
    width: 40px !important;
    height: 40px !important;
    background: rgb(255, 204, 0) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    color: rgb(0, 0, 0) !important;
}

/* Currency selector styling */
.payment_method_match2pay .match2pay-currency-container {
    flex: 1 !important;
    margin-right: 8px !important;
    max-width: 250px !important;
}

.payment_method_match2pay .match2pay-currency-select {
    width: 100% !important;
    min-height: 44px !important;
    padding: 8px 12px !important;
    border: 1px solid rgb(102, 102, 102) !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: rgb(0, 0, 0) !important;
    background-color: rgb(255, 255, 255) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-family: inherit !important;
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    cursor: pointer !important;
    background-image: none !important;
}

.payment_method_match2pay .match2pay-currency-select:focus {
    border-color: rgb(255, 204, 0) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.2) !important;
}

.payment_method_match2pay .match2pay-currency-select option {
    padding: 8px 12px !important;
    background-color: rgb(255, 255, 255) !important;
    color: rgb(0, 0, 0) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    display: block !important;
    white-space: nowrap !important;
}

/* Ensure dropdown list appears correctly */
.payment_method_match2pay .match2pay-currency-select {
    position: relative !important;
    z-index: 999 !important;
}

/* Ensure dropdown functionality is not interfered with */
.payment_method_match2pay .match2pay-currency-container {
    position: static !important;
    overflow: visible !important;
}

.payment_method_match2pay .match2pay-single-currency-display {
    width: 100% !important;
    min-height: 44px !important;
    padding: 8px 12px !important;
    border: 1px solid rgb(102, 102, 102) !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: rgb(0, 0, 0) !important;
    background-color: rgb(255, 255, 255) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-family: inherit !important;
    display: flex !important;
    align-items: center !important;
}

/* Button styling matching block design */
.payment_method_match2pay .match2pay-payment-setting .button.alt.match2pay-pay-with,
.payment_method_match2pay .match2pay-payment-setting button {
    background: rgb(255, 204, 0) !important;
    color: rgb(0, 0, 0) !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 !important;
    width: auto !important;
    font-family: inherit !important;
}

.payment_method_match2pay .match2pay-payment-setting .button.alt.match2pay-pay-with:hover,
.payment_method_match2pay .match2pay-payment-setting button:hover {
    background: rgba(255, 204, 0, 0.8) !important;
    transform: translateY(-1px) !important;
}

/* Labels styling */
.payment_method_match2pay .match2pay-payment-setting label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: rgb(0, 0, 0) !important;
    margin: 0 0 8px 0 !important;
    font-family: inherit !important;
}

.payment_method_match2pay .match2pay-payment-setting .required {
    color: rgb(0, 0, 0) !important;
}

/* Loading text styling */
.payment_method_match2pay #match2pay_embedded_payment_form_loading_txt {
    text-align: center !important;
    margin-top: 10px !important;
    font-style: italic !important;
    color: #666 !important;
}

/* Payment details container - style it like the currency selector */
.payment_method_match2pay #match2pay-payment-form {
    margin: 20px auto !important;
    max-width: 450px !important;
    background: rgb(255, 255, 255) !important;
    border: 3px solid rgb(255, 204, 0) !important;
    border-radius: 20px !important;
    padding: 24px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    box-sizing: border-box !important;
}

/* Override widget card styling to integrate seamlessly - remove its own container styling */
.payment_method_match2pay .match2pay-payment-card {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    max-width: none !important;
}

/* Keep the payment card content styling but make it fit within our yellow container */
.payment_method_match2pay .match2pay-payment-card {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

.payment_method_match2pay .match2pay-payment-card > * {
    margin-bottom: 16px !important;
}

.payment_method_match2pay .match2pay-payment-card > *:last-child {
    margin-bottom: 0 !important;
}

/* Ensure proper spacing between elements */
.payment_method_match2pay .match2pay-qr-section {
    margin: 20px 0 !important;
}

.payment_method_match2pay .match2pay-amount-display {
    margin: 20px 0 !important;
}

/* QR Code specific styling to ensure proper aspect ratio */
.payment_method_match2pay .match2pay-qr-section {
    text-align: center !important;
    margin: 16px 0 !important;
}

.payment_method_match2pay .match2pay-qr-container {
    display: inline-block !important;
    position: relative !important;
}

.payment_method_match2pay .match2pay-qr-container img {
    width: 200px !important;
    height: 200px !important;
    max-width: 200px !important;
    max-height: 200px !important;
    border-radius: 16px !important;
    border: 2px solid #e2e8f0 !important;
    display: block !important;
    background: #ffffff !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}

/* Instructions section styling */
.payment_method_match2pay .match2pay-instructions {
    background: rgb(250, 250, 250) !important;
    border-left: 4px solid rgb(255, 204, 0) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin: 16px 0 !important;
}

.payment_method_match2pay .match2pay-instruction-item {
    font-size: 14px !important;
    color: rgb(0, 0, 0) !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.4 !important;
}

.payment_method_match2pay .match2pay-instruction-item:last-child {
    margin-bottom: 0 !important;
}

/* Address instruction styling */
.payment_method_match2pay .match2pay-address-instruction {
    font-size: 14px !important;
    color: rgb(0, 0, 0) !important;
    margin: 16px 0 12px 0 !important;
    text-align: center !important;
    font-weight: 500 !important;
}

/* Address section styling */
.payment_method_match2pay .match2pay-address-section {
    margin: 0 0 16px 0 !important;
}

.payment_method_match2pay .match2pay-address-row {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 0 8px 0 !important;
}

.payment_method_match2pay .match2pay-address-container {
    background: rgb(250, 250, 250) !important;
    border: 1px solid rgb(102, 102, 102) !important;
    border-radius: 8px !important;
    padding: 12px !important;
    flex: 1 !important;
}

.payment_method_match2pay .match2pay-address-text {
    font-family: "SF Mono", "Monaco", "Cascadia Code", "Roboto Mono", monospace !important;
    font-size: 14px !important;
    color: rgb(0, 0, 0) !important;
    word-break: break-all !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    font-weight: 500 !important;
}

.payment_method_match2pay .match2pay-copy-button {
    background: rgb(255, 204, 0) !important;
    color: rgb(0, 0, 0) !important;
    border: none !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.payment_method_match2pay .match2pay-copy-button:hover {
    background: rgba(255, 204, 0, 0.8) !important;
    transform: translateY(-1px) !important;
}

/* Payment warning styling */
.payment_method_match2pay .match2pay-payment-warning {
    background: rgb(250, 250, 250) !important;
    border: 1px solid rgb(102, 102, 102) !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin: 16px 0 0 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    color: rgb(0, 0, 0) !important;
    font-weight: 500 !important;
    text-align: center !important;
}

.payment_method_match2pay .match2pay-warning-icon {
    font-size: 16px !important;
    flex-shrink: 0 !important;
}

/* Ensure QR code maintains aspect ratio on all screen sizes */
@media (max-width: 480px) {
    .payment_method_match2pay .match2pay-qr-container img {
        width: 180px !important;
        height: 180px !important;
        max-width: 180px !important;
        max-height: 180px !important;
    }
    
    .payment_method_match2pay .match2pay-address-row {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .payment_method_match2pay .match2pay-copy-button {
        width: 100% !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .payment_method_match2pay .match2pay-payment-setting {
        margin: 16px 12px !important;
        padding: 20px !important;
        max-width: none !important;
    }
    
    .payment_method_match2pay .match2pay-payment-setting .match2pay-title {
        font-size: 20px !important;
    }
    
    .payment_method_match2pay .match2pay-currency-container {
        max-width: none !important;
        margin-right: 0 !important;
        margin-bottom: 8px !important;
        flex: none !important;
    }
    
    .payment_method_match2pay .match2pay-payment-setting .button.alt.match2pay-pay-with,
    .payment_method_match2pay .match2pay-payment-setting button {
        width: 100% !important;
    }
    
    .payment_method_match2pay .match2pay-payment-setting div[style*="display: flex"] {
        flex-direction: column !important;
    }
}

/* ===== QR CODE DUPLICATE PREVENTION ===== */

/* Hide React-generated QR codes that create duplicates */
.watcher-widget #match2pay-qr canvas,
.watcher-widget #match2pay-qr img[src*="data:image/png"],
.watcher-widget div[id*="match2pay-qr"] canvas,
.watcher-widget div[id*="match2pay-qr"] img[src*="data:image/png"],
#match2pay-qr canvas,
#match2pay-qr img[src*="data:image/png"] {
    display: none !important;
}

/* Ensure only API-generated QR images are shown */
.match2pay-qr-container img[src*="qrserver.com"] {
    display: block !important;
}

/* Hide the React QR component completely in payment forms */
.payment_method_match2pay .watcher-widget #match2pay-qr,
.payment_method_match2pay #match2pay-qr {
    display: none !important;
}

/* Ensure PHP widget QR is always visible */
.payment_method_match2pay .match2pay-qr-section {
    display: block !important;
}