/* Auto Town — estilos de la versión 3 */

/* chat */
#chat-fab { position: absolute; right: 12px; bottom: 12px; width: 60px; height: 60px; border-radius: 50%; border: 4px solid #fff; z-index: 3;
  background: linear-gradient(#b08af0, #6a35b8); font-size: 28px; box-shadow: 0 5px 0 rgba(0,0,0,.25); }
#chat-fab:active { transform: translateY(3px); }
#chat-drawer { position: absolute; right: 12px; bottom: 84px; width: 360px; max-width: calc(100% - 24px); height: min(520px, calc(100% - 100px)); z-index: 6;
  background: #fff; border-radius: 20px; border: 4px solid #fff; box-shadow: 0 8px 0 var(--purple), 0 16px 40px rgba(0,0,0,.3);
  display: none; flex-direction: column; overflow: hidden; }
#chat-drawer.open { display: flex; animation: pop .2s; }
.chat-head { background: linear-gradient(#b08af0, #7a45cf); color: #fff; padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.chat-head b { font-size: 18px; }
.chat-online { flex: 1; opacity: .9; }
.chat-x { border: 0; background: rgba(255,255,255,.25); color: #fff; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; }
.chat-tabs { display: flex; gap: 4px; padding: 6px; background: var(--panel2); flex-wrap: wrap; }
.ct { border: 0; border-radius: 10px; padding: 5px 9px; font-weight: 700; font-size: 13px; background: #fff; color: var(--blue-d); position: relative; }
.ct.on { background: var(--purple); color: #fff; }
.ct-n { background: var(--red); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; margin-left: 4px; }
.chat-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; user-select: text; }
.chat-sub { text-align: center; font-size: 12px; color: var(--muted); }
.cm { display: flex; gap: 6px; align-items: flex-end; }
.cm .avatar { width: 30px; height: 30px; font-size: 14px; border-width: 2px; cursor: pointer; }
.cm-bubble { background: var(--panel2); border-radius: 14px 14px 14px 4px; padding: 6px 10px; max-width: 78%; word-break: break-word; }
.cm.mine { justify-content: flex-end; }
.cm.mine .cm-bubble { background: #e8dcff; border-radius: 14px 14px 4px 14px; }
.cm-name { font-weight: 700; font-size: 12px; color: var(--blue-d); }
.cm-tag { display: inline-block; background: var(--navy); color: #ffd23a; font-size: 10px; font-weight: 700; border-radius: 5px; padding: 0 4px; margin-left: 4px; vertical-align: middle; }
.cm-tag.light { background: rgba(255,255,255,.25); color: #fff; font-size: 13px; }
.cm-text { font-size: 14px; }
.cm-time { font-size: 10px; color: var(--muted); text-align: right; }
.cm-del { border: 0; background: none; font-size: 10px; margin-left: 4px; opacity: .6; }
.chat-input { display: flex; gap: 6px; padding: 8px; border-top: 2px solid var(--panel2); }
.chat-input .inp { flex: 1; padding: 8px 10px; font-size: 14px; }
body.editing #chat-fab, body.editing #chat-drawer { display: none !important; }

/* clubes */
.club-badge { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; border: 3px solid #fff; box-shadow: 0 3px 0 rgba(0,0,0,.2); flex: none; }
.club-badge.big { width: 72px; height: 72px; font-size: 40px; border-radius: 18px; background: rgba(255,255,255,.2); }
.club-head { color: #fff; border-radius: 18px; padding: 14px; display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.club-head .car-name { color: #fff; }
.club-form { display: flex; flex-direction: column; gap: 8px; }
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: #2ecc71; display: inline-block; box-shadow: 0 0 6px #2ecc71; }
.spinner.dark { border-color: rgba(42,127,212,.25); border-top-color: var(--blue); margin: 10px auto; }

/* selector de ciudades */
.town-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.town-card { border-radius: 18px; padding: 12px; color: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 170px; box-shadow: 0 5px 0 rgba(0,0,0,.2); transition: transform .1s; }
.town-card:hover { transform: translateY(-3px); }
.town-card.locked { filter: grayscale(.8); opacity: .7; }
.town-card b { font-size: 18px; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.town-card small { opacity: .95; }
.tc-ico { font-size: 40px; }
.tc-foot { margin-top: auto; background: rgba(0,0,0,.25); border-radius: 10px; padding: 3px 8px; font-weight: 700; font-size: 13px; align-self: flex-start; }
.town-card.th-city { background: linear-gradient(135deg, #5fb84f, #2a7fd4); }
.town-card.th-beach { background: linear-gradient(135deg, #f2c55c, #2fb5c8); }
.town-card.th-snow { background: linear-gradient(135deg, #9fc3dd, #5d7fa0); }
.town-card.th-neon { background: linear-gradient(135deg, #ff3df2, #1d2230 70%); }
.town-screen.th-neon .town-title, .town-screen.th-neon .town-hint { background: #2a1f3a; color: #fff; }

@media (max-width: 760px) {
  #chat-fab { width: 50px; height: 50px; font-size: 22px; bottom: 60px; }
  #chat-drawer { bottom: 120px; height: calc(100% - 140px); }
}
