/* ═══════════════════════════════════════════
   MAP.CSS — seat map and selection styles
═══════════════════════════════════════════ */

/* SEAT MAP */
#sw-wrap{position:relative;background:var(--bg2);border-radius:var(--r2);overflow:hidden;
  border:1px solid var(--bdr);width:100%;max-width:920px}
#sw-wrap svg{display:block;width:100%;height:auto;background:#0E0C08}

/* Seat states */
#sw-wrap g circle{transition:fill .15s,stroke .15s,filter .15s,transform .15s;transform-origin:center;transform-box:fill-box}

/* Livre — dourado suave, convidativo */
#sw-wrap g.s-free circle{fill:#C8A96A;stroke:#A8893E;stroke-width:1.5px}
#sw-wrap g.s-free text{fill:#1a1a1a;font-weight:700}

/* Livre hover — ouro brilhante com glow */
#sw-wrap g.s-free:hover circle{fill:#E0C47A;stroke:#C8A96A;filter:drop-shadow(0 0 8px rgba(200,169,106,0.6));transform:scale(1.15)}
#sw-wrap g.s-free:hover text{fill:#1a1a1a}

/* Selecionado — ouro intenso com glow forte */
#sw-wrap g.s-sel circle{fill:#E8C55A;stroke:#F0D87A;stroke-width:2px;filter:drop-shadow(0 0 10px rgba(232,197,90,0.6));transform:scale(1.12)}
#sw-wrap g.s-sel text{fill:#1a1a1a}

/* Meu (reservado por mim) — verde suave, distinto */
#sw-wrap g.s-mine circle{fill:#5A7A4A;stroke:#7A9A6A;stroke-width:1.5px}
#sw-wrap g.s-mine text{fill:#E0F0E0}

/* Ocupado por outro — desaparece no fundo */
#sw-wrap g.s-taken circle{fill:#2A2520;stroke:#3A3530;stroke-width:1px;cursor:not-allowed}
#sw-wrap g.s-taken text{fill:#5A5548}

/* Lock de outro (em seleção) — similar a taken */
#sw-wrap g.s-lock circle{fill:#2A2520;stroke:#3A3530;stroke-width:1px;cursor:not-allowed}
#sw-wrap g.s-lock text{fill:#5A5548}

/* Hold da direção — cinza com borda dourada */
#sw-wrap g.s-held circle{fill:#2A2520;stroke:#C8A96A;stroke-width:2px;cursor:not-allowed}
#sw-wrap g.s-held text{fill:#5A5548}

/* PCD — borda azul grossa sobre fundo livre */
#sw-wrap g.s-pcd circle{stroke:#5A85AA;stroke-width:2.5px}
#sw-wrap g.s-pcd.s-free circle{fill:#4A7A9A;stroke:#6A9ABA;stroke-width:2.5px}
#sw-wrap g.s-pcd.s-free text{fill:#fff}
#sw-wrap g.s-pcd.s-free:hover circle{fill:#6A9ABA;stroke:#8ABADB;filter:drop-shadow(0 0 8px rgba(90,133,170,0.5))}
#sw-wrap g.s-pcd.s-taken circle{fill:#2A2520;stroke:#4A6A8A;stroke-width:2px;cursor:not-allowed}
#sw-wrap g.s-pcd.s-mine circle{fill:#5A7A4A;stroke:#5A85AA;stroke-width:2.5px}

/* Duplo — manter scaleX, cores seguem estado */
#sw-wrap g.s-duplo circle{transform-box:fill-box;transform-origin:center;transform:scaleX(1.75);stroke-width:1.2px}
#sw-wrap g.s-duplo text{transform-box:fill-box;transform-origin:center;transform:scaleX(0.6);font-size:7px}

/* Texto padrão dos assentos */
#sw-wrap g text{pointer-events:none;fill:#E8E4D8;font-family:var(--fm);font-size:9px;
  text-anchor:middle;dominant-baseline:middle;user-select:none;font-weight:600}

/* Sell map — sem hover animado (admin tool, sem flicker) */
#sell-seat-grid g circle{transition:fill .1s,stroke .1s}
#sell-seat-grid g.s-free circle{fill:#C8A96A;stroke:#A8893E;cursor:pointer}
#sell-seat-grid g.s-free:hover circle{fill:#E0C47A;stroke:#C8A96A}
#sell-seat-grid g.s-mine circle{fill:#5A7A4A;stroke:#7A9A6A;cursor:pointer}
#sell-seat-grid g.s-mine:hover circle{fill:#6A8A5A;stroke:#8AAA7A}
#sell-seat-grid g.s-taken circle{fill:#2A2520;stroke:#3A3530;cursor:not-allowed}
#sell-seat-grid g.s-held circle{fill:#2A2520;stroke:#C8A96A;cursor:pointer}
#sell-seat-grid g.s-held:hover circle{fill:#3A3530;stroke:#E0C47A}
#sell-seat-grid g.s-lock circle{fill:#2A2520;stroke:#3A3530;cursor:not-allowed}
#sell-seat-grid g.s-sel circle{fill:#E8C55A;stroke:#F0D87A;cursor:pointer}
#sell-seat-grid g.s-sel:hover circle{fill:#D4B84A;stroke:#E8D06A}
/* PCD — azul quando livre, escuro quando ocupado */
#sell-seat-grid g.s-pcd.s-free circle{fill:#4A7A9A;stroke:#6A9ABA;cursor:pointer}
#sell-seat-grid g.s-pcd.s-taken circle{fill:#2A2520;stroke:#4A6A8A;cursor:not-allowed}
#sell-seat-grid g.s-pcd.s-mine circle{fill:#5A7A4A;stroke:#5A85AA;cursor:pointer}
#sell-seat-grid g.s-pcd.s-held circle{fill:#2A2520;stroke:#5A85AA;cursor:pointer}
#sell-seat-grid g text{pointer-events:none;fill:#E8E4D8;font-family:var(--fm);font-size:9px;
  text-anchor:middle;dominant-baseline:middle;user-select:none;font-weight:600}
#sell-seat-grid g.s-taken text,#sell-seat-grid g.s-lock text{fill:#5A5548}
#sell-seat-grid g.s-held text{fill:#5A5548}


/* DEBUG LOG PANEL */
#dbg-panel{position:fixed;top:10px;left:50%;transform:translateX(-50%);width:90vw;max-width:600px;max-height:300px;background:rgba(0,0,0,.93);border:2px solid #555;border-radius:8px;font-family:monospace;font-size:.78rem;color:#0f0;overflow-y:auto;z-index:99999;padding:.6rem;display:none;box-shadow:0 4px 24px #000}
#dbg-panel .dbg-err{color:#f66}
#dbg-panel .dbg-ok{color:#4f4}
#dbg-panel .dbg-warn{color:#fa0}

/* LOCKED overlay — map grayed when not open */
#map-locked{position:absolute;inset:0;background:#0009;display:none;
  align-items:center;justify-content:center;flex-direction:column;gap:.8rem;
  border-radius:var(--r2)}
#map-locked svg{opacity:.5}
#map-locked p{color:var(--mu);font-size:.82rem;text-align:center}

/* LEGEND */
.legend{display:flex;gap:1rem;flex-wrap:wrap;justify-content:center;padding:.5rem;background:var(--bg2)}
.leg{display:flex;align-items:center;gap:.35rem;font-size:.68rem;color:var(--mu)}
.leg-dot{width:12px;height:12px;border-radius:50%;flex-shrink:0}

/* SIDEBAR */
.side-section{padding:.9rem;border-bottom:1px solid var(--bdr)}
.side-title{font-size:.65rem;color:var(--mu);letter-spacing:.1em;text-transform:uppercase;margin-bottom:.7rem}

/* Selection list */
#sel-list .nsel{font-size:.78rem;color:var(--mu);text-align:center;padding:.5rem 0;font-style:italic}
.sel-item{display:flex;align-items:center;gap:.4rem;background:var(--bg3);
  border-radius:8px;padding:.42rem .55rem;margin-bottom:.3rem;border:1px solid var(--bdr)}
.sel-id{font-family:var(--fm);font-weight:500;font-size:.8rem;color:var(--pk);min-width:32px}
.type-toggle{display:flex;gap:.18rem;flex:1}
.ttog{padding:.22rem .42rem;border-radius:5px;border:1px solid var(--bdr);
  background:transparent;color:var(--mu);font-size:.63rem;cursor:pointer;transition:all .12s;font-family:var(--fs)}
.ttog.on{background:var(--pk);border-color:var(--pk);color:#fff}
.ttog.on-m{background:var(--go);border-color:var(--go);color:#fff}
.ttog.on-c{background:#555;border-color:#555;color:#fff}
.ttog:hover:not(.on):not(.on-m):not(.on-c):not(:disabled){border-color:var(--pkl);color:var(--ft)}
.ttog:disabled{opacity:.3;cursor:not-allowed}
.sel-remove{background:transparent;border:none;color:var(--mu);cursor:pointer;
  font-size:.78rem;padding:.1rem .28rem;border-radius:4px;line-height:1;transition:color .12s}
.sel-remove:hover{color:var(--er)}

/* Lock timer */
#lock-timer{display:none;background:#1A1508;border:1px solid #2A2620;border-radius:8px;
  padding:.5rem .7rem;margin-bottom:.5rem;font-size:.72rem}
.lt-row{display:flex;align-items:center;justify-content:space-between}
.lt-label{color:#C8A96A}
#lock-countdown{font-family:var(--fm);font-weight:500;color:#C8A96A}
.lt-hint{font-size:.63rem;color:var(--mu);margin-top:.25rem}

/* Totals */
#tot-area{font-size:.82rem}
.tot-row{display:flex;justify-content:space-between;margin-bottom:.25rem}
.tot-row.main{font-weight:600;font-size:.92rem;color:var(--ft);border-top:1px solid var(--bdr);padding-top:.4rem;margin-top:.2rem}
.quota-info{font-size:.68rem;color:var(--mu);margin-top:.5rem;padding:.4rem .5rem;
  background:var(--bg3);border-radius:6px;line-height:1.6}

/* My seats */
.my-seat-row{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;
  background:var(--bg3);border-radius:7px;margin-bottom:.3rem;border:1px solid var(--bdr)}
.my-seat-id{font-family:var(--fm);font-size:.78rem;color:var(--pkl);min-width:32px}
.my-seat-type{font-size:.68rem;color:var(--mu)}
.my-seat-paid{font-size:.65rem;padding:.1rem .4rem;border-radius:10px;margin-left:auto}
.paid-y{background:#4a9e6e22;color:var(--gr);border:1px solid var(--gr)}
.paid-n{background:#c44a4a18;color:var(--er);border:1px solid var(--er)}
.my-seat-cancel{background:transparent;border:none;color:var(--mu);cursor:pointer;
  font-size:.75rem;padding:.1rem .25rem;border-radius:4px;transition:color .12s}
.my-seat-cancel:hover{color:var(--er)}
