/* Tab Buttons */
.event-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 2px solid #eee;
    padding-bottom: 0;
}

.event-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    margin-bottom: -2px;
}

.event-tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #FFD700;
    transition: width 0.3s ease;
}

.event-tab-btn.active {
    color: #1a1a1a;
}

.event-tab-btn.active::after {
    width: 100%;
}

.tab-count {
    background: #f0f0f0;
    color: #555;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
}

.event-tab-btn.active .tab-count {
    background: #FFD700;
    color: #1a1a1a;
}


.event-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

.event-empty-state svg {
    margin-bottom: 16px;
    opacity: 0.4;
}

.event-empty-state p {
    font-size: 15px;
}

@media (min-width: 768px) {
    .border-left-md {
        border-left: 1px solid #e0e0e0;
        padding: 0px 0px 0px 5px;
    }
}

/* test */
.event-card {
    background: #f4f1e9;
    border-radius: 12px;
    padding: 24px 28px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Diagonal "Current" ribbon */
/* Diagonal ribbon — sized to fit longer labels like "Upcoming" */
.event-card__ribbon-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 90px;
    height: 90px;
    overflow: hidden;
    pointer-events: none;
}

.event-card__ribbon {
    position: absolute;
    top: 21px;
    left: -38px;
    width: 140px;
    transform: rotate(-45deg);
    background: #e0b64a;
    color: #4a3a10;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: 4px 0;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.event-card__row {
    display: flex;
    align-items: stretch;
    gap: 75px;
}

/* Date block */
.event-card__date {
    text-align: center;
    min-width: 44px;
    padding-top: 6px;
    flex-shrink: 0;
    margin-left: 15px;
}

.event-card__day {
    color: var(--ztc-text-text-3);
    font-size: var(--ztc-font-size-font-s40);
    line-height: var(--ztc-specing-height44);
    font-family: var(--ztc-family-font2);
    font-weight: var(--ztc-weight-bold);
}

.event-card__month {
    font-size: var(--ztc-font-size-font-s16);
    color: #8a8677;
    margin-top: 4px;
    line-height: 1.3;
}
.event-card__year {
    font-size: var(--ztc-font-size-font-s16);
    color: #8a8677;
    line-height: 1.3;
    margin-top: 4px;
}

/* Divider */
.event-card__divider {
    width: 4px;
    background: #E4C152;
    flex-shrink: 0;
}

/* Main content */
.event-card__content {
    flex: 1;
    padding-top: 6px;
    min-width: 0;
}

.event-card__date-range {
    display: inline-block;
    background: #E4C152;
    color: black;
    font-size: 17px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    max-width: 100%;
}

.event-card__title {
    color: var(--ztc-text-text-3);
    font-size: var(--ztc-font-size-font-s22);
    line-height: var(--ztc-specing-height24);
    font-family: var(--ztc-family-font2);
    font-weight: var(--ztc-weight-bold);
    margin: 0 0 12px;
}

.event-card__join-btn {
    background: #358560;
    color: #f4f1e9;
    border: none;
    padding: 7px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.event-card__join-btn:hover {
    background: #333333;
}

/* .event-card:hover {
    .event-card__divider {
        background: #E4C152;
        transition: 0.3s;
    }

    .event-card__date-range {
        background: #E4C152;
        transition: 0.3s;
    }
} */

/* Thumbnail */
.event-card__thumb {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    background: #e8e4d8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.event-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-card__thumb-placeholder {
    color: #a8a396;
    font-size: 12px;
}

.event-card__winner {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    background: #efe9da;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* .event-card__winner-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e0b64a;
    color: #4a3a10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
} */
.event-card__winner-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.event-card__winner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.event-card__winner-label {
    font-size: 10px;
    color: #a8a396;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.event-card__winner-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
}

/* ---------- Responsiveness ---------- */

/* Tablet: shrink thumbnail a bit */
/* Start scaling down earlier, before the 640px breakpoint kicks in */

@media (max-width: 1200px) {
    .upcoming {
        top: 10px;
    }
}

@media (max-width: 991px) {
    .event-card__row {
        gap: 20px;
    }

}

@media (max-width: 767px) {
    .event-card {
        padding: 22px 24px;
    }

    .event-card__row {
        gap: 14px;
    }

    .event-card__date-range {
        font-size: 12px;
        padding: 5px 12px;
    }

    .event-card__title {
        font-size: 15px;
    }

    .event-card__winner {
        width: 130px;
        height: 130px;
        gap: 6px;
    }

    .event-card__winner-avatar {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .event-card__winner-label {
        font-size: 9px;
    }

    .event-card__winner-name {
        font-size: 13px;
    }
    
   
}

@media (max-width: 640px) {
    .event-card {
        padding: 20px 22px;
    }

    .event-card__thumb {
        width: 120px;
    }

    .event-card__ribbon-wrap {
        width: 78px;
        height: 78px;
    }

    .event-card__ribbon {
        top: 16px;
        left: -26px;
        width: 122px;
        font-size: 10px;
    }

    .event-card__winner {
        width: 100px;
        height: 100px;
        gap: 5px;
    }

    .event-card__winner-avatar {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .event-card__winner-label {
        font-size: 8px;
    }

    .event-card__winner-name {
        font-size: 12px;
    }
}

/* Mobile: stack thumbnail below content, full width */
@media (max-width: 480px) {
    .event-card {
        padding: 15px !important;
    }

    .event-card__row {
        flex-wrap: wrap;
    }

    .event-card__divider {
        display: none;
    }

    .event-card__date {
        padding-top: 2px;
    }

    .event-card__day {
        font-size: 17px;
        line-height: 30px;
    }

    .event-card__content {
        order: 1;
        flex: 1 1 auto;
    }

    .event-card__thumb {
        order: 2;
        width: 100%;
        height: 140px;
        margin-top: 14px;
    }

    .event-card__ribbon-wrap {
        width: 68px;
        height: 68px;
    }

    .upcoming {
        top: 10px;
    }
    .past{
        top: 14px !important;
        left: -36px !important;
    }
    .event-card__ribbon {
        top: 10px;
        left: -27px;
        width: 108px;
        font-size: 9px;
        padding: 3px 0;
    }
    

    .event-card__winner {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        padding: 12px;
    }

    .event-card__winner-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .event-card__winner-label {
        font-size: 9px;
        margin-top: 0;
    }

    .event-card__winner-name {
        font-size: 13px;
    }
}

/* ---------- App download popup ---------- */

.app-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.app-modal-overlay.is-open {
    display: flex;
}

.app-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 28px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: app-modal-in 0.18s ease-out;
}

@keyframes app-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.app-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: #f4f1e9;
    border-radius: 50%;
    font-size: 16px;
    color: #6b6858;
    cursor: pointer;
    line-height: 1;
}

.app-modal__close:hover {
    background: #e8e4d8;
}

.app-modal__text {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 20px;
}

.app-modal__stores {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: fit-content;
    margin: 0 auto;
}

.app-store-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.app-store-badge:hover {
    background: #333333;
}

.app-store-badge svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.app-store-badge__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.app-store-badge__small {
    font-size: 10px;
    color: #cfcfcf;
}

.app-store-badge__big {
    font-size: 15px;
    font-weight: 500;
}

.upcoming {
    background: #ff0c0c;
}

.past {
    background: #aaa;
    top: 17px;
    left: -45px;
}