/* Live tournament cards + dialog (shared across tournaments/index/live/linktree) */

.tournaments-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tournament-card {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 62px;
    padding: 8px 10px;
    font-family: Arial, sans-serif;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.25);
    border: 0.75px solid #ff0000;
    border-radius: 8px;
    cursor: pointer;
}

.tournament-card:hover,
.tournament-card:focus-visible {
    background: rgba(255, 0, 0, 0.08);
    outline: none;
}

.tournament-card--confidential {
    background: rgba(255, 64, 129, 0.15);
}

.tournament-card--external {
    border-color: #cfcfcf;
}

.tournament-card--external:hover,
.tournament-card--external:focus-visible {
    background: rgba(207, 207, 207, 0.12);
}

/* EXT callout: badge then copy on one line inside a card-shaped gray frame. */
.extapp-intro {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 12px 0 0;
    padding: 6px 8px;
    text-align: center;
    background: rgba(0, 0, 0, 0.25);
    border: 0.75px solid #cfcfcf;
    border-radius: 8px;
}

/* Beat header.css `.banner > div { flex-direction: column }` */
.banner > .extapp-intro {
    display: block !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
    align-items: unset !important;
    justify-content: unset !important;
    gap: 0 !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.extapp-intro > .doc-intro,
.extapp-intro > .extapp-intro__copy {
    display: block;
    margin: 0 !important;
    padding: 0;
    width: auto;
    max-width: none;
    color: #e0e0e0;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

.extapp-intro > .extapp-intro__copy {
    font-style: normal;
}

.extapp-intro > .extapp-intro__copy i {
    font-style: italic;
}

.extapp-badge,
.extapp-intro .extapp-badge {
    box-sizing: border-box;
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    flex: 0 0 auto;
    height: 14px;
    padding: 0 3px;
    margin: 0 3px 0 0;
    border: 1px solid #9e9e9e;
    border-radius: 4px;
    color: #212121;
    background: #cfcfcf;
    font-family: Arial, sans-serif;
    font-size: 8px;
    font-weight: bold;
    letter-spacing: 0.02em;
    line-height: 1;
}

.tournament-section__count--loading {
    color: transparent !important;
    position: relative;
}

.tournament-section__count--loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: tournament-count-spin 0.7s linear infinite;
}

.tournament-section__count-filtered {
    color: #bdbdbd;
}

.tournament-section__count--highlight .tournament-section__count-filtered {
    color: #bdbdbd;
}

.tournament-section__count-sep {
    margin: 0 1px;
}

.tournament-section__count--highlight .tournament-section__count-sep,
.tournament-section__count--highlight .tournament-section__count-total {
    color: inherit;
}

@keyframes tournament-count-spin {
    to {
        transform: rotate(360deg);
    }
}

/* EXT: only Register is muted; Cockpit / Live stay brand red */
.tournament-card--external .tournament-card__register {
    background: #cfcfcf !important;
    color: #212121 !important;
    border: 1.5px solid #ff0000 !important;
}

.tournament-card--external .tournament-card__register:hover,
.tournament-card--external .tournament-card__register:focus-visible {
    background: #bdbdbd !important;
    color: #212121 !important;
    border-color: #ff0000 !important;
    outline: none;
}

.tournament-list-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 10px;
}

.tournament-list-filters__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 12px;
    width: 100%;
}

.tournament-list-filters__grid--with-period {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tournament-list-filters__grid--cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tournament-list-filters__field {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.tournament-list-filters__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tournament-list-filters__select-wrap {
    position: relative;
    width: 100%;
}

.tournament-list-filters__select-wrap .tournament-list-filters__select {
    width: 100%;
}

.tournament-list-filters__select-wrap:not(.is-open) .tournament-list-filters__select {
    color: transparent;
}

.tournament-list-filters__select-wrap.is-open .tournament-list-filters__select {
    color: #e0e0e0;
    text-align: left;
    text-align-last: left;
}

.tournament-list-filters__select-display {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 4px 24px 4px 8px;
    pointer-events: none;
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #e0e0e0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}

.tournament-list-filters__select-display > span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tournament-list-filters__filter-icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    fill: #e0e0e0;
}

.tournament-list-filters__filter-icon path {
    stroke: #e0e0e0;
    stroke-width: 0.85;
    stroke-linejoin: round;
    paint-order: stroke fill;
}

.tournament-list-filters__select-display strong {
    font-weight: 700;
}

.tournament-list-filters__select-wrap.is-open .tournament-list-filters__select-display {
    display: none;
}

.tournament-list-filters__select {
    box-sizing: border-box;
    width: 100%;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid #9e9e9e;
    border-radius: 4px;
    background: #1a1a1a;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    font-size: 12px;
    text-align: left;
    text-align-last: left;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.tournament-list-filters__combo,
.tournament-list-filters__country {
    position: relative;
    display: flex;
    align-items: center;
}

.tournament-list-filters__combo-input,
.tournament-list-filters__country-input {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 28px;
    cursor: pointer;
    text-align: left;
    color: #e0e0e0;
}

.tournament-list-filters__combo-input::placeholder,
.tournament-list-filters__country-input::placeholder {
    color: #e0e0e0;
    opacity: 1;
}

.tournament-list-filters__combo-input::-webkit-input-placeholder,
.tournament-list-filters__country-input::-webkit-input-placeholder {
    color: #e0e0e0;
    opacity: 1;
}

.tournament-list-filters__combo-input.has-display-overlay,
.tournament-list-filters__combo-input.has-display-overlay::placeholder,
.tournament-list-filters__country-input.has-display-overlay,
.tournament-list-filters__country-input.has-display-overlay::placeholder {
    color: transparent;
}

.tournament-list-filters__combo-display,
.tournament-list-filters__country-display {
    position: absolute;
    left: 0;
    right: 28px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;
    pointer-events: none;
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #e0e0e0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    z-index: 1;
}

.tournament-list-filters__combo-display > span,
.tournament-list-filters__country-display > span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tournament-list-filters__combo-display strong,
.tournament-list-filters__country-display strong {
    font-weight: 700;
}

.tournament-list-filters__combo-display[hidden],
.tournament-list-filters__country-display[hidden] {
    display: none;
}

.tournament-list-filters__combo.is-querying .tournament-list-filters__combo-input,
.tournament-list-filters__combo-input:focus,
.tournament-list-filters__country.is-querying .tournament-list-filters__country-input,
.tournament-list-filters__country-input:focus {
    cursor: text;
    text-align: left;
    color: #e0e0e0;
}

.tournament-list-filters__combo.is-open:not(.is-querying) .tournament-list-filters__combo-input,
.tournament-list-filters__country.is-open:not(.is-querying) .tournament-list-filters__country-input {
    cursor: pointer;
    text-align: left;
}

.tournament-list-filters__combo-clear,
.tournament-list-filters__country-clear {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 2px 6px;
    z-index: 2;
    display: none;
}

.tournament-list-filters__combo.has-value .tournament-list-filters__combo-clear,
.tournament-list-filters__country.has-value .tournament-list-filters__country-clear {
    display: block;
}

/* Page CSS sets .app-accordion { overflow: hidden } (border-radius). That clips
   position:absolute filter lists when the accordion body is short. */
details.app-accordion:has(.tournament-list-filters__combo.is-open),
details.app-accordion:has(.tournament-list-filters__country.is-open) {
    overflow: visible;
    position: relative;
    z-index: 40;
}

.tournament-list-filters__suggest-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 20;
    max-height: 220px;
    overflow: auto;
    border: 1px solid #9e9e9e;
    border-radius: 4px;
    background: #121212;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}

.tournament-list-filters__suggest-list::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.tournament-list-filters__suggest-list::-webkit-scrollbar-track {
    background: transparent;
}

.tournament-list-filters__suggest-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
}

.tournament-list-filters__suggest {
    box-sizing: border-box;
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    font-size: 12px;
    padding: 6px 8px 6px 22px;
    cursor: pointer;
    position: relative;
}

.tournament-list-filters__suggest[aria-selected="true"]::before {
    content: "✓";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #e0e0e0;
}

.tournament-list-filters__suggest:hover,
.tournament-list-filters__suggest:focus {
    background: rgba(255, 0, 0, 0.15);
    outline: none;
}

.tournament-list-filters__suggest[aria-selected="true"] {
    background: rgba(255, 0, 0, 0.12);
}

.tournament-list-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 10px 0 0;
}

.tournament-list-pager[hidden] {
    display: none !important;
}

.tournament-list-pager__btn {
    min-width: 32px;
    min-height: 28px;
    border: 1px solid #9e9e9e;
    border-radius: 4px;
    background: #1a1a1a;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.tournament-list-pager__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.tournament-list-pager__status {
    color: rgba(255, 255, 255, 0.75);
    font-family: Arial, sans-serif;
    font-size: 12px;
    min-width: 48px;
    text-align: center;
}

@media (max-width: 720px) {
    .tournament-list-filters__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tournament-list-filters__grid > .tournament-list-filters__field:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc((100% - 12px) / 2);
    }

    .tournament-list-filters__combo-input,
    .tournament-list-filters__country-input {
        font-size: 16px;
        padding: 2px 8px;
    }
}

.tournament-card__flyer {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    color: #ff0000;
    font-size: 20px;
    font-weight: bold;
}

.tournament-card__flyer--light {
    background: #ffffff;
}

.tournament-card__flyer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
    box-sizing: border-box;
}

.tournament-card__flyer--contain img {
    object-fit: contain;
}

.tournament-card__main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
    margin-left: 12px;
}

.tournament-card__title {
    margin: 0;
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tournament-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 8px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12.5px;
    line-height: 1.3;
}

.tournament-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tournament-card__meta-item svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    color: #ff0000;
}

.tournament-card__info-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 8px;
    min-width: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.3;
}

.tournament-card__info-line .tournament-card__meta-item {
    min-width: 0;
    max-width: 100%;
}

.tournament-card__info-line .tournament-card__meta-item > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tournament-card__actions {
    display: inline-grid;
    grid-auto-flow: row;
    grid-template-columns: 56px;
    align-items: start;
    gap: 6px;
    margin-left: 8px;
    flex-shrink: 0;
}

.tournament-card__register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 16px;
    padding: 1px 5px;
    box-sizing: border-box;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    background: #ff0000;
    font: inherit;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
}

.tournament-card__register:hover,
.tournament-card__register:focus-visible {
    background: #cc0000;
    outline: none;
}

.tournament-card__live-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 16px;
    padding: 1px 5px;
    box-sizing: border-box;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    background: #ff0000;
    font: inherit;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.tournament-card__live-action:hover,
.tournament-card__live-action:focus-visible {
    background: #cc0000;
    outline: none;
}

.tournament-card__meta-item svg.tournament-card__meta-icon--outline {
    fill: none;
}

.tournament-card__meta-item svg.tournament-card__meta-icon--outline path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.tournament-card__xp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    box-sizing: border-box;
    border: 1px solid #ff0000;
    border-radius: 2px;
    color: #ff0000;
    font-size: 7px;
    font-weight: bold;
    line-height: 1;
    flex-shrink: 0;
}

.tournament-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
}

.tournament-dialog-overlay[hidden] {
    display: none;
}

.tournament-dialog {
    --dialog-action-width: 140px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: min(100%, 520px);
    padding: 16px 28px;
    color: #ffffff;
    background: rgba(20, 20, 20, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.tournament-dialog h2 {
    margin: 0 28px;
    font-size: 18px;
}

.tournament-dialog p {
    margin: 0;
    color: #e0e0e0;
    line-height: 1.5;
}

.tournament-dialog a.view-more-link {
    color: #999;
    font-style: italic;
    text-decoration: none;
}

.tournament-dialog__soon {
    margin: 0;
    color: #e0e0e0;
    font-style: italic;
    line-height: 1.5;
}

.tournament-dialog__close-x {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 0;
    color: #ffffff;
    background: transparent;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.tournament-dialog__url {
    overflow-wrap: anywhere;
    color: #aaaaaa;
}

.tournament-dialog__url a {
    color: #aaaaaa;
}

.tournament-dialog__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.tournament-dialog__actions--live {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, var(--dialog-action-width)));
    justify-content: center;
    gap: 10px;
    width: 100%;
    align-items: stretch;
}

.tournament-dialog__actions--live > .tournament-dialog__open-app {
    grid-column: 1 / -1;
    justify-self: center;
}

.tournament-dialog__actions--single {
    display: flex;
    justify-content: center;
    width: 100%;
}

.tournament-dialog__actions--live > .tournament-dialog__open-app,
.tournament-dialog__actions--live > .tournament-dialog__live-action,
.tournament-dialog__actions--single > .tournament-dialog__open-app {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, var(--dialog-action-width));
    min-width: 0;
    box-sizing: border-box;
    padding: 8px;
    white-space: nowrap;
}

.tournament-dialog__open-app {
    min-width: 160px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    color: #ffffff;
    background: #ff0000;
    border: 1px solid #ff0000;
}

.tournament-dialog__live-action {
    min-width: 120px;
    padding: 10px 14px;
    border-radius: 8px;
    font: inherit;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    background: #ff0000;
    border: 1px solid #ff0000;
    cursor: pointer;
}

.tournament-dialog__live-action:hover,
.tournament-dialog__live-action:focus-visible,
.tournament-dialog__open-app:hover,
.tournament-dialog__open-app:focus-visible {
    background: #cc0000;
    border-color: #cc0000;
    outline: none;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .tournament-card {
        align-items: center;
    }
}
