.upv2-donate-midsorteio-btn.is-hidden,
.upv2-midsorteio-entry.is-hidden,
.upv2-midsorteio-panel.is-hidden {
    display: none !important;
}

.upv2-midsorteio-panel {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    width: 100%;
    margin-top: .75rem;
    padding: .85rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(35, 19, 59, .8), rgba(14, 13, 24, .62)),
        rgba(0, 0, 0, .16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 10px 26px rgba(18, 9, 35, .18);
    color: #fff;
}

.upv2-midsorteio-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    color: inherit;
}

.upv2-midsorteio-head strong {
    color: #fff;
    font-size: .95rem;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.upv2-midsorteio-head span {
    max-width: 50%;
    padding: .18rem .45rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(0, 0, 0, .18);
    color: rgba(255, 255, 255, .66);
    font-size: .8rem;
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upv2-midsorteio-content {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.upv2-midsorteio-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    padding: .75rem;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .035)),
        rgba(8, 8, 14, .42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .1),
        0 8px 18px rgba(0, 0, 0, .16);
}

.upv2-midsorteio-item strong {
    display: block;
    color: #fff;
    font-size: .92rem;
    font-weight: 900;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

.upv2-midsorteio-item small {
    display: block;
    margin-top: .18rem;
    color: rgba(255, 255, 255, .7);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.35;
}

.upv2-midsorteio-actions {
    display: grid;
    grid-template-columns: 72px auto;
    gap: .45rem;
    align-items: center;
}

.upv2-midsorteio-actions input {
    min-height: 36px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 8px;
    background: rgba(9, 9, 15, .82);
    color: #fff;
    font-weight: 800;
    text-align: center;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
}

.upv2-midsorteio-actions input:focus {
    border-color: rgba(192, 132, 252, .78);
    outline: none;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, .35),
        0 0 0 .16rem rgba(168, 85, 247, .24);
}

.upv2-midsorteio-actions input:disabled {
    opacity: .52;
}

.upv2-midsorteio-actions button,
.upv2-midsorteio-login a,
.upv2-midsorteio-points-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 .75rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: linear-gradient(140deg, var(--upv2-card-hover-deep, #5b27a8), var(--upv2-card-deeper, #38156b));
    color: #fff !important;
    box-shadow:
        0 8px 18px rgba(26, 10, 49, .24),
        inset 0 1px 0 rgba(255, 255, 255, .14);
    font-size: .8rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .16s ease, filter .16s ease, border-color .16s ease;
}

.upv2-midsorteio-actions button:hover,
.upv2-midsorteio-actions button:focus,
.upv2-midsorteio-login a:hover,
.upv2-midsorteio-login a:focus,
.upv2-midsorteio-points-btn:hover,
.upv2-midsorteio-points-btn:focus {
    border-color: rgba(216, 180, 254, .5);
    color: #fff !important;
    filter: brightness(1.06);
    text-decoration: none;
    transform: translateY(-1px);
    outline: none;
}

.upv2-midsorteio-actions button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.upv2-midsorteio-login {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.upv2-midsorteio-points {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem .75rem;
    border: 1px solid rgba(216, 180, 254, .24);
    border-radius: 8px;
    background: rgba(0, 0, 0, .18);
}

.upv2-midsorteio-points span {
    color: rgba(255, 255, 255, .78);
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.35;
}

.upv2-midsorteio-points-btn {
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .upv2-midsorteio-item {
        grid-template-columns: 1fr;
    }

    .upv2-midsorteio-actions {
        grid-template-columns: 64px 1fr;
    }

    .upv2-midsorteio-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .upv2-midsorteio-head span {
        max-width: 100%;
    }

    .upv2-midsorteio-points {
        align-items: stretch;
        flex-direction: column;
    }
}
