/* ============================================================
   Tournament Card — shared component (.tc-*)
   Used by: home_tournaments.php (PHP) + tournaments.php (JS)
   ============================================================ */

/* ── Wrapper: reliable aspect-ratio height via padding-top ── */
.tc-wrap {
    position: relative;
    width: 100%;
    padding-top: 125%; /* 4:5 — poster cards */
    border-radius: .85rem;
    overflow: hidden;
}
/* No-poster cards: compact height */
.tc-wrap--no-poster {
    padding-top: 52%;
}

/* ── Card: fills wrapper, clips children ── */
.tc {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    border-radius: .85rem;
    overflow: hidden;
    isolation: isolate;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.tc:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,.7);
}

/* Full-card navigation link — transparent overlay */
.tc-cover-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* ── Card as clickable div ── */
.tc[data-href] { cursor: pointer; }

/* ── Layer 1: poster ── */
.tc-poster {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-size: cover;
    background-position: center top;
    background-color: #07071a;
}

/* No-poster: abstract gamified background */
.tc-poster--none {
    background-image:
        linear-gradient(rgba(13,110,253,.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13,110,253,.09) 1px, transparent 1px),
        linear-gradient(rgba(13,110,253,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13,110,253,.04) 1px, transparent 1px),
        radial-gradient(ellipse 100% 60% at 50% 110%, rgba(13,110,253,.45) 0%, transparent 60%),
        radial-gradient(ellipse 65% 55% at 95% -5%, rgba(147,51,234,.28) 0%, transparent 55%),
        radial-gradient(ellipse 45% 35% at 5% 55%, rgba(6,182,212,.1) 0%, transparent 55%),
        linear-gradient(155deg, #080818 0%, #04040f 100%);
    background-size:
        22px 22px, 22px 22px,
        88px 88px, 88px 88px,
        100% 100%, 100% 100%, 100% 100%, 100% 100%;
}

/* ── Layer 2: gradient fade from bottom ── */
.tc-gradient {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 75%;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.97)  0%,
        rgba(0,0,0,.88)  30%,
        rgba(0,0,0,.45)  60%,
        transparent      100%
    );
}

/* ── Layer 3: info anchored to bottom ── */
.tc-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 2;
    padding: 1rem;
}

/* ── Status badge ── */
.tc-badge {
    display: inline-flex;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .2rem .65rem;
    border-radius: 2rem;
    white-space: nowrap;
    margin-bottom: .5rem;
}
.tc-badge--open      { background: rgba(25,135,84,.45);  border: 1px solid rgba(25,135,84,.75);  color: #86efac; }
.tc-badge--scheduled { background: rgba(255,193,7,.35);  border: 1px solid rgba(255,193,7,.7);   color: #fcd34d; }
.tc-badge--closed    { background: rgba(108,117,125,.4); border: 1px solid rgba(108,117,125,.7); color: #cbd5e1; }
.tc-badge--completed { background: rgba(13,110,253,.38); border: 1px solid rgba(13,110,253,.7);  color: #93c5fd; }

/* ── Name ── */
.tc-name {
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: .3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Meta (location + date) ── */
.tc-meta {
    display: flex;
    flex-direction: column;
    gap: .12rem;
    font-size: .68rem;
    color: rgba(255,255,255,.65);
    margin-bottom: .7rem;
}
.tc-meta i { margin-right: .2rem; opacity: .8; }

/* ── Action buttons — one row ── */
.tc-actions { display: flex; gap: .5rem; }

.tc-btn-reg {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .48rem .5rem;
    border-radius: .4rem;
    background: #0d6efd;
    color: #fff !important;
    font-size: .73rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .03em;
    transition: background .15s;
    white-space: nowrap;
}
.tc-btn-reg:hover { background: #0b5ed7; }

.tc-btn-competitors {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .48rem .5rem;
    border-radius: .4rem;
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.25);
    color: rgba(255,255,255,.9) !important;
    font-size: .73rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.tc-btn-competitors:hover {
    background: rgba(0,0,0,.7);
    border-color: rgba(255,255,255,.4);
}
/* No Register → Competitors takes full width */
.tc-btn-competitors--full { flex: none; width: 100%; }

.tc-btn-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .48rem .5rem;
    border-radius: .4rem;
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.25);
    color: rgba(255,255,255,.9) !important;
    font-size: .73rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: .03em;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.tc-btn-info:hover {
    background: rgba(0,0,0,.7);
    border-color: rgba(255,255,255,.4);
}

.tc-btn-standby {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .48rem .5rem;
    border-radius: .4rem;
    background: rgba(245,166,35,.15);
    border: 1px solid rgba(245,166,35,.4);
    color: #f5a623 !important;
    font-size: .73rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: .03em;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.tc-btn-standby:hover {
    background: rgba(245,166,35,.25);
    border-color: rgba(245,166,35,.6);
}

.tc-btn-results {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .48rem .5rem;
    border-radius: .4rem;
    background: rgba(0,200,150,.15);
    border: 1px solid rgba(0,200,150,.4);
    color: #00c896 !important;
    font-size: .73rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: .03em;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.tc-btn-results:hover {
    background: rgba(0,200,150,.25);
    border-color: rgba(0,200,150,.6);
}
.tc-btn-results--full { flex: none; width: 100%; }
