/* ===== Lottery Results Page ===== */

.lottery-results-template {
    background: url('../img/drawings_results/background.png') no-repeat center top;
    background-size: cover;
    background-attachment: fixed;
    overflow-x: hidden;
}

.lottery-results-page-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ===== Scrollable area (detail + cards / winners) ===== */
.lottery-results-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    /* margin-top: 40px; */
    margin-bottom: 10px;
    margin-left: 20px;
    margin-right: 6px;
    padding-right: 10px;

    /* Отменяем глобальный * { scrollbar-width: none } из style.css */
    scrollbar-width: auto;
}

/* Chrome/Safari/Edge */
.lottery-results-scroll::-webkit-scrollbar {
    width: 4px;
}

.lottery-results-scroll::-webkit-scrollbar-track {
    /* margin-bottom: 10px; */
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    background: rgba(242, 235, 235, 0.5);
    background-clip: content-box;
}

.lottery-results-scroll::-webkit-scrollbar-thumb {
    background: #FFFFFF;
    border-radius: 2.5px;
}

/* Firefox */
@-moz-document url-prefix() {
    .lottery-results-scroll {
        scrollbar-width: thin;
        scrollbar-color: #FFFFFF #F2EBEB;
    }
}

/* ===== Detail block (outside scroll) ===== */
.lottery-results-detail {
    margin: 0px 20px 0 20px;
}

.lottery-results-detail[hidden] {
    display: none;
}

.lottery-results-detail__inner {
    display: flex;
    height: 173px;
    /* border-radius: 10px; */
    overflow: hidden;
}

.lottery-results-detail__media {
    width: 173px;
    border-radius: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f0e8;
    box-shadow:
        0 2px 8.8px rgba(255, 255, 255, 0.25),
        inset 0 0 0 1px white;
}

.lottery-results-detail__image {
    display: block;
    /* max-width: 100%; */
    max-height: 100%;
    object-fit: contain;
}

.lottery-results-detail__info {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.lottery-results-detail__badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.lottery-results-detail__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    font-family: Montserrat, Arial, sans-serif;
}

/* .badge-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    max-width: none;
} */

.lottery-results-detail__title {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin: 0;
    margin-left: 8px;
    margin-top: 4px;
    font-family: Montserrat, Arial, sans-serif;
}

.lottery-results-detail__stream-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    background: linear-gradient(48deg, #0072FF 0%, #00C6FF 86%), #30A4F8;
    border-radius: 10px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    font-family: Montserrat, Arial, sans-serif;
    line-height: 12px;
    align-self: flex-start;
    margin-top: auto;
}

/* ----- Winners heading (between detail and scroll) ----- */
.lottery-results-winners-heading {
    margin: 20px 0px;
    text-align: center;
    color: #000;
    font-size: 16px;
    font-weight: 700;
    font-family: Montserrat, Arial, sans-serif;
}

.lottery-results-winners-heading[hidden] {
    display: none;
}

.stream-btn-icon {
    display: block;
    width: 13px;
    height: 16px;
    flex-shrink: 0;
}

/* ----- Intro block ----- */
.lottery-results-intro {
    margin: 8px 20px 40px 20px;
    padding: 12px 14px;
    background: linear-gradient(0deg, rgba(133, 53, 0, 0.48) 0%, rgba(133, 53, 0, 0.48) 100%);
    box-shadow:
        0px 2px 3px rgba(138, 138, 138, 0.05),
        0px 6px 6px rgba(138, 138, 138, 0.04),
        0px 14px 8px rgba(138, 138, 138, 0.03),
        0px 25px 10px rgba(138, 138, 138, 0.01);
    border-radius: 10px;
}

.lottery-results-intro__text {
    margin: 0;
    text-align: center;
    color: #fff;
    font-family: Montserrat, Arial, sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.4;
    word-wrap: break-word;
}

/* ----- Winner items (replace cards when detail open) ----- */
.lottery-results-winner-item {
    display: flex;
    align-items: center;
    /* gap: 10px; */
    padding: 0px 12px;
    border-radius: 11px;
    border: 1px solid #fff;
    background: rgba(247, 243, 237, 0.84);
    backdrop-filter: blur(2px);
    box-shadow:
        2.4px 4.4px 4.4px rgba(0, 0, 0, 0.08),
        4px 4px 4px rgba(193, 79, 1, 0.65);
    min-height: 36px;
    min-width: 0;
    overflow: hidden;
}

.lottery-results-winner-item--single {
    justify-content: center;
}
.lottery-results-winner-item:not(.lottery-results-winner-item--single) {
    justify-content: space-between;
}

.lottery-results-winner-item__phone {
    flex: 1;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 23px;
    color: #000;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Montserrat, Arial, sans-serif;
}

.lottery-results-winner-item__name {
    flex: 1;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 23px;
    color: #333;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Montserrat, Arial, sans-serif;
}

/* ----- Cards list (flex) / Winners list (grid) ----- */
.lottery-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* transition: opacity 0.3s ease; */
}

.lottery-results-list--winners {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 5px;
}

.lottery-results-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-radius: 11px;
    border: 1px solid #fff;
    background: rgba(247, 243, 237, 0.84);
    backdrop-filter: blur(2px);
    box-shadow:
        2.4px 4.4px 4.4px rgba(0, 0, 0, 0.08),
        4px 4px 4px rgba(193, 79, 1, 0.65);
    cursor: pointer;
    transition: transform 0.15s;
}

.lottery-results-card:active {
    transform: scale(0.98);
}

.lottery-results-card__image {
    display: block;
    max-width: 54px;
    max-height: 54px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 7.5px;
    box-shadow: 0 0 2.2px rgba(0, 0, 0, 0.25);
}

.lottery-results-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    /* gap: 4px; */
    min-width: 0;
}

.lottery-results-card__title {
    font-weight: 700;
    font-size: 14px;
    line-height: 23px;
    color: #000;
    margin: 0;
}

.lottery-results-card__date {
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: #00000099;
    margin: 0;
}

.lottery-results-card__arrow {
    display: flex;
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}

.lottery-results-card__arrow img {
    display: block;
    width: 23px;
    height: 23px;
}

/* ----- Empty state ----- */
.lottery-results-empty {
    display: flex;
    min-height: 360px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px 0;
    text-align: center;
}

.lottery-results-empty img {
    display: block;
    width: min(260px, 100%);
    height: auto;
}

.lottery-results-empty p {
    margin: 0;
    color: #000;
    font-family: Montserrat, Arial, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 18px;
}

body > div.lottery-results-page-wrapper > section.page-nav > div > div.reload_button > button {
    display:none
}