#withdraw-mount,
#withdraw-guide-mount {
    position: static;
    width: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
}

.withdraw-overlay {
    --withdraw-max-width: 339px;
    --withdraw-popup-max-height: min(88vh, 640px);
    --withdraw-step2-height-ratio: 0.62;

    position: fixed;
    inset: 0;
    z-index: 1005;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    background: rgba(8, 24, 56, 0.72);
    pointer-events: auto;
}

.withdraw-overlay.is-open {
    display: grid;
    place-items: center;
    grid-template-columns: min(100%, var(--withdraw-max-width));
}

.withdraw-overlay .withdraw-stack {
    grid-area: 1 / 1;
    position: relative;
    width: 100%;
    min-height: var(--withdraw-popup-max-height);
}

.withdraw-overlay .withdraw-stack > .withdraw {
    width: 100%;
    max-width: none;
}

.withdraw-overlay:not(.withdraw-overlay--step2) .withdraw--step2 {
    display: none !important;
}

.withdraw[hidden] {
    display: none !important;
}

.withdraw-overlay .withdraw--step1 {
    position: relative;
    z-index: 1;
    width: 100%;
}

.withdraw-overlay.withdraw-overlay--step2 .withdraw--step1 {
    pointer-events: none;
}

.withdraw-stack__dim {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.58);
    pointer-events: none;
}

.withdraw-overlay.withdraw-overlay--step2 .withdraw-stack__dim {
    display: block;
}

.withdraw-overlay .withdraw--step2 {
    position: absolute;
    inset: auto 0;
    top: 50%;
    z-index: 3;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: calc(var(--withdraw-popup-max-height) * var(--withdraw-step2-height-ratio));
    max-height: calc(var(--withdraw-popup-max-height) * var(--withdraw-step2-height-ratio));
    padding: 35px 14px 12px;
    transform: translateY(-50%);
    pointer-events: auto;
}

.withdraw {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--withdraw-max-width);
    max-height: var(--withdraw-popup-max-height);
    min-height: var(--withdraw-popup-max-height);
    padding: 18px 14px 16px;
    border-radius: 10px;
    background: linear-gradient(180deg, #4185e6 0%, #4955c5 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: #fff;
    overflow: hidden;
}

.withdraw__guide,
.withdraw__close {
    position: absolute;
    top: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.withdraw__guide {
    left: 10px;
    width: 28px;
    height: 28px;
}

.withdraw__close {
    right: 10px;
    width: 15px;
    height: 15px;
    color: #000;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
}

.withdraw__guide:hover,
.withdraw__close:hover {
    opacity: 0.85;
}

.withdraw__guide img,
.withdraw__close img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.withdraw__heading {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
    color: #ecf355;
}

.withdraw__mode-tabs {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: calc(100% + 28px);
    margin: 0 -14px 10px;
}

.withdraw__mode-tab {
    flex: 1 1 50%;
    min-height: 36px;
    margin: 0;
    padding: 8px 10px;
    border: none;
    border-radius: 0;
    background: linear-gradient(180deg, #2f5abc 0%, #2b388f 100%);

    color: rgba(179, 201, 242, 0.95);
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.withdraw__mode-tab.is-active {
    background: linear-gradient(180deg, #58DAFC 0%, #23C7F4 100%);
    color: #1a1a1a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.withdraw__mode-tab:hover {
    filter: brightness(1.05);
}

.withdraw__view {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.withdraw__view[hidden] {
    display: none !important;
}

.withdraw__channels {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 10px;
}

.withdraw__channel {
    box-sizing: border-box;
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 34px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: linear-gradient(180deg, #2f5abc 0%, #2b388f 100%);
    cursor: pointer;
    transition: filter 0.15s ease, border-color 0.15s ease;
}

.withdraw__channel.is-active {
    /* border-color: rgba(255, 255, 255, 0.85); */
    background: linear-gradient(180deg, #58DAFC 0%, #23C7F4 100%);

    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.withdraw__channel img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 22px;
    object-fit: contain;
}

.withdraw__channel:hover {
    filter: brightness(1.05);
}

.withdraw__panel {
    flex: 1;
    min-height: 0;
    padding: 12px 10px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(180deg, #2f5abc 0%, #2b388f 100%);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.withdraw__panel::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.withdraw__amounts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.withdraw__amount {
    min-height: 44px;
    padding: 10px 8px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(180deg, #f5e96a 0%, #e8c84a 100%);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.withdraw__amount:hover {
    filter: brightness(1.04);
    transform: scale(1.02);
}

.withdraw__amount:active {
    transform: scale(0.98);
}

.withdraw__empty {
    margin: 0;
    padding: 24px 12px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
}

.withdraw__bet-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 0 2px;
}

.withdraw__bet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: linear-gradient(180deg, #2251BB 0%, #2B388F 100%);
}

.withdraw__bet-label {
    flex: 1 1 auto;
    min-width: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 10px;
    line-height: 14px;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #fff;
}

.withdraw__bet-value {
    flex: 0 0 auto;
    min-width: 72px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #1b2f86;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    color: #ecf355;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.withdraw__note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 0 2px 2px;
}

.withdraw__note-icon {
    flex: 0 0 auto;
    display: block;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    object-fit: contain;
}

.withdraw__note-text {
    margin: 0;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
}

.withdraw__history-table-wrap {
    width: 100%;
    min-height: 0;
    overflow: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.withdraw__history-table-wrap::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.withdraw__history-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.withdraw__history-table thead th {
    padding: 10px 6px;
    border: 1px solid rgba(8, 24, 56, 0.35);
    background: linear-gradient(180deg, #4f86d3 0%, #3f6fbf 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.withdraw__history-table tbody td {
    padding: 9px 6px;
    border: 1px solid rgba(8, 24, 56, 0.35);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    vertical-align: middle;
    word-break: break-word;
}

.withdraw__history-table tbody td.withdraw__history-pesos {
    color: #FFEA00;
    font-weight: 800;
}

.withdraw__history-table tbody td.withdraw__history-status.is-canceled,
.withdraw__history-table tbody td.withdraw__history-status.is-failed {
    color: #ff8f6b;
    font-weight: 700;
}

.withdraw__history-table tbody td.withdraw__history-status.is-completed {
    color: #7cff4f;
    font-weight: 700;
}

.withdraw__history-table tbody td.withdraw__history-status.is-done {
    color: #fff;
    font-weight: 700;
}

.withdraw--step2 {
    justify-content: flex-start;
    min-height: calc(var(--withdraw-popup-max-height) * var(--withdraw-step2-height-ratio));
    max-height: calc(var(--withdraw-popup-max-height) * var(--withdraw-step2-height-ratio));
}

.withdraw--step2 .withdraw__close {
    top: 4px;
    right: 6px;
    width: 15px;
    height: 15px;
    font-size: 20px;
}

.withdraw--step2 .withdraw__heading {
    margin-bottom: 8px;
    font-size: 18px;
}

.withdraw-guide-overlay {
    --withdraw-max-width: 339px;
    --withdraw-popup-max-height: min(88vh, 640px);

    position: fixed;
    inset: 0;
    z-index: 1400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    background: rgba(8, 24, 56, 0.72);
    pointer-events: auto;
}

.withdraw-guide-overlay.is-open {
    display: grid;
    place-items: center;
    grid-template-columns: min(100%, var(--withdraw-max-width));
}

.withdraw-guide {
    grid-area: 1 / 1;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--withdraw-max-width);
    max-height: var(--withdraw-popup-max-height);
    min-height: var(--withdraw-popup-max-height);
    overflow: hidden;
    padding: 18px 14px 16px;
    border-radius: 10px;
    background: linear-gradient(180deg, #4185e6 0%, #4955c5 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    color: #fff;
    font-family: Inter, Arial, Helvetica, sans-serif;
}

.withdraw-guide__content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.withdraw-guide__content::-webkit-scrollbar {
    display: none;
}

.withdraw-guide__close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.withdraw-guide__close img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.withdraw-guide__title {
    margin: 0 0 8px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ecf355;
}

.withdraw-guide__subtitle {
    margin: 0 0 12px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.04em;
}

.withdraw-guide__card {
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
    background: #3047b3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.withdraw-guide__card:last-child {
    margin-bottom: 0;
}

.withdraw-guide__card-title {
    margin: 0;
    padding: 8px 10px 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    color: #eebd31;
    background: linear-gradient(180deg, rgba(90, 130, 237, 0.72) 0%, rgba(55, 80, 185, 0.66) 100%);
}

.withdraw-guide__card-body {
    padding: 8px 10px 10px;
}

.withdraw-guide__lead {
    margin: 0 0 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.withdraw-guide__text {
    margin: 0 0 6px;
    font-size: 11px;
    line-height: 1.35;
}

.withdraw-guide__video {
    display: block;
    width: 100%;
    border-radius: 6px;
    background: #000;
}

.withdraw-guide__list {
    margin: 0;
    padding-left: 16px;
    font-size: 11px;
    line-height: 1.4;
}

.withdraw-guide__list li + li {
    margin-top: 4px;
}

.withdraw-guide__games {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.withdraw-guide__game-tile {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.withdraw-guide__game-tile--purple {
    background-image: url('/assets/image/icongame/1.png');
}

.withdraw-guide__game-tile--gold {
    background-image: url('/assets/image/icongame/2.png');
}

.withdraw-guide__game-tile--green {
    background-image: url('/assets/image/icongame/3.png');
}

.withdraw-step2__panel {
    flex: 1;
    min-height: 0;
    max-height: 206px;
    margin-bottom: 35px;
    padding: 48px 11px;
    border-radius: 6px;
    background: linear-gradient(180deg, #2f5abc 0%, #2b388f 100%);
    
}

.withdraw-step2__label {
    display: block;
    margin: 0 3px 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

.withdraw-step2__label + .withdraw-step2__input {
    margin-bottom: 8px;
}

.withdraw-step2__label:last-of-type {
    margin-top: 0;
}

.withdraw-step2__input {
    width: 100%;
    min-height: 30px;
    padding: 6px 8px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(180deg, #4f86d3 0%, #3f6fbf 100%);
    color: #fff;
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.3;
}

.withdraw-step2__input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.withdraw-step2__input:last-of-type {
    margin-bottom: 0;
}

.withdraw-step2__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-left: 12px;
    margin-right: 12px;
}

.withdraw-step2__confirm,
.withdraw-step2__cancel {
    min-height: 30px;
    padding: 13px 10px;
    border: none;
    border-radius: 999px;
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    cursor: pointer;
}

.withdraw-step2__confirm {
    background: linear-gradient(180deg, #8fe04a 0%, #5fbf2a 100%);
    color: #1a1a1a;
}

.withdraw-step2__cancel {
    background: linear-gradient(180deg, #c8b6ff 0%, #a894ef 100%);
    color: #1a1a1a;
}

.withdraw-step2__confirm:hover,
.withdraw-step2__cancel:hover {
    filter: brightness(1.05);
}

@media (max-width: 360px) {
    .withdraw-overlay.is-open {
        grid-template-columns: min(92vw, var(--withdraw-max-width));
    }

    .withdraw__amount {
        font-size: 14px;
        min-height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .withdraw__mode-tab,
    .withdraw__channel,
    .withdraw__amount {
        transition: none;
    }
}
