/* Private-area fixes kept separate from the public/auth bundle. */
/* Merkato Play — correcciones visuales oscuras */
:root {
    --mk-fix-bg: #0f151b;
    --mk-fix-surface: #151d24;
    --mk-fix-surface-2: #1a242d;
    --mk-fix-border: rgba(185, 242, 39, .16);
    --mk-fix-border-soft: rgba(255, 255, 255, .09);
    --mk-fix-text: #f2f5f6;
    --mk-fix-muted: #aab5bf;
    --mk-fix-lime: #b9f227;
}

/* Superficies generales */
.mk-checkout-page .store-card,
.mk-checkout-page .store-card-soft,
.mk-wallet-page .store-card,
.mk-wallet-page .store-card-soft,
.mk-wallet-funding-page .store-card,
.mk-wallet-funding-page .store-card-soft,
.mk-orders-page .store-card,
.mk-orders-page .store-card-soft {
    background: var(--mk-fix-surface) !important;
    border-color: var(--mk-fix-border-soft) !important;
    color: var(--mk-fix-text) !important;
}

/* Eliminar utilidades blancas dentro de estas páginas */
.mk-checkout-page .bg-white,
.mk-wallet-page .bg-white,
.mk-wallet-funding-page .bg-white,
.mk-orders-page .bg-white {
    background: var(--mk-fix-surface-2) !important;
    color: var(--mk-fix-text) !important;
}

/* Inputs y filtros */
.mk-orders-page .store-input,
.mk-orders-page .store-select,
.mk-wallet-page .store-input,
.mk-wallet-page .store-select,
.mk-wallet-funding-page .store-input,
.mk-wallet-funding-page .store-select,
.mk-checkout-page .store-input,
.mk-checkout-page .store-select,
.mk-orders-page input,
.mk-orders-page select,
.mk-wallet-page input:not([type="radio"]):not([type="checkbox"]),
.mk-wallet-page select,
.mk-wallet-funding-page input:not([type="radio"]):not([type="checkbox"]),
.mk-wallet-funding-page select,
.mk-checkout-page input:not([type="radio"]):not([type="checkbox"]),
.mk-checkout-page select,
.mk-checkout-page textarea {
    background: #10171e !important;
    border-color: rgba(255, 255, 255, .13) !important;
    color: var(--mk-fix-text) !important;
}

.mk-orders-page input::placeholder,
.mk-wallet-page input::placeholder,
.mk-wallet-funding-page input::placeholder,
.mk-checkout-page input::placeholder,
.mk-checkout-page textarea::placeholder {
    color: #7f8b95 !important;
    opacity: 1 !important;
}

/* Historial de pedidos */
.mk-orders-page .store-orders-filters {
    background: var(--mk-fix-surface) !important;
    border: 1px solid var(--mk-fix-border-soft) !important;
}

.mk-orders-page .divide-y > *,
.mk-orders-page .store-orders-list > *,
.mk-orders-page .store-orders-table > * {
    background: var(--mk-fix-surface) !important;
    border-color: rgba(255, 255, 255, .07) !important;
    color: var(--mk-fix-text) !important;
}

.mk-orders-page p,
.mk-orders-page small,
.mk-orders-page time {
    color: var(--mk-fix-muted);
}

/* Métodos de fondeo de Wallet */
.mk-wallet-page label:has(input[type="radio"]),
.mk-wallet-funding-page label:has(input[type="radio"]),
.mk-wallet-page button[wire\:click]:not(.store-btn-primary),
.mk-wallet-funding-page button[wire\:click]:not(.store-btn-primary) {
    background: var(--mk-fix-surface-2) !important;
    border: 1px solid var(--mk-fix-border-soft) !important;
    color: var(--mk-fix-text) !important;
}

.mk-wallet-page label:has(input[type="radio"]:checked),
.mk-wallet-funding-page label:has(input[type="radio"]:checked),
.mk-wallet-page [aria-pressed="true"],
.mk-wallet-funding-page [aria-pressed="true"],
.mk-wallet-page .is-active,
.mk-wallet-funding-page .is-active {
    background: #1c2a20 !important;
    border-color: rgba(185, 242, 39, .55) !important;
}

/* QR de Binance */
.mk-checkout-page img[alt*="qr" i],
.mk-checkout-page img[src*="qr" i],
.mk-checkout-page [class*="qr" i] img {
    display: block !important;
    width: clamp(210px, 24vw, 270px) !important;
    height: auto !important;
    max-width: 100% !important;
    padding: 10px !important;
    margin: 0 auto !important;
    border-radius: 18px !important;
    background: #f4f5f1 !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .28) !important;
}

/* Caja que contiene directamente el QR */
.mk-checkout-page :is(div, section, figure):has(> img[alt*="qr" i]),
.mk-checkout-page :is(div, section, figure):has(> img[src*="qr" i]) {
    background: var(--mk-fix-surface-2) !important;
    border: 1px solid var(--mk-fix-border-soft) !important;
    color: var(--mk-fix-text) !important;
    padding: 20px !important;
    border-radius: 18px !important;
}

/* Clases relacionadas con QR o instrucciones de pago */
.mk-checkout-page [class*="qr" i],
.mk-checkout-page [class*="payment-info" i],
.mk-checkout-page [class*="payment-instruction" i] {
    background-color: var(--mk-fix-surface-2) !important;
    border-color: var(--mk-fix-border-soft) !important;
    color: var(--mk-fix-text) !important;
}

.mk-checkout-page [class*="qr" i] p,
.mk-checkout-page [class*="payment-instruction" i] p,
.mk-checkout-page [class*="payment-info" i] p {
    color: var(--mk-fix-muted) !important;
}

/* Mejor contraste de textos secundarios */
.mk-checkout-page .text-gray-500,
.mk-checkout-page .text-gray-600,
.mk-wallet-page .text-gray-500,
.mk-wallet-page .text-gray-600,
.mk-wallet-funding-page .text-gray-500,
.mk-wallet-funding-page .text-gray-600,
.mk-orders-page .text-gray-500,
.mk-orders-page .text-gray-600 {
    color: var(--mk-fix-muted) !important;
}

@media (max-width: 640px) {
    .mk-orders-page .store-orders-filters {
        grid-template-columns: 1fr !important;
    }

    .mk-checkout-page img[alt*="qr" i],
    .mk-checkout-page img[src*="qr" i],
    .mk-checkout-page [class*="qr" i] img {
        width: min(220px, 78vw) !important;
    }

    .mk-checkout-page :is(div, section, figure):has(> img[alt*="qr" i]),
    .mk-checkout-page :is(div, section, figure):has(> img[src*="qr" i]) {
        padding: 16px !important;
        text-align: center !important;
    }

    .mk-wallet-page label:has(input[type="radio"]),
    .mk-wallet-funding-page label:has(input[type="radio"]) {
        min-height: 68px;
    }
}
