/* Nashville Food Trucks Chat: same palette and shapes as the rest of the site, mobile first */
*{box-sizing:border-box;margin:0}
html{-webkit-text-size-adjust:100%}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:#f5f8fc;color:#12304f;padding:0 12px;min-height:100vh;display:flex;flex-direction:column}
[hidden]{display:none!important}
a{color:#1f6fbf}
a:focus-visible,button:focus-visible,.logo-link:focus-visible,[tabindex]:focus-visible{outline:3px solid #1f5f9e;outline-offset:3px}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.chat-top{max-width:1040px;width:100%;margin:0 auto;display:flex;align-items:center;gap:12px;padding:16px 0 12px}
.logo-link{display:block;flex:none;border-radius:50%}
.logo-link img{width:56px;height:56px;display:block}
.top-text{flex:1;min-width:0;text-align:left}
.kicker{display:inline-block;background:#e3eefa;color:#1f5f9e;font-weight:700;font-size:12px;letter-spacing:.06em;text-transform:uppercase;padding:5px 10px;border-radius:999px;margin-bottom:4px}
h1{font-size:clamp(1.25rem,5vw,1.9rem);line-height:1.15}
h2{font-size:clamp(1.35rem,4.5vw,1.8rem);line-height:1.2;margin-bottom:10px}
h3{font-size:1.15rem;margin-bottom:4px}
p{font-size:1.05rem;line-height:1.5;color:#3a5470;margin-bottom:20px}

main{flex:1;width:100%;max-width:1040px;margin:0 auto;outline:none}
.card{background:#fff;border-radius:20px;padding:28px 20px;box-shadow:0 4px 18px rgba(18,48,79,.07);max-width:560px;margin:12px auto 0;text-align:center}
.note{font-size:.95rem;color:#5d7186;margin:16px 0 0}
.req{color:#a3341f}

.btn{display:inline-block;background:#1f6fbf;color:#fff;border:0;cursor:pointer;font:inherit;font-weight:600;font-size:1.05rem;text-decoration:none;padding:13px 26px;border-radius:999px;min-height:44px}
.btn:hover{background:#1a5ea3}
.btn:disabled{opacity:.6;cursor:not-allowed}
.btn.ghost{background:#fff;color:#1f5f9e;box-shadow:inset 0 0 0 2px #1f6fbf}
.btn.ghost:hover{background:#e3eefa}
.btn.small{font-size:.95rem;padding:9px 18px;min-height:40px}
.btn.danger{background:#fff;color:#a3341f;box-shadow:inset 0 0 0 2px #a3341f}
.btn.danger:hover{background:#fbeceb}
.btn-row{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:20px}
#signOut{flex:none}

.stack{display:grid;gap:14px;text-align:left;margin:0 auto 8px;max-width:420px}
.stack .btn{justify-self:center}
.field label{display:block;font-weight:600;font-size:1rem;margin-bottom:6px;color:#12304f}
.field input,.composer textarea{width:100%;font:inherit;font-size:1rem;color:#12304f;background:#fff;border:1px solid #7b97b5;border-radius:10px;padding:12px 14px}
.field input:focus-visible,.composer textarea:focus-visible{outline:3px solid #1f5f9e;outline-offset:1px;border-color:#1f5f9e}
.status{font-size:.95rem;margin:0;min-height:1.4em;text-align:center;color:#3a5470}
.status.err{color:#a3341f}
.status.ok{color:#0f6b40}

/* Chat app */
.app{display:flex;flex-direction:column;gap:10px;margin-top:4px}
.tabs{position:relative;display:flex;gap:8px;overflow-x:auto;padding:4px 2px 8px;scrollbar-width:thin}
.tab{position:relative;flex:none;font:inherit;font-weight:600;font-size:.95rem;color:#1f5f9e;background:#e3eefa;border:0;border-radius:999px;padding:9px 16px;cursor:pointer;min-height:40px;white-space:nowrap}
.tab:hover{background:#d3e4f6}
.tab[aria-current="page"]{background:#1f6fbf;color:#fff}
.tab.admin-tab{background:#fff;box-shadow:inset 0 0 0 2px #1f6fbf}
.tab.admin-tab[aria-current="page"]{background:#12304f;color:#fff;box-shadow:none}
.tab .badge{display:inline-block;margin-left:6px;background:#c8102e;color:#fff;border-radius:999px;font-size:.75rem;padding:2px 7px}

.panel{background:#fff;border-radius:20px;box-shadow:0 4px 18px rgba(18,48,79,.07);display:flex;flex-direction:column;min-height:0}
.panel-head{padding:16px 16px 10px;border-bottom:1px solid #e3eaf2;text-align:left}
.panel-head h2{margin-bottom:2px}
.channel-desc{font-size:.95rem;margin:0;color:#5d7186}
.log-wrap{display:flex;flex-direction:column;align-items:center;padding-top:8px}
.log{width:100%;height:calc(100vh - 360px);min-height:260px;max-height:640px;overflow-y:auto;padding:4px 12px 8px;text-align:left}
.messages{list-style:none;padding:0}
.msg{padding:10px 4px;border-bottom:1px solid #eef3f8;display:grid;grid-template-columns:1fr auto;gap:2px 8px;align-items:start}
.msg:last-child{border-bottom:0}
.msg-meta{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline}
.msg-author{font-weight:700;color:#12304f;font-size:.98rem}
.msg-time{font-size:.82rem;color:#5d7186}
.msg-body{grid-column:1/-1;font-size:1rem;line-height:1.45;color:#12304f;margin:2px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.msg.mine .msg-author::after{content:" (You)";font-weight:500;color:#5d7186}
.msg-del{font:inherit;font-size:.85rem;color:#a3341f;background:none;border:0;padding:6px 8px;border-radius:8px;cursor:pointer;min-height:32px}
.msg-del:hover{background:#fbeceb}
.empty{text-align:center;color:#5d7186;margin:40px 0}

.composer{border-top:1px solid #e3eaf2;padding:12px;display:grid;gap:8px;position:sticky;bottom:0;background:#fff;border-radius:0 0 20px 20px}
.composer textarea{resize:vertical;min-height:52px;max-height:200px}
.composer-row{display:flex;align-items:center;gap:10px}
.composer-row .hint{flex:1;font-size:.82rem;color:#5d7186}
.composer-row .count{font-size:.82rem;color:#5d7186;white-space:nowrap}
.composer-row .count.over{color:#a3341f;font-weight:700}
.composer .status{text-align:left}

.members{list-style:none;padding:8px 12px 12px;text-align:left}
.member{display:grid;grid-template-columns:1fr;gap:6px;padding:12px 4px;border-bottom:1px solid #eef3f8}
.member:last-child{border-bottom:0}
.member-name{font-weight:700}
.member-sub{font-size:.9rem;color:#3a5470;overflow-wrap:anywhere}
.pill{display:inline-block;font-size:.78rem;font-weight:700;border-radius:999px;padding:3px 9px;margin-left:6px;vertical-align:middle}
.pill.pending{background:#fff4e6;color:#8a4a0f}
.pill.approved{background:#e3f5ec;color:#0f6b40}
.pill.blocked{background:#fbeceb;color:#a3341f}
.pill.admin{background:#12304f;color:#fff}
.member-actions{display:flex;gap:8px;flex-wrap:wrap}

footer{padding:28px 0 36px;font-size:.85rem;color:#5d7186;text-align:center}

@media (min-width:760px){
  body{padding:0 20px}
  .chat-top{padding:24px 0 16px;gap:16px}
  .logo-link img{width:72px;height:72px}
  .card{padding:40px 32px;margin-top:24px}
  .app{display:grid;grid-template-columns:220px 1fr;align-items:start;gap:16px}
  .tabs{flex-direction:column;overflow:visible;padding:0;position:sticky;top:16px}
  .tab{text-align:left;width:100%}
  .log{height:calc(100vh - 380px)}
  .member{grid-template-columns:1fr auto;align-items:center}
}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
h2[tabindex="-1"]:focus{outline:none}
