/* ==========================================================================
   Market Map — theme colors
   Pulled directly from agenticailist.net's palette. Edit these six values
   to retheme the whole widget; nothing else in this file needs to change.
   ========================================================================== */
.amm-wrap{
  --amm-base:      #0A0E17;  /* page background */
  --amm-base-2:    #141925;  /* card/box background */
  --amm-border:    #2c312f;  /* border color */
  --amm-contrast:  #ffffff;  /* primary text */
  --amm-contrast-2:#575760;  /* secondary/muted text */
  --amm-contrast-3:#A0AABF;  /* text inside boxes */
  --amm-accent:    #00E6CC;  /* brand accent (teal) */
  --amm-seg-2:     #6C8CFF;  /* 2nd segment color (size-fit bar / legend) */
  --amm-seg-3:     #FFB020;  /* 3rd segment color */

  font-family:inherit;
  color:var(--amm-contrast);
}

.amm-stats{ display:flex; border:1px solid var(--amm-border); border-radius:10px; overflow:hidden; margin-bottom:16px; background:var(--amm-base-2); }
.amm-stats div{ flex:1; padding:12px 16px; border-right:1px solid var(--amm-border); }
.amm-stats div:last-child{ border-right:none; }
.amm-stats .n{ font-size:20px; font-weight:600; color:var(--amm-contrast); }
.amm-stats .l{ font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--amm-contrast-2); }

.amm-filters{ border:1px solid var(--amm-border); border-radius:10px; padding:12px 14px; margin-bottom:10px; background:var(--amm-base-2); }
.amm-filter-row{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.amm-filter-row + .amm-filter-row{ margin-top:8px; }
.amm-filters input[type="text"]{
  flex:1; min-width:200px; padding:7px 10px; border:1px solid var(--amm-border); border-radius:6px;
  font-size:13px; background:var(--amm-base); color:var(--amm-contrast);
}
.amm-filters input[type="text"]::placeholder{ color:var(--amm-contrast-2); }
.amm-filters input[type="text"]:focus{ outline:none; border-color:var(--amm-accent); }

.amm-flabel{ font-size:11px; color:var(--amm-contrast-2); text-transform:uppercase; letter-spacing:.05em; margin-right:2px; white-space:nowrap; }
.amm-chip{
  font-size:12px; padding:4px 11px; border-radius:99px; border:1px solid var(--amm-border);
  color:var(--amm-contrast-3); background:var(--amm-base); cursor:pointer; white-space:nowrap; user-select:none;
  transition:border-color .15s ease, color .15s ease;
}
.amm-chip:hover{ border-color:var(--amm-accent); color:var(--amm-contrast); }
.amm-chip.active{ background:rgba(0,230,204,0.12); border-color:var(--amm-accent); color:var(--amm-accent); }
.amm-clear{ font-size:12px; color:var(--amm-contrast-2); background:none; border:none; cursor:pointer; text-decoration:underline; margin-left:auto; }
.amm-clear:hover{ color:var(--amm-contrast); }

.amm-legend{ display:flex; gap:14px; flex-wrap:wrap; font-size:12px; color:var(--amm-contrast-2); margin:6px 0 16px; }
.amm-legend i{ width:9px; height:9px; border-radius:2px; display:inline-block; margin-right:5px; }

.amm-result-count{ font-size:12.5px; color:var(--amm-contrast-2); margin-bottom:12px; }
.amm-result-count b{ color:var(--amm-accent); }

.amm-cat-card{ border:1px solid var(--amm-border); border-radius:10px; margin-bottom:10px; overflow:hidden; background:var(--amm-base-2); }
.amm-cat-head{ display:flex; align-items:center; gap:12px; padding:12px 14px; cursor:pointer; }
.amm-cat-head:hover{ background:rgba(255,255,255,0.02); }
.amm-cat-name{ font-weight:600; font-size:14.5px; flex-shrink:0; color:var(--amm-contrast); }
.amm-cat-count{
  font-size:11.5px; color:var(--amm-contrast-3); background:var(--amm-base); border:1px solid var(--amm-border);
  padding:1px 8px; border-radius:99px; flex-shrink:0;
}
.amm-seg-bar{ flex:1; height:7px; border-radius:4px; overflow:hidden; display:flex; background:var(--amm-base); min-width:80px; }
.amm-seg{ height:100%; }
.amm-chevron{ color:var(--amm-contrast-2); font-size:11px; transition:transform .2s ease; flex-shrink:0; }
.amm-cat-card.open .amm-chevron{ transform:rotate(90deg); color:var(--amm-accent); }

.amm-cat-body{ max-height:0; overflow:hidden; transition:max-height .3s ease; }
.amm-cat-card.open .amm-cat-body{ max-height:3000px; border-top:1px solid var(--amm-border); }
.amm-cat-body-inner{ padding:12px 14px; display:flex; flex-wrap:wrap; gap:8px; }

.amm-co-chip{
  display:flex; flex-direction:column; gap:2px; background:var(--amm-base); border:1px solid var(--amm-border);
  border-radius:8px; padding:8px 12px; min-width:150px; text-decoration:none; color:inherit;
  transition:border-color .15s ease;
}
.amm-co-chip:hover{ border-color:var(--amm-accent); }
.amm-co-name{ font-size:13px; font-weight:500; display:flex; align-items:center; gap:6px; color:var(--amm-contrast); }
.amm-oss-dot{ width:6px; height:6px; border-radius:50%; background:var(--amm-accent); flex-shrink:0; }
.amm-co-meta{ font-size:11px; color:var(--amm-contrast-3); }

.amm-empty{ text-align:center; padding:40px; color:var(--amm-contrast-2); }

.amm-loading{ text-align:center; padding:30px; color:var(--amm-contrast-3); font-size:13.5px; }

@media (max-width: 640px){
  .amm-stats{ flex-wrap:wrap; }
  .amm-stats div{ flex:1 1 50%; border-bottom:1px solid var(--amm-border); }
}
