/* Grow a Garden Calculator v2 */
.gag-calc-wrap {
  background: #242424;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #f0f0f0;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.gag-calc-prompt { font-size: 0.875rem; color: #aaa; margin-bottom: 16px; }

/* Mode toggle */
.gag-mode-toggle {
  display: flex; align-items: center; justify-content: center;
  gap: 32px; background: #2a2a2a; border: 1px solid #3a3a3a;
  border-radius: 8px; padding: 12px 24px; margin-bottom: 16px;
}
.gag-mode-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.95rem; font-weight: 600; color: #aaa; }
.gag-mode-radio { accent-color: #3b82f6; width: 16px; height: 16px; cursor: pointer; }

/* Categories */
.gag-categories { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.gag-cat-btn {
  padding: 5px 13px; border-radius: 6px; border: 1px solid #3a3a3a;
  background: transparent; color: #aaa; font-size: 0.8rem; cursor: pointer;
  transition: all 0.15s; white-space: nowrap; font-family: inherit;
}
.gag-cat-btn:hover { background: rgba(255,255,255,0.06); color: #f0f0f0; }
.gag-cat-btn.active { color: #c8a600; border-color: #c8a600; font-weight: 600; }

/* Search */
.gag-search-wrap { margin-bottom: 16px; }
.gag-search {
  width: 100%; max-width: 480px; padding: 9px 14px; background: #1e1e1e;
  border: 1px solid #3a3a3a; border-radius: 8px; color: #f0f0f0;
  font-size: 0.875rem; outline: none; font-family: inherit; box-sizing: border-box;
}
.gag-search::placeholder { color: #666; }
.gag-search:focus { border-color: #555; }

/* Items grid */
.gag-items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 2px; }
.gag-item-card {
  display: flex; flex-direction: column; align-items: center; padding: 10px 6px 8px;
  background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 6px; cursor: pointer;
  gap: 6px; text-align: center; min-height: 90px; transition: background 0.15s, transform 0.1s; font-family: inherit;
}
.gag-item-card:hover { background: #333; transform: translateY(-1px); }
.gag-item-img { width: 54px; height: 54px; object-fit: contain; }
.gag-item-name { font-size: 0.69rem; color: #aaa; line-height: 1.2; word-break: break-word; }

/* Modal */
.gag-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 99999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px);
}
.gag-modal-box {
  background: #242424; border: 1px solid #3a3a3a; border-radius: 12px;
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  position: relative; padding: 28px; box-sizing: border-box;
}
.gag-modal-close {
  position: absolute; top: 14px; right: 16px; background: rgba(255,255,255,0.08);
  border: none; color: #aaa; width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; font-size: 0.85rem; display: flex; align-items: center;
  justify-content: center; font-family: inherit;
}
.gag-modal-close:hover { background: rgba(255,255,255,0.16); color: #f0f0f0; }

.gag-modal-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.gag-modal-img-wrap {
  width: 80px; height: 80px; background: #2a2a2a; border: 1px solid #3a3a3a;
  border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.gag-modal-img { width: 68px; height: 68px; object-fit: contain; }
.gag-modal-title-area { display: flex; flex-direction: column; gap: 5px; }
.gag-modal-title { font-size: 1.3rem; font-weight: 700; color: #f0f0f0; margin: 0; }
.gag-modal-cat { font-size: 0.78rem; color: #666; background: rgba(255,255,255,0.06); padding: 3px 8px; border-radius: 4px; }
.gag-modal-base-val { font-size: 0.8rem; font-weight: 600; color: #c8a600; }

.gag-modal-body { display: flex; flex-direction: column; gap: 18px; }

/* Formula */
.gag-formula-box { background: #1c1c1c; border: 1px solid #3a3a3a; border-radius: 8px; padding: 14px 16px; }
.gag-formula-title { font-size: 1rem; font-weight: 700; color: #f0f0f0; margin-bottom: 6px; }
.gag-formula-text { font-size: 0.82rem; color: #aaa; font-style: italic; line-height: 1.5; }

/* Control buttons */
.gag-ctrl-row { display: flex; gap: 10px; flex-wrap: wrap; }
.gag-ctrl-btn {
  padding: 8px 18px; background: #2a2a2a; border: 1px solid #3a3a3a;
  border-radius: 6px; color: #f0f0f0; font-size: 0.875rem; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.gag-ctrl-btn:hover { background: #333; border-color: #555; }

/* Mutation sections */
.gag-mut-section { display: flex; flex-direction: column; gap: 8px; }
.gag-mut-section-label {
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: #666;
}
.gag-mut-toggle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 5px; }

.gag-mut-toggle {
  display: flex; align-items: center; gap: 7px; padding: 7px 10px;
  background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 6px;
  cursor: pointer; font-family: inherit; transition: background 0.12s, border-color 0.12s; text-align: left;
}
.gag-mut-toggle:hover { background: #333; border-color: #555; }
.gag-mut-toggle.active { border-color: var(--mc, #3b82f6); background: rgba(255,255,255,0.04); }

.gag-mut-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.gag-mut-lbl { font-size: 0.78rem; color: #aaa; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gag-mut-toggle.active .gag-mut-lbl { color: #f0f0f0; }
.gag-mut-x { font-size: 0.72rem; color: #666; flex-shrink: 0; }
.gag-mut-toggle.active .gag-mut-x { color: #c8a600; }

/* Active multiplier badge */
.gag-active-mult {
  font-size: 0.82rem; color: #aaa; background: rgba(200,166,0,0.10);
  border: 1px solid rgba(200,166,0,0.25); border-radius: 6px; padding: 8px 14px;
}
.gag-active-mult strong { color: #c8a600; }

/* Inputs */
.gag-iw-section { display: flex; flex-direction: column; gap: 12px; }
.gag-iw-title { font-size: 1rem; font-weight: 700; color: #f0f0f0; }
.gag-iw-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; }
.gag-iw-field { display: flex; flex-direction: column; gap: 6px; }
.gag-iw-label { font-size: 0.8rem; font-weight: 600; color: #c8a600; }
.gag-boost-label { color: #c8a600; }
.gag-iw-input {
  background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 6px;
  color: #f0f0f0; font-size: 0.9rem; font-weight: 600; padding: 8px 12px;
  width: 110px; outline: none; text-align: center; font-family: inherit;
  box-sizing: border-box;
}
.gag-iw-input:focus { border-color: #555; }
.gag-iw-input::-webkit-inner-spin-button,
.gag-iw-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.gag-boost-slider { width: 140px; accent-color: #3b82f6; cursor: pointer; }
.gag-boost-pct { font-size: 0.82rem; color: #aaa; }

/* Result display */
.gag-result-display { padding: 4px 0; }
.gag-result-dollar { font-size: 2.8rem; font-weight: 800; color: #c8a600; display: block; line-height: 1.1; }
.gag-result-sub { font-size: 0.73rem; color: #666; margin-top: 6px; line-height: 1.4; }

.gag-weight-mode-section { display: flex; flex-direction: column; gap: 10px; }

/* Action buttons */
.gag-action-row { display: flex; gap: 10px; }
.gag-action-btn {
  padding: 10px 20px; background: #2a2a2a; border: 1px solid #3a3a3a;
  border-radius: 6px; color: #f0f0f0; font-size: 0.875rem; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.gag-action-btn:hover { background: #333; border-color: #555; }
.gag-toggle-mode-btn.active { border-color: #c8a600; box-shadow: 0 0 10px rgba(200,166,0,0.25); color: #c8a600; }

/* Value list */
.gag-value-list {
  background: #1c1c1c; border: 1px solid #3a3a3a; border-radius: 8px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.gag-vl-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #666; margin-bottom: 4px; }
.gag-vl-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #2e2e2e; }
.gag-vl-label { font-size: 0.82rem; color: #aaa; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gag-vl-value { font-size: 0.9rem; font-weight: 700; color: #c8a600; flex-shrink: 0; }
.gag-vl-remove { background: none; border: none; color: #666; cursor: pointer; font-size: 0.75rem; padding: 2px 5px; border-radius: 4px; font-family: inherit; }
.gag-vl-remove:hover { color: #ef4444; }
.gag-vl-total { font-size: 0.9rem; font-weight: 700; color: #f0f0f0; padding-top: 8px; border-top: 1px solid #3a3a3a; text-align: right; }

/* Responsive */
@media (max-width: 640px) {
  .gag-calc-wrap { padding: 14px; }
  .gag-items-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
  .gag-item-img { width: 44px; height: 44px; }
  .gag-mode-toggle { gap: 16px; padding: 10px; }
  .gag-modal-box { padding: 18px; }
  .gag-modal-title { font-size: 1.1rem; }
  .gag-result-dollar { font-size: 2.2rem; }
  .gag-mut-toggle-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
