/* Bot-like cabinet — mirrors Telegram inline-keyboard UX */

.bot-panel {
  max-width: 440px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bot-panel__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
}

.bot-panel__back {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 4px;
  font: 600 13px/1.2 var(--font-text, Manrope, sans-serif);
  color: var(--ink-deep, #1a1816);
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.15s;
}

.bot-panel__back:hover {
  opacity: 1;
}

.bot-panel__toolbar-end {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.bot-panel__icon {
  appearance: none;
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 17px;
  line-height: 1;
  color: var(--muted, #6b6560);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.bot-panel__icon:hover {
  background: rgba(26, 24, 22, 0.06);
  color: var(--ink-deep, #1a1816);
}

.bot-panel__screen {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bot-message {
  background: #fff;
  border: 1px solid rgba(26, 24, 22, 0.1);
  border-radius: 16px 16px 16px 4px;
  padding: clamp(14px, 2.4vw, 18px);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-deep, #1a1816);
  white-space: pre-line;
  box-shadow: 0 6px 20px rgba(26, 24, 22, 0.05);
}

.bot-message--key {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
  user-select: all;
}

.bot-menu {
  display: grid;
  gap: 8px;
}

.bot-menu--2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bot-menu__btn {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(26, 24, 22, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  font: 600 14px/1.25 var(--font-text, Manrope, sans-serif);
  color: var(--ink-deep, #1a1816);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(26, 24, 22, 0.04);
}

.bot-menu__btn:hover {
  background: #fff;
  border-color: rgba(26, 24, 22, 0.16);
}

.bot-menu__btn:active {
  transform: scale(0.98);
}

.bot-menu__btn--full {
  grid-column: 1 / -1;
}

.bot-menu__btn--link {
  text-decoration: none;
}

.bot-menu__btn--danger {
  color: #9f2d20;
  border-color: rgba(159, 45, 32, 0.2);
}

.bot-menu__btn--primary {
  background: var(--ink-deep, #1a1816);
  color: #fff;
  border-color: transparent;
}

.bot-menu__btn--primary:hover {
  background: #2a2724;
  border-color: transparent;
}

.bot-sub-list {
  display: grid;
  gap: 8px;
}

.bot-sub-item {
  appearance: none;
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(26, 24, 22, 0.1);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s;
}

.bot-sub-item:hover {
  border-color: rgba(26, 24, 22, 0.2);
}

.bot-sub-item__title {
  font: 600 14px/1.3 var(--font-text, Manrope, sans-serif);
  color: var(--ink-deep, #1a1816);
}

.bot-sub-item__meta {
  font-size: 12px;
  color: var(--muted, #6b6560);
}

.bot-panel--active .cabinet-head,
.bot-panel--active .m-eyebrow,
.bot-panel--active .m-section > h2,
.bot-panel--active .m-section > .m-lead {
  display: none;
}

#account-panel:not(.hidden) ~ #notice,
#account-panel:not(.hidden) + #notice {
  max-width: 440px;
  margin-inline: auto;
}

@media (max-width: 520px) {
  .bot-menu--2col {
    grid-template-columns: 1fr;
  }

  .bot-menu--2col .bot-menu__btn:not(.bot-menu__btn--full) {
    grid-column: 1 / -1;
  }
}
