.tjg-ideas {
  bottom: max(1.15rem, env(safe-area-inset-bottom, 0px));
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  left: max(1.15rem, env(safe-area-inset-left, 0px));
  position: fixed;
  z-index: 99980;
}

.tjg-ideas-tab {
  background: #1d1d1f;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  min-height: 36px;
  padding: 8px 16px;
}

.tjg-ideas-tab:hover,
.tjg-ideas-tab[aria-expanded="true"] {
  background: #000;
}

.tjg-ideas-panel {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  bottom: calc(100% + 10px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  left: 0;
  padding: 16px 16px 14px;
  position: absolute;
  width: min(360px, calc(100vw - 2.3rem));
}

.tjg-ideas-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.tjg-ideas-head h2 {
  color: #1d1d1f;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

.tjg-ideas-close {
  background: transparent;
  border: 0;
  color: #6e6e73;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0 2px;
}

.tjg-ideas-kinds {
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 12px 0;
  padding: 0;
}

.tjg-ideas-kinds legend {
  clip: rect(0 0 0 0);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.tjg-ideas-kinds label {
  align-items: center;
  color: #1d1d1f;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  gap: 6px;
}

.tjg-ideas-id {
  display: grid;
  gap: 0 10px;
  grid-template-columns: 1fr 1fr;
}

.tjg-ideas-id .tjg-ideas-field:nth-child(3),
.tjg-ideas-verify-row,
.tjg-ideas-id #tjgIdeasCodeWrap {
  grid-column: 1 / -1;
}

.tjg-ideas-verify-row {
  margin: 0 0 10px;
}

.tjg-ideas-code-btn {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
}

.tjg-ideas-field input[readonly] {
  background: #f5f5f7;
}

.tjg-ideas-field {
  color: #1d1d1f;
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 10px;
}

.tjg-ideas-field input,
.tjg-ideas-field textarea {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  box-sizing: border-box;
  color: #1d1d1f;
  display: block;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  margin-top: 5px;
  padding: 9px 10px;
  width: 100%;
}

.tjg-ideas-field textarea {
  min-height: 108px;
  resize: vertical;
}

.tjg-ideas-hp {
  left: -9999px;
  position: absolute;
}

.tjg-ideas-submit {
  background: #1d1d1f;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
  padding: 10px 16px;
}

.tjg-ideas-submit:hover {
  background: #111;
}

.tjg-ideas-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.tjg-ideas-status {
  color: #6e6e73;
  font-size: 12px;
  margin: 8px 0 0;
}

.tjg-ideas-status.is-ok {
  color: #2f9e5d;
}

.tjg-ideas-status.is-err {
  color: #c43c3c;
}

body.tjg-team-hub-body .tjg-hub-topbar .tjg-hub-account {
  gap: 12px;
}

body.tjg-team-hub-body .tjg-hub-topbar .tjg-hub-account .tjg-ideas {
  bottom: auto;
  left: auto;
  position: relative;
  z-index: 95;
}

body.tjg-team-hub-body .tjg-hub-topbar .tjg-hub-account .tjg-ideas-tab {
  box-shadow: none;
  font-size: 13px;
  min-height: 32px;
  padding: 6px 14px;
}

body.tjg-team-hub-body .tjg-hub-topbar .tjg-hub-account .tjg-ideas-panel {
  bottom: auto;
  left: auto;
  right: 0;
  top: calc(100% + 8px);
}

body.tjg-team-hub-body--login .tjg-ideas {
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  left: max(1rem, env(safe-area-inset-left, 0px));
}

@media (max-width: 640px) {
  body:not(.tjg-team-hub-body) .tjg-ideas,
  body.tjg-team-hub-body--login .tjg-ideas {
    bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
    left: max(0.85rem, env(safe-area-inset-left, 0px));
  }
}
