/* /posteffect + Random Loot Simulator. #cct-scoped — tool-theme.css loads after this. */

#cct { display: block; }

#cct .cct-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
#cct .cct-tab { padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; }

/* The snapshot warning. Drawn from a border rather than a background so it reads in both
 * themes without theme-normalize.js having an opinion about it. */
#cct .cct-banner {
  margin: 0 0 18px;
  padding: 11px 14px;
  border-radius: 10px;
  border-left: 4px solid #d9a441;
  background: rgba(217, 164, 65, .12);
  font-size: 13.5px;
  line-height: 1.55;
}

#cct .cct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  align-items: start;
}
#cct .cct-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

#cct .cct-field { display: block; min-width: 0; }
#cct .cct-label {
  display: block; font-size: 11px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; opacity: .72; margin-bottom: 6px;
}
#cct .cct-hint { display: block; margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; opacity: .68; }
#cct input[type="text"],
#cct input[type="number"] { width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 14.5px; }

#cct .cct-segs { display: flex; flex-wrap: wrap; gap: 6px; }
#cct .cct-seg { padding: 7px 13px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; }

/* Post effects ------------------------------------------------------------ */
#cct .cct-effects { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
#cct .cct-effect {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; text-align: left;
}
#cct .cct-effectname { font-size: 13.5px; font-weight: 700; }
#cct .cct-effectid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; opacity: .72;
}
#cct .cct-effectdesc { font-size: 12px; line-height: 1.45; opacity: .72; }
#cct .cct-effect.cct-on { outline: 2px solid currentColor; outline-offset: -2px; }

#cct .cct-out {
  margin: 0; padding: 13px 15px; border-radius: 10px;
  background: rgba(127, 127, 127, .12);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.5;
  /* A long command must scroll inside its own box, never widen the page. */
  overflow-x: auto;
  white-space: pre;
}
#cct .cct-callout {
  margin: 0; padding: 11px 13px; border-radius: 10px;
  background: rgba(127, 127, 127, .10);
  font-size: 13.5px; line-height: 1.6;
}

/* Loot pool --------------------------------------------------------------- */
#cct .cct-pool { display: flex; flex-direction: column; gap: 6px; }
#cct .cct-poolrow {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}
#cct .cct-drop { width: 28px; height: 32px; border-radius: 6px; font-size: 15px; padding: 0; cursor: pointer; }

#cct .cct-odd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 8px; align-items: center; margin-bottom: 6px; }
#cct .cct-oddname { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cct .cct-oddbar { display: block; height: 10px; border-radius: 999px; background: rgba(127, 127, 127, .22); overflow: hidden; }
#cct .cct-oddbar span { display: block; height: 100%; background: currentColor; opacity: .55; }
#cct .cct-oddpct {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; opacity: .78; min-width: 48px; text-align: right;
}

#cct .cct-chest { min-height: 70px; }
#cct .cct-slots { display: flex; flex-wrap: wrap; gap: 6px; }
#cct .cct-slot {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(127, 127, 127, .12);
  font-size: 13px;
}
#cct .cct-empty { margin: 0; font-size: 13.5px; opacity: .68; }

#cct .cct-tablewrap { overflow-x: auto; }
#cct .cct-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
#cct .cct-table th, #cct .cct-table td { padding: 6px 10px; text-align: left; white-space: nowrap; }
#cct .cct-table th {
  font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; opacity: .7;
}
#cct .cct-table tbody tr { border-top: 1px solid rgba(127, 127, 127, .22); }

#cct .cct-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#cct .cct-btn { padding: 9px 14px; border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer; }
#cct .cct-note { margin: 14px 0 0; min-height: 1.2em; font-size: 13px; opacity: .85; }

#cct .cct-help { margin-top: 24px; font-size: 14.5px; line-height: 1.65; max-width: 72ch; }
#cct .cct-help p { margin: 0; }

#cct [hidden] { display: none !important; }
