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

.t-card {
    background: #0c0c18;
    border: 1px solid #1a1a2a;
    border-radius: .85rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    transition: border-color .2s, transform .2s;
}
.t-card:hover {
    border-color: rgba(13,110,253,.45);
    transform: translateY(-3px);
}

/* ── Card as link ── */
a.t-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    width: 100%;
}
a.t-card:hover { color: inherit; }

/* ── Thumb (with poster) ── */
.t-card-thumb {
    position: relative;
    height: 11rem;
    background-color: #0d0d1a;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

/* ── Thumb (no poster — plain dark area) ── */
.t-card-thumb--text {
    background: #0a0a14;
}

/* ── Overlay gradient on thumb ── */
.t-card-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12,12,24,1) 0%, rgba(12,12,24,.2) 60%, transparent 100%);
    pointer-events: none;
}

/* ── Location chip on thumb ── */
.t-card-thumb-location {
    position: absolute;
    bottom: .6rem;
    left: .75rem;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
}
.t-card-thumb-location i { margin-right: .2rem; }

/* ── Status badge on thumb ── */
.t-card-thumb-status {
    position: absolute;
    top: .65rem;
    right: .65rem;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .2rem .6rem;
    border-radius: 2rem;
}
.t-card-status--open       { background: rgba(25,135,84,.25);  border: 1px solid rgba(25,135,84,.5);  color: #75b798; }
.t-card-status--scheduled  { background: rgba(255,193,7,.15);  border: 1px solid rgba(255,193,7,.4);  color: #ffc107; }
.t-card-status--closed     { background: rgba(108,117,125,.2); border: 1px solid rgba(108,117,125,.4);color: #adb5bd; }
.t-card-status--completed  { background: rgba(13,110,253,.2);  border: 1px solid rgba(13,110,253,.4); color: #6ea8fe; }

/* ── Body ── */
.t-card-body {
    padding: .85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;     /* auto basis — fixes Safari flex-basis:0 collapse */
    min-height: 0;
    position: relative; /* ensures body paints above thumb overlay */
    z-index: 1;
    color: #d8d8e8;
}
.t-card-name {
    font-size: .95rem;
    font-weight: 700;
    color: #e8e8f0;
    line-height: 1.3;
    margin-bottom: .5rem;
}
.t-card-meta {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-size: .72rem;
    color: rgba(255,255,255,.45);
    margin-bottom: .85rem;
}
.t-card-meta i { margin-right: .25rem; }

/* ── Footer ── */
.t-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: .7rem;
    border-top: 1px solid #1a1a2a;
    margin-top: auto;
    gap: .5rem;
}
.t-card-footer-left {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}
.t-card-registered {
    font-size: .68rem;
    color: #444;
}

/* ── Buttons ── */
.t-card-btn-register {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .8rem;
    border-radius: .4rem;
    background: #0d6efd;
    color: #fff !important;
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .04em;
    transition: background .15s;
    white-space: nowrap;
}
.t-card-btn-register:hover { background: #0b5ed7; }

.t-card-btn-view {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .7rem;
    border-radius: .4rem;
    background: transparent;
    border: 1px solid #2a2a3a;
    color: #888 !important;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, color .15s;
    white-space: nowrap;
}
.t-card-btn-view:hover { border-color: #555; color: #ccc !important; }

.t-card-btn-info {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .7rem;
    border-radius: .4rem;
    background: transparent;
    border: 1px solid #2a2a3a;
    color: #888 !important;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, color .15s;
    white-space: nowrap;
}
.t-card-btn-info:hover { border-color: #ffc107; color: #ffc107 !important; }

.t-card-btn-participants {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .7rem;
    border-radius: .4rem;
    background: transparent;
    border: 1px solid #2a2a3a;
    color: #888 !important;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, color .15s;
    white-space: nowrap;
}
.t-card-btn-participants:hover { border-color: #0d6efd; color: #6ea8fe !important; }
