/* ═══════════════════════════════════════════════════════════════════════
   Amenities Walk — Phase 2 Additions (Editor + Eval)
   Replaces amenities.css entirely
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Header ───────────────────────────────────────────────────────── */
.am-header { text-align:center; margin-bottom:1.5rem; padding:1.5rem; background:linear-gradient(135deg,var(--bg2,#1a1d23),var(--bg3,#22262e)); border-radius:12px; border:1px solid var(--bdr,#2a2e36); }
.am-header h2 { font-size:1.6rem; font-weight:300; letter-spacing:1px; color:var(--tx,#e0e8f0); margin:0; }
.am-header p { font-size:0.85rem; color:var(--txd,#6b7a8d); margin-top:0.3rem; }

/* ─── KW Selector ──────────────────────────────────────────────────── */
.am-kw-sel { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 16px; margin-bottom:1.2rem; background:var(--bg2,#1a1d23); border-radius:10px; border-left:4px solid var(--accent,#ff9900); font-size:0.85rem; }
.am-kw-sel label { font-weight:700; color:var(--txd,#8899aa); }
.am-kw-sel select { padding:6px 10px; border:2px solid var(--bdr,#3a4a5a); border-radius:6px; background:var(--bg1,#131a22); color:var(--tx,#fff); font-weight:600; font-size:0.85rem; }
.am-kw-sel select:focus { border-color:var(--accent,#ff9900); outline:none; }
.am-kw-info { margin-left:auto; color:var(--txd,#6b7a8d); font-size:0.8rem; }

/* ─── Route Cards ──────────────────────────────────────────────────── */
.am-routes { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:1.5rem; }
.am-route-card { padding:1.2rem; border-radius:12px; text-align:center; border:3px solid var(--bdr,#2a3a4a); cursor:pointer; transition:all 0.2s; background:rgba(255,255,255,0.02); }
.am-route-card:hover { border-color:var(--accent,#ff9900); transform:translateY(-3px); box-shadow:0 4px 16px rgba(255,153,0,0.15); }
.am-route-icon { font-size:2rem; margin-bottom:0.5rem; }
.am-route-name { font-size:1.2rem; font-weight:900; color:var(--tx,#fff); }
.am-route-desc { font-size:0.75rem; color:var(--txd,#8899aa); margin-top:0.2rem; }

/* ─── Stats ────────────────────────────────────────────────────────── */
.am-stats { display:flex; gap:16px; justify-content:center; flex-wrap:wrap; padding:1rem; background:var(--bg2,#1a1d23); border-radius:10px; border:1px solid var(--bdr,#2a2e36); }
.am-stat { text-align:center; min-width:80px; }
.am-stat-val { font-size:1.6rem; font-weight:900; display:block; }
.am-stat-lbl { font-size:0.7rem; color:var(--txd,#8899aa); text-transform:uppercase; }
.am-empty { text-align:center; color:var(--txd,#6b7a8d); padding:1rem; }

/* ─── Back + Action Buttons ────────────────────────────────────────── */
.am-back { background:transparent; border:2px solid var(--accent,#ff9900); color:var(--accent,#ff9900); padding:8px 16px; border-radius:8px; cursor:pointer; font-weight:700; margin-bottom:1rem; font-size:0.85rem; }
.am-back:hover { background:var(--accent,#ff9900); color:#131a22; }
.am-action-bar { display:flex; gap:10px; margin-bottom:1rem; flex-wrap:wrap; }
.am-action-btn { padding:10px 18px; border-radius:8px; border:2px solid; cursor:pointer; font-weight:700; font-size:0.85rem; transition:all 0.2s; background:transparent; }
.am-action-btn:hover { transform:translateY(-2px); }
.am-btn-eval { border-color:#e74c3c; color:#e74c3c; }
.am-btn-eval:hover { background:#e74c3c; color:#fff; }
.am-btn-edit { border-color:#9b59b6; color:#9b59b6; }
.am-btn-edit:hover { background:#9b59b6; color:#fff; }

/* ─── Walk ─────────────────────────────────────────────────────────── */
.am-walk-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:1rem; padding:12px 16px; background:var(--bg2,#1a1d23); border-radius:10px; border:1px solid var(--bdr,#2a2e36); }
.am-walk-header h3 { font-size:1.1rem; color:var(--tx,#fff); margin:0; }
.am-walk-kw { font-size:0.8rem; color:var(--txd,#8899aa); font-weight:700; }
.am-path-floor { background:linear-gradient(135deg,#232f3e,#3a4a5c); padding:8px 14px; border-radius:6px; margin:14px 0 8px; font-weight:700; font-size:0.85rem; color:var(--tx,#fff); border:1px solid var(--bdr,#3a4a5a); }
.am-path-stair { background:linear-gradient(135deg,var(--accent,#ff9900),#e68900); padding:8px 14px; border-radius:6px; margin:14px 0 8px; font-weight:700; font-size:0.85rem; color:#fff; text-align:center; }
.am-path-node { border:2px solid var(--bdr,#2a3a4a); border-radius:10px; margin-bottom:6px; overflow:hidden; transition:border-color 0.2s; background:rgba(255,255,255,0.02); }
.am-path-node.expanded { border-color:var(--accent,#ff9900); }
.am-path-node.am-all-rated { border-color:#27ae60; }
.am-path-node-hd { display:flex; align-items:center; gap:10px; padding:10px 14px; cursor:pointer; transition:background 0.15s; }
.am-path-node-hd:hover { background:rgba(255,153,0,0.05); }
.am-path-num { width:30px; height:30px; border-radius:50%; background:var(--accent,#ff9900); color:#131a22; display:flex; align-items:center; justify-content:center; font-weight:900; font-size:0.8rem; flex-shrink:0; }
.am-path-num.done { background:#27ae60; }
.am-path-name { flex:1; font-size:0.9rem; font-weight:600; color:var(--tx,#fff); }
.am-path-progress { font-size:0.75rem; color:var(--txd,#8899aa); }
.am-path-arrow { font-size:1.2rem; color:var(--txd,#8899aa); transition:transform 0.2s; }
.am-path-node.expanded .am-path-arrow { transform:rotate(90deg); color:var(--accent,#ff9900); }
.am-path-subs { padding:0 14px 10px 54px; background:rgba(0,0,0,0.1); }
.am-sub { display:flex; align-items:center; gap:10px; padding:8px 12px; border-radius:6px; cursor:pointer; margin-bottom:3px; border:1px solid transparent; transition:all 0.15s; }
.am-sub:hover { background:rgba(255,153,0,0.08); border-color:rgba(255,153,0,0.3); }
.am-sub.rated { background:rgba(46,204,113,0.08); border-color:rgba(46,204,113,0.3); }
.am-sub-dot { width:8px; height:8px; border-radius:50%; background:var(--bdr,#3a4a5a); flex-shrink:0; }
.am-sub.rated .am-sub-dot { background:#27ae60; }
.am-sub-name { flex:1; font-size:0.8rem; font-weight:600; color:var(--txd,#cdd5dc); }
.am-sub-stars { color:#ffd700; font-size:0.8rem; }

/* ─── Rating ───────────────────────────────────────────────────────── */
.am-rate-container { background:linear-gradient(135deg,var(--bg2,#1a1d23),var(--bg3,#22262e)); border-radius:12px; padding:1.5rem; border:1px solid var(--bdr,#2a2e36); max-width:600px; margin:0 auto; }
.am-rate-header { text-align:center; margin-bottom:1rem; padding-bottom:1rem; border-bottom:2px solid var(--bdr,#2a2e36); }
.am-rate-header h3 { font-size:1.2rem; color:var(--tx,#fff); margin:0; }
.am-rate-header p { font-size:0.8rem; color:var(--txd,#8899aa); margin-top:0.3rem; }
.am-prev-rating { background:rgba(46,204,113,0.1); border:2px solid rgba(46,204,113,0.3); border-radius:8px; padding:10px 14px; margin-bottom:1rem; font-size:0.85rem; }
.am-prev-rating b { color:#27ae60; }
.am-prev-comment { color:var(--txd,#8899aa); font-size:0.8rem; }
.am-ref-section { margin-bottom:1rem; padding:12px; background:rgba(46,204,113,0.05); border:1px solid rgba(46,204,113,0.2); border-radius:8px; }
.am-ref-section h4 { font-size:0.85rem; color:#27ae60; margin:0 0 8px; }
.am-ref-photos { display:flex; gap:8px; flex-wrap:wrap; }
.am-ref-thumb { width:80px; height:64px; border-radius:6px; overflow:hidden; border:2px solid rgba(46,204,113,0.4); }
.am-ref-thumb img { width:100%; height:100%; object-fit:cover; }
.am-photo-section { margin-bottom:1.2rem; }
.am-photo-section h4 { font-size:0.9rem; font-weight:700; color:var(--tx,#fff); margin-bottom:0.5rem; }
.am-photo-add { background:none; border:2px dashed var(--accent,#ff9900); color:var(--accent,#ff9900); padding:8px 14px; border-radius:6px; cursor:pointer; font-weight:700; font-size:0.8rem; }
.am-eval-photos { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:0.5rem; }
.am-rate-section { text-align:center; padding:1rem; background:rgba(0,0,0,0.15); border-radius:10px; }
.am-rate-section h4 { font-size:1rem; color:var(--tx,#fff); margin-bottom:0.8rem; }
.am-stars { display:flex; justify-content:center; gap:8px; margin-bottom:1rem; }
.am-star { font-size:2.2rem; cursor:pointer; color:var(--bdr,#3a4a5a); user-select:none; transition:transform 0.15s; }
.am-star.on { color:#ffd700; }
.am-star:hover { transform:scale(1.15); }
.am-comment { text-align:left; margin-bottom:1rem; }
.am-comment label { display:block; font-weight:700; font-size:0.8rem; color:var(--txd,#cdd5dc); margin-bottom:0.3rem; }
.am-comment textarea { width:100%; min-height:60px; padding:8px 10px; border:2px solid var(--bdr,#3a4a5a); border-radius:6px; background:var(--bg1,#131a22); color:var(--tx,#fff); font-family:inherit; font-size:0.85rem; resize:vertical; }
.am-comment textarea:focus { border-color:var(--accent,#ff9900); outline:none; }
.am-save-btn { background:linear-gradient(135deg,#2ecc71,#27ae60); color:white; border:none; padding:12px 24px; border-radius:8px; cursor:pointer; font-weight:700; font-size:1rem; width:100%; margin-top:12px; }
.am-save-btn:hover { transform:translateY(-2px); box-shadow:0 4px 12px rgba(46,204,113,0.4); }
.am-empty-state { text-align:center; padding:2rem; color:var(--txd,#6b7a8d); }
.am-empty-state h3 { color:var(--tx,#fff); margin-bottom:0.5rem; }

/* ─── Evaluation (Phase 2) ─────────────────────────────────────────── */
.am-eval-card { background:linear-gradient(135deg,var(--bg2,#1a1d23),var(--bg3,#22262e)); border-radius:12px; padding:1.5rem; border:1px solid var(--bdr,#2a2e36); }
.am-eval-header { text-align:center; margin-bottom:1.5rem; padding-bottom:1rem; border-bottom:2px solid var(--bdr,#2a2e36); }
.am-eval-header h2 { font-size:1.3rem; color:var(--tx,#fff); margin:0; }
.am-eval-header p { font-size:0.8rem; color:var(--txd,#8899aa); margin-top:0.3rem; }
.am-eval-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:1.5rem; }
.am-eval-sum { padding:14px; border-radius:10px; text-align:center; }
.am-eval-sum.critical { background:rgba(231,76,60,0.1); border:2px solid rgba(231,76,60,0.4); }
.am-eval-sum.warning { background:rgba(243,156,18,0.1); border:2px solid rgba(243,156,18,0.4); }
.am-eval-sum.good { background:rgba(46,204,113,0.1); border:2px solid rgba(46,204,113,0.4); }
.am-eval-sum-val { font-size:1.8rem; font-weight:900; display:block; }
.am-eval-sum.critical .am-eval-sum-val { color:#e74c3c; }
.am-eval-sum.warning .am-eval-sum-val { color:#f39c12; }
.am-eval-sum.good .am-eval-sum-val { color:#27ae60; }
.am-eval-sum-lbl { font-size:0.7rem; color:var(--txd,#8899aa); }
.am-eval-section-title { font-size:1rem; font-weight:800; padding:10px 14px; border-radius:8px; margin:1rem 0 0.5rem; border-left:4px solid; }
.am-eval-section-title.critical { color:#e74c3c; background:rgba(231,76,60,0.08); border-color:#e74c3c; }
.am-eval-section-title.warning { color:#f39c12; background:rgba(243,156,18,0.08); border-color:#f39c12; }
.am-eval-issue { background:rgba(255,255,255,0.03); border:2px solid var(--bdr,#2a3a4a); border-radius:10px; padding:12px 16px; margin-bottom:8px; }
.am-eval-issue.critical { border-color:rgba(231,76,60,0.3); }
.am-eval-issue.warning { border-color:rgba(243,156,18,0.3); }
.am-eval-issue-top { display:flex; align-items:center; gap:10px; }
.am-eval-stars { font-size:0.85rem; }
.am-eval-issue.critical .am-eval-stars { color:#e74c3c; }
.am-eval-issue.warning .am-eval-stars { color:#f39c12; }
.am-eval-issue-name { font-size:0.9rem; font-weight:700; color:var(--tx,#fff); }
.am-eval-comment { background:rgba(0,0,0,0.2); border-left:3px solid var(--bdr,#3a4a5a); padding:8px 12px; border-radius:0 6px 6px 0; margin-top:8px; font-size:0.8rem; color:var(--txd,#cdd5dc); display:flex; gap:8px; }
.am-eval-comment-label { color:var(--accent,#ff9900); }
.am-eval-good-toggle { font-size:0.85rem; font-weight:700; color:#27ae60; cursor:pointer; margin-top:1rem; padding:8px; }
.am-eval-good-list { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.am-eval-good-chip { background:rgba(46,204,113,0.1); border:1px solid rgba(46,204,113,0.3); padding:4px 10px; border-radius:16px; font-size:0.75rem; color:#27ae60; font-weight:600; }

/* ─── Editor (Phase 2) ─────────────────────────────────────────────── */
.am-editor-card { background:linear-gradient(135deg,var(--bg2,#1a1d23),var(--bg3,#22262e)); border-radius:12px; padding:1.5rem; border:1px solid var(--bdr,#2a2e36); }
.am-editor-card h3 { color:var(--tx,#fff); margin:0 0 1rem; }
.am-editor-notice { color:var(--txd,#8899aa); font-size:0.85rem; margin-bottom:1rem; }
.am-editor-pw { display:flex; gap:10px; align-items:center; }
.am-editor-pw input { flex:1; padding:10px 14px; border:2px solid var(--bdr,#3a4a5a); border-radius:8px; background:var(--bg1,#131a22); color:var(--tx,#fff); font-size:0.9rem; }
.am-editor-pw input:focus { border-color:var(--accent,#ff9900); outline:none; }
.am-ed-section { margin-bottom:16px; padding:14px; background:rgba(0,0,0,0.15); border-radius:10px; border:1px solid var(--bdr,#2a2e36); }
.am-ed-section-hd { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.am-ed-section-title { border:none; background:transparent; font-weight:700; font-size:1rem; color:var(--tx,#fff); flex:1; outline:none; padding:4px 8px; border-bottom:2px solid transparent; }
.am-ed-section-title:focus { border-bottom-color:var(--accent,#ff9900); }
.am-ed-stair-label { font-size:0.75rem; color:var(--txd,#8899aa); display:flex; align-items:center; gap:4px; cursor:pointer; }
.am-ed-item { display:flex; align-items:center; gap:8px; margin-bottom:6px; padding:8px 10px; background:rgba(255,255,255,0.02); border-radius:6px; border:1px solid var(--bdr,#2a2e36); }
.am-ed-icon { width:36px; text-align:center; border:none; background:transparent; color:var(--accent,#ff9900); font-size:1.1rem; outline:none; }
.am-ed-name { flex:1; border:none; background:transparent; color:var(--tx,#fff); font-weight:600; font-size:0.85rem; outline:none; padding:4px; }
.am-ed-name:focus { border-bottom:1px solid var(--accent,#ff9900); }
.am-ed-subs { flex:2; border:none; background:transparent; color:var(--txd,#8899aa); font-size:0.8rem; outline:none; padding:4px; }
.am-ed-subs:focus { color:var(--tx,#fff); }
.am-ed-del-btn { background:#e74c3c; color:white; border:none; border-radius:50%; width:24px; height:24px; cursor:pointer; font-weight:900; font-size:0.8rem; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.am-ed-del-btn:hover { background:#c0392b; }
.am-ed-ref-btn { background:none; border:2px solid #27ae60; color:#27ae60; border-radius:50%; width:24px; height:24px; cursor:pointer; font-size:0.7rem; flex-shrink:0; display:flex; align-items:center; justify-content:center; transition:all 0.2s; }
.am-ed-ref-btn:hover { background:#27ae60; color:#fff; }
.am-ed-ref-row { display:flex; gap:6px; flex-wrap:wrap; padding:4px 10px 8px 44px; }
.am-ed-ref-thumb { width:56px; height:44px; border-radius:4px; overflow:hidden; position:relative; border:2px solid rgba(46,204,113,0.4); }
.am-ed-ref-thumb img { width:100%; height:100%; object-fit:cover; }
.am-ed-ref-del { position:absolute; top:1px; right:1px; background:#e74c3c; color:white; border:none; border-radius:50%; width:16px; height:16px; font-size:8px; cursor:pointer; display:none; align-items:center; justify-content:center; }
.am-ed-ref-thumb:hover .am-ed-ref-del { display:flex; }
.am-ed-add-item { background:var(--accent,#ff9900); color:#131a22; border:none; padding:6px 14px; border-radius:6px; cursor:pointer; font-weight:700; font-size:0.8rem; margin-top:8px; }
.am-ed-add-section { background:#3498db; color:white; border:none; padding:10px 18px; border-radius:8px; cursor:pointer; font-weight:700; font-size:0.85rem; margin:12px 0; display:block; }

/* ─── Participants ─────────────────────────────────────────────────── */
.am-participants { margin-bottom:1rem; }
.am-part-card { background:linear-gradient(135deg,var(--bg2,#1a1d23),var(--bg3,#22262e)); border-radius:12px; padding:1.2rem; border:1px solid var(--bdr,#2a2e36); }
.am-part-card h4 { color:var(--tx,#fff); margin:0 0 0.8rem; font-size:1rem; }
.am-part-roles { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:1rem; }
.am-part-chip { padding:8px 16px; border-radius:8px; border:2px solid var(--bdr,#3a4a5a); cursor:pointer; font-weight:700; font-size:0.85rem; color:var(--txd,#8899aa); transition:all 0.2s; user-select:none; }
.am-part-chip:hover { border-color:var(--accent,#ff9900); color:var(--accent,#ff9900); }
.am-part-chip.selected { background:var(--accent,#ff9900); border-color:var(--accent,#ff9900); color:#131a22; }
.am-part-others { margin-bottom:0.8rem; }
.am-part-other { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.am-part-other input { flex:1; padding:8px 12px; border:2px solid var(--bdr,#3a4a5a); border-radius:6px; background:var(--bg1,#131a22); color:var(--tx,#fff); font-size:0.85rem; }
.am-part-other input:focus { border-color:var(--accent,#ff9900); outline:none; }
.am-part-other-del { background:#e74c3c; color:white; border:none; border-radius:50%; width:24px; height:24px; cursor:pointer; font-weight:900; }
.am-part-add { background:none; border:2px dashed var(--accent,#ff9900); color:var(--accent,#ff9900); padding:6px 14px; border-radius:6px; cursor:pointer; font-weight:700; font-size:0.8rem; margin-bottom:0.8rem; display:block; }
.am-part-save { margin-top:0.5rem; }
.am-btn-audit { border-color:var(--accent,#ff9900); color:var(--accent,#ff9900); }
.am-btn-audit:hover { background:var(--accent,#ff9900); color:#131a22; }

/* ─── Per-Checkpoint Trends ────────────────────────────────────────── */
.am-trends-section { margin-top:1.5rem; }
.am-trends-toggle { background:none; border:2px solid var(--bdr,#2a3a4a); color:var(--tx,#fff); padding:10px 16px; border-radius:8px; cursor:pointer; font-weight:700; font-size:0.85rem; width:100%; text-align:left; transition:all 0.2s; }
.am-trends-toggle:hover { border-color:var(--accent,#ff9900); color:var(--accent,#ff9900); }
.am-trends-body { margin-top:0.8rem; }
.am-trend-section { margin-bottom:1rem; }
.am-trend-section-title { font-size:0.8rem; font-weight:700; color:var(--txd,#8899aa); text-transform:uppercase; padding:4px 0; border-bottom:1px solid var(--bdr,#2a2e36); margin-bottom:6px; }
.am-trend-item { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:6px; background:rgba(255,255,255,0.02); margin-bottom:3px; border:1px solid var(--bdr,#2a2e36); }
.am-trend-item-label { flex:1; font-size:0.8rem; font-weight:600; color:var(--txd,#cdd5dc); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.am-trend-item-spark { flex-shrink:0; }
.am-trend-item-spark svg { display:block; }
.am-trend-item-val { flex-shrink:0; font-size:0.8rem; font-weight:800; min-width:50px; text-align:right; }

/* ─── Trend Chart ──────────────────────────────────────────────────── */
.am-trend { margin-top:1rem; padding:1rem; background:var(--bg2,#1a1d23); border-radius:10px; border:1px solid var(--bdr,#2a2e36); }
.am-trend svg { display:block; }

/* ─── Lightbox ─────────────────────────────────────────────────────── */
.am-lightbox { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.92); z-index:99999; align-items:center; justify-content:center; cursor:pointer; backdrop-filter:blur(6px); }
.am-lightbox img { max-width:90vw; max-height:90vh; border-radius:10px; box-shadow:0 20px 60px rgba(0,0,0,0.8); object-fit:contain; }
.am-lightbox-close { position:fixed; top:16px; right:16px; background:#e74c3c; color:white; border:none; width:40px; height:40px; border-radius:50%; font-size:1.2rem; cursor:pointer; font-weight:900; z-index:100000; display:flex; align-items:center; justify-content:center; }
.am-lightbox-close:hover { background:#c0392b; }

/* ─── Responsive ───────────────────────────────────────────────────── */
@media (max-width:600px) {
  .am-routes { grid-template-columns:1fr; }
  .am-rate-container { padding:1rem; }
  .am-path-subs { padding-left:40px; }
  .am-eval-summary { grid-template-columns:1fr; }
  .am-ed-item { flex-wrap:wrap; }
  .am-ed-subs { flex:1 1 100%; margin-top:4px; }
}
