/* ── Inbox card styles — shared between desktop and mobile ─────────────────── */

/* ── Card base ── */

.inbox-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  background: var(--bs-body-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.inbox-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.approval-card      { border-left: 4px solid var(--bs-warning); }
.clarification-card { border-left: 4px solid var(--bs-info); }

/* ── Card header ── */

.inbox-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bs-tertiary-bg);
  border-bottom: 1px solid var(--bs-border-color);
}

.inbox-card-header .badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.inbox-card-origin {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bs-body-color);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-card-time {
  font-size: 0.72rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Card body ── */

.inbox-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── Approval: tool name + args ── */

.inbox-tool-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.inbox-tool-name strong { font-size: 1rem; }

.inbox-agent-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg);
  border-radius: 4px;
  padding: 2px 8px;
  margin-left: auto;
  white-space: nowrap;
  border: 1px solid var(--bs-border-color);
}

.inbox-args-structured {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.inbox-arg-row {
  display: flex;
  gap: 8px;
  font-size: 0.82rem;
  align-items: baseline;
}

.inbox-arg-key {
  color: var(--bs-secondary-color);
  font-weight: 600;
  min-width: 70px;
  flex-shrink: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.inbox-arg-value {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
  font-size: 0.82rem;
  word-break: break-all;
  color: var(--bs-body-color);
}

.inbox-args-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 0;
  margin-top: 4px;
  transition: color 0.12s ease;
}

.inbox-args-toggle:hover { color: var(--bs-body-color); }

.inbox-args-raw {
  font-size: 0.72rem;
  background: var(--bs-tertiary-bg);
  border-radius: 6px;
  padding: 10px;
  max-height: 180px;
  overflow: auto;
  margin: 6px 0 0;
  white-space: pre-wrap;
  display: none;
  border: 1px solid var(--bs-border-color);
}

.inbox-args-raw.open { display: block; }

/* ── Clarification ── */

.inbox-card-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--bs-body-color);
}

.inbox-question {
  font-size: 0.88rem;
  color: var(--bs-secondary-color);
  margin-bottom: 12px;
  line-height: 1.45;
}

.inbox-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.inbox-chip {
  font-size: 0.78rem;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  cursor: pointer;
  transition: all 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.inbox-chip:hover {
  background: var(--bs-info);
  border-color: var(--bs-info);
  color: #fff;
}

.inbox-answer-area {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inbox-answer-input {
  width: 100%;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  resize: none;
  min-height: 40px;
  box-sizing: border-box;
  font-family: inherit;
}

.inbox-answer-input:focus {
  outline: none;
  border-color: var(--bs-info);
  box-shadow: 0 0 0 2px rgba(13, 202, 240, 0.15);
}

.inbox-answer-send {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: var(--bs-info);
  color: #000;
  cursor: pointer;
  transition: filter 0.12s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.inbox-answer-send:hover  { filter: brightness(1.1); }
.inbox-answer-send:active { transform: scale(0.96); }

/* ── Card footer ── */

.inbox-card-footer {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.approval-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ── Bypass timed dropdown ── */

.inbox-bypass-wrap {
  position: relative;
}

.inbox-bypass-wrap .btn {
  width: 100%;
}

.inbox-bypass-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  overflow: hidden;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.inbox-bypass-menu.open { display: block; }

.inbox-bypass-menu button {
  display: block;
  width: 100%;
  padding: 9px 14px;
  text-align: left;
  background: none;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bs-body-color);
  cursor: pointer;
  transition: background 0.1s;
}

.inbox-bypass-menu button + button {
  border-top: 1px solid var(--bs-border-color);
}

.inbox-bypass-menu button:hover {
  background: var(--bs-tertiary-bg);
}

/* ── Empty state ── */

.inbox-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--bs-secondary-color);
}

.inbox-empty i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.inbox-empty p {
  margin: 0;
  font-size: 0.9rem;
}
