/* issues-status-bar overlay (issue #306)
   Scoped under .icsb-* to avoid Forgejo class collisions.
   Dark theme parity with arc-green / midnight. */

#icsb-root {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: #d4d4d4;
  pointer-events: none;
}

#icsb-root.icsb-hidden { display: none; }

.icsb-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  background: #1b232c;
  border-top: 1px solid #2a3640;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 14px;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.15s ease;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25);
}

.icsb-bar:hover { background: #243140; }

.icsb-stat {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icsb-stat strong {
  color: #f0f0f0;
  font-weight: 600;
}

.icsb-sep {
  color: #5a6675;
  user-select: none;
}

.icsb-spacer { flex: 1; }

.icsb-caret {
  font-size: 11px;
  color: #9fb0c2;
  padding: 2px 6px;
  border-radius: 3px;
  transition: transform 0.2s ease, color 0.15s ease;
  user-select: none;
}

.icsb-bar:hover .icsb-caret { color: #fff; }

#icsb-root.icsb-open .icsb-caret { transform: rotate(180deg); }

/* Scrim behind expanded panel */
.icsb-scrim {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 9998;
}

#icsb-root.icsb-open .icsb-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* Expanded composer panel */
.icsb-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  height: 0;
  background: #1b232c;
  border-top: 1px solid #2a3640;
  overflow: hidden;
  pointer-events: auto;
  transition: height 0.2s ease;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.4);
}

#icsb-root.icsb-open .icsb-panel { height: 280px; }

.icsb-panel-inner {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  box-sizing: border-box;
}

.icsb-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icsb-label {
  color: #9fb0c2;
  font-size: 12px;
}

.icsb-target {
  background: #0f1620;
  color: #e4e4e4;
  border: 1px solid #2a3640;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  min-width: 220px;
}

.icsb-textarea {
  flex: 1;
  background: #0f1620;
  color: #e4e4e4;
  border: 1px solid #2a3640;
  border-radius: 4px;
  padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  resize: none;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  min-height: 100px;
  max-height: 200px;
}

.icsb-textarea:focus { border-color: #4a8acb; }

.icsb-hint {
  color: #6b7c8e;
  font-size: 11px;
  margin-top: 4px;
  user-select: none;
  letter-spacing: 0.02em;
}

.icsb-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icsb-status {
  color: #9fb0c2;
  font-size: 12px;
  margin-right: auto;
}

.icsb-status.icsb-error { color: #f08080; }
.icsb-status.icsb-ok { color: #87d37c; }

.icsb-btn {
  background: #2a3640;
  color: #e4e4e4;
  border: 1px solid #3a4854;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

.icsb-btn:hover { background: #34424f; }
.icsb-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.icsb-btn-primary {
  background: #2f6f4a;
  border-color: #3a8b5d;
  color: #fff;
}

.icsb-btn-primary:hover { background: #38835a; }

/* Mobile */
@media (max-width: 600px) {
  .icsb-stat.icsb-mobile-hide { display: none; }
  #icsb-root.icsb-open .icsb-panel { height: 50vh; }
  .icsb-target { min-width: 0; flex: 1; }
}
