/* alt-tournament-tools plugin styles.
   Site variables only — no hardcoded colours except fallbacks.
   Theme-specific overrides are at the bottom of each theme's style.css. */

/* ── Photon autocomplete — layout only, colours from Bootstrap .dropdown-menu + theme ── */
#att-suggestions {
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    margin-top: -1px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* ── Page width constraints ──────────────────────────────── */
.att-page-w-lg { max-width: 980px; }
.att-page-w-md { max-width: 860px; }

/* ── Icon accent colours ─────────────────────────────────── */
.att-icon-primary { color: var(--primary-400); }
.att-icon-gold    { color: #eab308; }
.att-icon-green   { color: #16a34a; }
.att-icon-fire    { color: #f97316; }

/* ── Form labels ─────────────────────────────────────────── */
.att-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--neutral-600);
    margin-bottom: .35rem;
}
.att-check-label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .88rem;
    cursor: pointer;
    user-select: none;
}
.att-check-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: var(--primary-400);
    cursor: pointer;
}

/* ── Tournament card (link wrapper) ─────────────────────── */
.att-t-card {
    text-decoration: none !important;
    color: inherit;
    border-top: 3px solid var(--primary-400) !important;
    transition: transform .15s, box-shadow .15s;
}
.att-t-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.att-t-card-head {
    border-bottom: 1px solid var(--att-border, rgba(128,128,128,.1));
    background: rgba(128,128,128,.04);
    min-height: 36px;
}

/* ── Tournament card title ───────────────────────────────── */
.att-t-name {
    font-size: .95rem;
    line-height: 1.3;
}

/* ── Meta line (date, location, organizer) ───────────────── */
.att-meta {
    font-size: .82rem;
    color: var(--neutral-500);
    line-height: 1.4;
}

/* ── Tag pills (format, players, specials) ───────────────── */
.att-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    background: var(--att-tag-bg, rgba(128,128,128,.12));
    color: var(--att-tag-color, var(--neutral-600));
    white-space: nowrap;
    line-height: 1.7;
}

/* ── Tag colour variants ─────────────────────────────────── */
.att-tag--green  { background: rgba(34,197,94,.15);  color: var(--att-tag-green,  #16a34a); }
.att-tag--blue   { background: rgba(59,130,246,.15); color: var(--att-tag-blue,   #1d4ed8); }
.att-tag--purple { background: rgba(168,85,247,.15); color: var(--att-tag-purple, #7e22ce); }

/* ── Status badges ───────────────────────────────────────── */
.att-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.7;
    flex-shrink: 0;
}
.att-badge--open      { background: rgba(34,197,94,.15);   color: #16a34a; }
.att-badge--ongoing   { background: rgba(234,179,8,.18);   color: #a16207; }
.att-badge--done      { background: var(--att-tag-bg, rgba(128,128,128,.12)); color: var(--neutral-500); }
.att-badge--cancelled { background: rgba(239,68,68,.13);   color: #b91c1c; }

/* ── Format pill (detail meta bar) ──────────────────────── */
.att-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    background: var(--primary-400);
    color: var(--neutral-800);
    white-space: nowrap;
    line-height: 1.7;
}

/* ── Organizer / player avatar ───────────────────────────── */
.att-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.att-avatar-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--att-tag-bg, rgba(128,128,128,.12));
    color: var(--neutral-500);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    flex-shrink: 0;
}

/* ── Card section header ─────────────────────────────────── */
/* Use with: class="d-flex align-items-center gap-2 px-3 py-2 att-section-head" */
.att-section-head {
    border-bottom: 1px solid var(--att-border, rgba(128,128,128,.1));
}

/* ── Player list row ─────────────────────────────────────── */
.att-player-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--att-border, rgba(128,128,128,.06));
}
.att-player-row:last-child { border-bottom: none; }

/* ── Info section values (date, venue, etc.) ─────────────── */
.att-info-val { font-size: .9rem; }

/* ── Detail body text (prizes description) ───────────────── */
.att-body-text { font-size: .9rem; line-height: 1.55; }

/* ── Round list label ────────────────────────────────────── */
.att-round-lbl {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ── Standings / config table ────────────────────────────── */
.att-table {
    border-collapse: collapse;
    width: 100%;
}
.att-th {
    padding: 8px 12px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--att-border, rgba(128,128,128,.15));
    white-space: nowrap;
}
.att-th--center { text-align: center; }
.att-td {
    padding: 9px 12px;
    font-size: .88rem;
    color: var(--neutral-700);
    border-bottom: 1px solid var(--att-border, rgba(128,128,128,.1));
    vertical-align: middle;
}
.att-tr:last-child .att-td { border-bottom: none; }
.att-tr--top .att-td       { background: var(--att-top-bg, rgba(128,128,128,.06)); }
.att-td--center            { text-align: center; }
.att-col-w20               { width: 20%; }
.att-col-w40               { width: 40%; }
.att-col-w55               { width: 55%; }
.fw-500                    { font-weight: 500; }

/* ── Tabs ────────────────────────────────────────────────── */
/* Base definition — core-altered-cards CSS is not globally loaded */
.ac-tabs {
    display: flex;
    border-bottom: 2px solid var(--sand-200);
}
.ac-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 9px 20px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--neutral-500);
    cursor: pointer;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}
.ac-tab.active                { color: var(--primary-500); border-bottom-color: var(--primary-400); }
.ac-tab:hover:not(.active)    { color: var(--neutral-700); }

/* ── Medal badges (top 3 standings) ─────────────────────── */
.att-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
}
.att-medal--1 { background: #f59e0b; color: #fff; }
.att-medal--2 { background: #9ca3af; color: #fff; }
.att-medal--3 { background: #b45309; color: #fff; }
