/* ===============================
   TONTINE - shared styles (mobile-first)
   =============================== */

/* Touch-friendly controls */
.btn { min-height: 44px; }
.btnSm { padding: 8px 12px; font-size: 13px; border-radius: 8px; min-height: 38px; }

select,
input[type="file"] {
    background: var(--panel2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    width: 100%;
    font-size: 16px; /* prevents iOS zoom on focus */
}

input { font-size: 16px; }

.langSelect {
    width: auto;
    padding: 8px 10px;
    font-size: 14px;
}

/* Hamburger menu */
.menuBtn {
    background: var(--panel2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 20px;
    line-height: 1;
    padding: 10px 12px;
    min-height: 44px;
    cursor: pointer;
    flex-shrink: 0;
}
.menuBtn:hover { border-color: var(--accent); }

.menuOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1000;
}
.menuOverlay.open { opacity: 1; pointer-events: auto; }

.menuDrawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 80vw);
    background: var(--panel);
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform .2s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 14px;
    gap: 6px;
}
.menuDrawer.open { transform: translateX(0); }

.menuBrand {
    color: var(--muted);
    font-weight: 800;
    font-size: 14px;
    padding: 10px 12px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.menuItem {
    display: block;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    padding: 13px 12px;
    border-radius: 10px;
}
.menuItem:hover { background: var(--panel2); }
.menuItem.active { background: var(--panel2); color: var(--accent); }

/* Header: flex layout (overrides the absolute-positioned back link) */
.loginHeader {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.loginBack { position: static; transform: none; }
.loginBrand { flex: 1; display: flex; }
.headerRight {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Tags */
.tTag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    margin-left: 6px;
    white-space: nowrap;
}
.tTag.open { color: #6fe08f; }
.tTag.closed { color: var(--yellow); }
.tTag.done { color: var(--muted); }

/* Tontine list */
.tList { display: grid; gap: 10px; }
.tRow {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
}
.tRow:active, .tRow:hover { border-color: var(--accent); }
.tImg {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}
.tName { font-weight: 800; font-size: 16px; }
.tMeta { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* Badges */
.badgesRow { display: flex; flex-wrap: wrap; gap: 8px; }
.badgeChip {
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}

/* Create form: single column on mobile, two on larger screens */
.formGrid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .formGrid { grid-template-columns: 1fr 1fr; } }

/* Detail header */
.hdr { display: flex; gap: 14px; align-items: center; }
.hdrImg {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--panel2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}
.hdrName { font-size: 20px; font-weight: 900; }
.hdrMeta { color: var(--muted); font-size: 13px; margin-top: 4px; }
@media (min-width: 760px) {
    .hdrImg { width: 84px; height: 84px; }
    .hdrName { font-size: 24px; }
    .hdrMeta { font-size: 14px; }
}

/* Detail: single column on mobile, two on larger screens */
.grid2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* Tables */
.tWrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); }
th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.pos { font-weight: 900; color: var(--accent); }
.hit { color: #6fe08f; font-weight: 700; }
.secret { color: var(--muted); font-style: italic; }

/* Secret pick checkbox */
#secretRow label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-direction: row;
}
#secretRow input[type="checkbox"] { width: 20px; height: 20px; }

/* Celebrity search */
.searchBox { position: relative; }
.searchResults {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 10;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    max-height: 260px;
    overflow-y: auto;
    display: none;
}
.searchItem { padding: 12px; cursor: pointer; }
.searchItem:active, .searchItem:hover { background: var(--panel2); }

/* Admin pending requests */
.pendingRow {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    flex-wrap: wrap;
}
