@font-face {
  font-family: "Nunito";
  src: url("__OPI_FRAME_FONT_ASSET_URL__") format("truetype");
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --font-sans-rounded: "Nunito", ui-rounded, "SF Pro Rounded", "Arial Rounded MT", Arial, Helvetica, sans-serif;
  --opi-accent: #1367e5;
  --opi-surface: #ffffff;
  --opi-panel-bg: #ffffff;
  --opi-panel-border: #d8dee7;
  --opi-panel-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
  --opi-header-bg: #ffffff;
  --opi-header-ink: #152033;
  --opi-text: #172033;
  --opi-muted: #667085;
  --opi-soft-muted: #98a2b3;
  --opi-user-bubble: #e8f1ff;
  --opi-user-bubble-text: #1a1a1a;
  --opi-bot-bubble: #f7f8fa;
  --opi-bot-bubble-text: rgba(15, 23, 42, 0.82);
  --opi-bubble-border: rgba(15, 23, 42, 0.06);
  --opi-ring-core: #ffffff;
  --opi-ring-core-shadow: inset 0 0 4px rgba(168, 216, 255, 0.3);
  --opi-ring-gradient: conic-gradient(from 0deg, #a8d8ff 0deg, #ffd6e8 60deg, #fff5cc 120deg, #ffe4cc 180deg, #ffd6e8 240deg, #a8d8ff 300deg, #a8d8ff 360deg);
  --opi-ring-shadow-idle: 0 0 7px rgba(168, 216, 255, 0.5), 0 0 14px rgba(255, 214, 232, 0.22);
  --opi-ring-filter-idle: drop-shadow(0 0 4px rgba(220, 242, 255, 0.22)) drop-shadow(0 0 9px rgba(118, 191, 255, 0.14)) saturate(1);
  --opi-ring-bloom-bg: radial-gradient(circle, rgba(250, 253, 255, 0.98) 0%, rgba(226, 244, 255, 0.82) 22%, rgba(168, 222, 255, 0.52) 44%, rgba(102, 184, 255, 0.2) 62%, rgba(102, 184, 255, 0) 76%);
  --opi-ring-bloom-opacity-idle: 0.1;
  --opi-ring-bloom-scale-idle: 1.05;
  --opi-ring-bloom-blur-idle: 7px;
  --opi-control-bg: #ffffff;
  --opi-control-bg-hover: #f8fbff;
  --opi-control-border: rgba(15, 23, 42, 0.1);
  --opi-control-border-strong: rgba(15, 23, 42, 0.12);
  --opi-media-bg: #ffffff;
  --opi-code-bg: rgba(15, 23, 42, 0.08);
  --opi-code-block-bg: rgba(15, 23, 42, 0.06);
  --opi-link-button-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(239, 246, 255, 0.92) 100%);
  --opi-typing-bg: #ffffff;
  --opi-reaction-bg: #ffffff;
  --opi-status-bg: rgba(255, 255, 255, 0.94);
  --opi-reset-bg: radial-gradient(circle at top left, rgba(219, 234, 254, 0.9), rgba(255, 255, 255, 0) 58%), linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.95));
  --opi-reset-gauge-bg: radial-gradient(circle, rgba(255, 255, 255, 0.98) 0 58%, transparent 59%), conic-gradient(from 180deg, rgba(19, 103, 229, 0.18), rgba(19, 103, 229, 0.8), rgba(91, 179, 255, 0.4));
  --opi-reset-gauge-core: rgba(255, 255, 255, 0.96);
  --opi-footer-bg: #ffffff;
  --opi-status-pending: #0ea5e9;
  --opi-status-processing: #f59e0b;
  --opi-status-ready: #6366f1;
  --opi-status-delivered: #16a34a;
  --opi-status-failed: #dc2626;
}

:root[data-opi-theme="dark"] {
  color-scheme: dark;
  --opi-accent: #60a5fa;
  --opi-surface: #0f172a;
  --opi-panel-bg: #050b14;
  --opi-panel-border: rgba(148, 163, 184, 0.28);
  --opi-panel-shadow: 0 24px 64px rgba(0, 0, 0, 0.54);
  --opi-header-bg: #0b1220;
  --opi-header-ink: #f8fafc;
  --opi-text: #e8eef8;
  --opi-muted: #b6c2d2;
  --opi-soft-muted: #8fa2b8;
  --opi-user-bubble: #063828;
  --opi-user-bubble-text: #dff8ed;
  --opi-bot-bubble: #1e293b;
  --opi-bot-bubble-text: #e8eef8;
  --opi-bubble-border: rgba(148, 163, 184, 0.2);
  --opi-ring-core: rgba(147, 197, 253, 0.94);
  --opi-ring-core-shadow: inset 0 0 5px rgba(191, 219, 254, 0.58), inset 0 0 10px rgba(15, 23, 42, 0.18);
  --opi-ring-gradient: conic-gradient(from 24deg, #38bdf8 0deg, #60a5fa 58deg, #818cf8 116deg, #c4b5fd 178deg, #38bdf8 236deg, #1d4ed8 302deg, #38bdf8 360deg);
  --opi-ring-shadow-idle: 0 0 0 1px rgba(147, 197, 253, 0.9), 0 0 7px rgba(255, 255, 255, 0.36), 0 0 18px rgba(226, 232, 240, 0.2), 0 0 30px rgba(255, 255, 255, 0.08);
  --opi-ring-filter-idle: drop-shadow(0 0 4px rgba(248, 250, 252, 0.24)) drop-shadow(0 0 10px rgba(226, 232, 240, 0.16)) saturate(1.18);
  --opi-ring-bloom-bg: radial-gradient(circle, rgba(255, 255, 255, 0.78) 0%, rgba(248, 250, 252, 0.4) 24%, rgba(226, 232, 240, 0.22) 48%, rgba(203, 213, 225, 0.1) 66%, rgba(203, 213, 225, 0) 80%);
  --opi-ring-bloom-opacity-idle: 0.18;
  --opi-ring-bloom-scale-idle: 1.08;
  --opi-ring-bloom-blur-idle: 8px;
  --opi-control-bg: #0f172a;
  --opi-control-bg-hover: #162238;
  --opi-control-border: rgba(148, 163, 184, 0.26);
  --opi-control-border-strong: rgba(148, 163, 184, 0.34);
  --opi-media-bg: #0b1220;
  --opi-code-bg: rgba(148, 163, 184, 0.16);
  --opi-code-block-bg: rgba(2, 6, 23, 0.52);
  --opi-link-button-bg: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.96) 100%);
  --opi-typing-bg: #0f172a;
  --opi-reaction-bg: #111c2e;
  --opi-status-bg: rgba(15, 23, 42, 0.96);
  --opi-reset-bg: radial-gradient(circle at top left, rgba(30, 64, 175, 0.32), rgba(15, 23, 42, 0) 58%), linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.95));
  --opi-reset-gauge-bg: radial-gradient(circle, rgba(15, 23, 42, 0.98) 0 58%, transparent 59%), conic-gradient(from 180deg, rgba(96, 165, 250, 0.2), rgba(96, 165, 250, 0.82), rgba(165, 180, 252, 0.44));
  --opi-reset-gauge-core: rgba(15, 23, 42, 0.96);
  --opi-footer-bg: #080f1d;
  --opi-status-pending: #38bdf8;
  --opi-status-processing: #fbbf24;
  --opi-status-ready: #a5b4fc;
  --opi-status-delivered: #4ade80;
  --opi-status-failed: #f87171;
}

html,
body,
#opi-frame-root {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

html,
body {
  overflow: hidden;
}

body,
button,
input,
textarea,
select {
  color: var(--opi-text);
  font-family: var(--font-sans-rounded);
  background: var(--opi-panel-bg);
}

#opi-frame-root {
  background: var(--opi-panel-bg);
}

.opi-chat-shell {
  height: 100%;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  background: var(--opi-panel-bg);
}

.opi-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 72px 10px 16px;
  box-sizing: border-box;
  background: var(--opi-header-bg);
  color: var(--opi-header-ink);
  border-bottom: 1px solid var(--opi-panel-border);
}

.opi-chat-title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.opi-chat-ring {
  --opi-ring-scale: 1;
  --opi-ring-core-inset: 5.5px;
  --opi-ring-shadow: var(--opi-ring-shadow-idle);
  --opi-ring-filter: var(--opi-ring-filter-idle);
  --opi-ring-bloom-opacity: var(--opi-ring-bloom-opacity-idle);
  --opi-ring-bloom-scale: var(--opi-ring-bloom-scale-idle);
  --opi-ring-bloom-blur: var(--opi-ring-bloom-blur-idle);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  flex: 0 0 auto;
  position: relative;
  isolation: isolate;
  background: var(--opi-ring-gradient);
  box-shadow: var(--opi-ring-shadow);
  filter: var(--opi-ring-filter);
  transform: scale(var(--opi-ring-scale));
  transform-origin: center center;
  transition: transform 70ms ease-out, box-shadow 90ms ease-out, filter 90ms ease-out;
  will-change: transform, box-shadow, filter;
}

.opi-chat-ring::before {
  content: "";
  position: absolute;
  inset: var(--opi-ring-core-inset);
  border-radius: 999px;
  background: var(--opi-ring-core);
  box-shadow: var(--opi-ring-core-shadow);
  transition: inset 70ms ease-out, box-shadow 90ms ease-out;
}

.opi-chat-ring::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background: var(--opi-ring-bloom-bg);
  opacity: var(--opi-ring-bloom-opacity);
  transform: scale(var(--opi-ring-bloom-scale));
  filter: blur(var(--opi-ring-bloom-blur));
  transform-origin: center center;
  transition: opacity 90ms ease-out, transform 70ms ease-out, filter 90ms ease-out;
  pointer-events: none;
  z-index: -1;
}

.opi-chat-heading {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.opi-chat-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: inherit;
  line-height: 1.2;
}

.opi-chat-subtitle {
  margin: 0;
  color: var(--opi-muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opi-chat-thread-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.opi-transcript {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 14px 14px 10px;
  box-sizing: border-box;
  overscroll-behavior-y: contain;
}

.opi-empty-state {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100%;
  padding: min(18vh, 120px) 16px 24px;
  text-align: center;
  box-sizing: border-box;
}

.opi-empty-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--opi-soft-muted);
}

.opi-empty-copy {
  display: none;
}

.opi-entry {
  display: grid;
  gap: 4px;
}

.opi-row {
  display: flex;
  width: 100%;
}

.opi-row-user {
  justify-content: flex-end;
}

.opi-row-assistant {
  justify-content: flex-start;
}

.opi-bubble {
  display: grid;
  gap: 8px;
  width: fit-content;
  max-width: 95%;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--opi-bubble-border);
  color: var(--opi-bot-bubble-text);
  background: var(--opi-bot-bubble);
}

.opi-bubble-user {
  background: var(--opi-user-bubble);
  color: var(--opi-user-bubble-text);
  gap: 2px;
  padding: 5px 6px 4px 14px;
  border-radius: 10px 10px 2px 10px;
  border-color: rgba(14, 165, 233, 0.15);
}

.opi-bubble-assistant {
  border-radius: 10px 10px 10px 2px;
}

.opi-entry-streaming .opi-bubble-assistant {
  position: relative;
  padding-right: 24px;
  border-color: rgba(19, 103, 229, 0.16);
}

.opi-entry-streaming .opi-bubble-assistant::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 2px;
  height: 1.1em;
  border-radius: 999px;
  background: var(--opi-accent);
  opacity: 0.42;
  animation: opi-stream-caret 1.05s ease-in-out infinite;
}

@keyframes opi-stream-caret {
  0%,
  45% {
    opacity: 0.18;
  }
  46%,
  100% {
    opacity: 0.68;
  }
}

.opi-bubble-body {
  display: grid;
  gap: 10px;
  font-size: 15px;
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
}

.opi-bubble-body[hidden] {
  display: none;
}

.opi-media-attachment-list {
  display: grid;
  gap: 8px;
}

.opi-media-attachment-list[hidden] {
  display: none;
}

.opi-media-attachment {
  min-width: min(260px, 70vw);
  max-width: min(420px, 100%);
}

.opi-media-image-frame {
  margin: 0;
  display: grid;
  gap: 6px;
}

.opi-media-image {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--opi-control-border);
  background: var(--opi-media-bg);
}

.opi-media-audio {
  width: min(320px, 72vw);
  max-width: 100%;
}

.opi-media-caption {
  color: var(--opi-muted);
  font-size: 12px;
  line-height: 1.35;
}

.opi-media-file-link {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--opi-control-border);
  background: var(--opi-media-bg);
  color: var(--opi-text);
  text-decoration: none;
}

.opi-media-file-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.opi-media-file-meta {
  color: var(--opi-muted);
  font-size: 12px;
  line-height: 1.3;
}

.opi-bubble-body p,
.opi-bubble-body ul,
.opi-bubble-body ol,
.opi-bubble-body blockquote,
.opi-bubble-body pre {
  margin: 0;
}

.opi-bubble-body ul,
.opi-bubble-body ol {
  padding-left: 20px;
}

.opi-bubble-body code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--opi-code-bg);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}

.opi-bubble-body pre {
  overflow-x: auto;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--opi-code-block-bg);
}

.opi-bubble-body pre code {
  display: block;
  padding: 0;
  background: transparent;
}

.opi-bubble-body blockquote {
  padding-left: 12px;
  color: var(--opi-muted);
  border-left: 3px solid rgba(15, 23, 42, 0.18);
}

.opi-bubble-body .opi-link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin: 4px 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 122, 255, 0.22);
  background: var(--opi-link-button-bg);
  color: var(--opi-accent);
  font-family: var(--font-sans-rounded);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(0, 122, 255, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.opi-bubble-body .opi-link-button::after {
  content: "Abrir";
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.12);
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.opi-bubble-body .opi-link-button:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 122, 255, 0.34);
  box-shadow: 0 14px 28px rgba(0, 122, 255, 0.14);
}

.opi-bubble-body .opi-link-button:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.24);
  outline-offset: 2px;
}

.opi-transport-status {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-self: flex-end;
  margin: 0;
  min-height: 14px;
  padding: 0;
  max-width: none;
  position: relative;
}

.opi-transport-status-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 140ms ease, transform 140ms ease;
}

.opi-transport-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.08);
  transition: background-color 140ms ease, opacity 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.opi-transport-status[data-dots="1"] .opi-transport-status-dot:last-child {
  opacity: 0;
  transform: scale(0.2);
}

.opi-transport-status[data-tone="read"] .opi-transport-status-dot {
  background: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.opi-transport-status[data-tone="failed"] .opi-transport-status-dot {
  background: #cbd5e1;
  box-shadow: 0 0 0 1px rgba(203, 213, 225, 0.1);
}

.opi-transport-status[hidden] {
  display: none;
}

.opi-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin: 0 14px 10px;
  background: var(--opi-typing-bg);
  border: 1px solid var(--opi-panel-border);
  border-radius: 10px 10px 10px 2px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.opi-typing-indicator[hidden] {
  display: none;
}

.opi-typing-avatar {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
  background: var(--opi-ring-gradient);
  box-shadow: var(--opi-ring-shadow-idle);
  filter: var(--opi-ring-filter-idle);
}

.opi-typing-avatar::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: var(--opi-ring-core);
  box-shadow: var(--opi-ring-core-shadow);
}

.opi-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.opi-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--opi-accent);
  animation: opi-typing-bounce 1.4s ease-in-out infinite;
}

.opi-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.opi-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes opi-typing-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

.opi-typing-copy {
  font-size: 14px;
  color: var(--opi-muted);
}

.opi-entry-reaction {
  display: flex;
  justify-content: flex-start;
}

.opi-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--opi-control-border);
  background: var(--opi-reaction-bg);
  color: var(--opi-muted);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.opi-reaction-mark {
  color: var(--opi-accent);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.opi-reaction-copy {
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opi-reset-countdown {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0 14px 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--opi-reset-bg);
  border: 1px solid rgba(19, 103, 229, 0.14);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.opi-reset-countdown-gauge {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--opi-reset-gauge-bg);
  box-shadow: inset 0 0 0 1px rgba(19, 103, 229, 0.08);
}

.opi-reset-countdown-gauge::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: var(--opi-reset-gauge-core);
}

.opi-reset-countdown-value {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: #1367e5;
}

.opi-reset-countdown-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.opi-reset-countdown-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #4b77c5;
}

.opi-reset-countdown-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--opi-text);
}

.opi-reset-countdown-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--opi-muted);
}

.opi-reset-countdown-progress {
  position: relative;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(19, 103, 229, 0.12);
}

.opi-reset-countdown-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(1);
  background: linear-gradient(90deg, #5bb3ff 0%, #1367e5 100%);
  transition: transform 180ms linear;
}

.opi-reset-countdown.is-imminent {
  border-color: rgba(59, 130, 246, 0.24);
  box-shadow: 0 14px 30px rgba(19, 103, 229, 0.14);
}

.opi-reset-countdown.is-imminent .opi-reset-countdown-value {
  color: #0f5cd6;
}

.opi-suggestions-shell {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 150ms ease-out;
}

.opi-suggestions-shell.is-collapsed {
  grid-template-rows: 0fr;
}

.opi-suggestions-shell.is-collapsed .opi-suggestions-inner {
  opacity: 0;
  transform: translateY(-6px);
}

.opi-suggestions-inner {
  overflow: hidden;
  min-height: 0;
  padding: 0 14px 8px;
  display: grid;
  gap: 8px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 150ms ease-out, transform 150ms ease-out;
}

.opi-suggestions-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--opi-muted);
}

.opi-suggestion-list {
  display: grid;
  gap: 6px;
}

.opi-suggestion-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--opi-control-border);
  border-radius: 10px;
  background: var(--opi-control-bg);
  color: var(--opi-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.opi-suggestion-button:hover {
  background: var(--opi-control-bg-hover);
  border-color: var(--opi-control-border-strong);
  transform: translateY(-1px);
}

.opi-suggestion-button.is-selected {
  background: #e8f2ff;
  border-color: rgba(19, 103, 229, 0.28);
  color: #1367e5;
}

.opi-suggestion-copy {
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
}

.opi-suggestion-arrow {
  flex: 0 0 auto;
  color: currentColor;
  font-size: 13px;
}

.opi-chat-composer {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--opi-panel-border);
  background: var(--opi-footer-bg);
}

.opi-composer-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

.opi-composer-attachments[hidden] {
  display: none;
}

.opi-composer-attachment {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  gap: 6px;
  padding: 5px 6px 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--opi-control-border);
  background: var(--opi-control-bg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.opi-composer-attachment-name {
  min-width: 0;
  max-width: min(260px, 70vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--opi-muted);
  font-size: 12px;
  font-weight: 700;
}

.opi-composer-attachment-remove {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--opi-control-border-strong);
  border-radius: 6px;
  background: var(--opi-control-bg);
  color: var(--opi-muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.opi-composer-frame {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 42px;
  padding: 6px 8px 6px 12px;
  box-sizing: border-box;
  background: var(--opi-control-bg);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--opi-control-border-strong);
  transition: box-shadow 0.2s ease;
}

.opi-composer-frame:focus-within {
  box-shadow: 0 0 0 3px rgba(19, 103, 229, 0.1), inset 0 0 0 1px rgba(19, 103, 229, 0.34);
}

.opi-attach-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--opi-control-border);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--opi-control-bg);
  color: var(--opi-muted);
  cursor: pointer;
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.opi-attach-button:hover {
  color: var(--opi-accent);
  border-color: rgba(19, 103, 229, 0.24);
  background: var(--opi-control-bg-hover);
  transform: translateY(-1px);
}

.opi-attach-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.opi-composer-input {
  flex: 1 1 auto;
  min-height: 20px;
  max-height: 160px;
  padding: 4px 0;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--opi-text);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  box-sizing: border-box;
  overflow-y: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.opi-composer-input::placeholder {
  color: var(--opi-soft-muted);
}

.opi-composer-input::-webkit-scrollbar {
  width: 4px;
}

.opi-composer-input::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 2px;
}

.opi-composer-input::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.opi-send-button {
  position: relative;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
  background: #e8f2ff;
  color: #1367e5;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.opi-send-button:hover {
  background: #deebff;
  transform: translateY(-1px);
}

.opi-send-button:active {
  background: #d4e7ff;
  transform: translateY(0);
}

.opi-send-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.opi-send-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.opi-send-button.is-pending {
  pointer-events: none;
}

.opi-send-button.is-pending .opi-send-icon {
  opacity: 0;
}

.opi-send-button.is-pending::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(19, 103, 229, 0.25);
  border-top-color: #1367e5;
  border-radius: 999px;
  animation: opi-send-spin 0.8s linear infinite;
}

@keyframes opi-send-spin {
  to {
    transform: rotate(360deg);
  }
}

.opi-composer-footer {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 100%;
  display: flex;
  justify-content: center;
  min-height: 0;
  pointer-events: none;
}

.opi-status-line {
  font-size: 11px;
  color: var(--opi-soft-muted);
  text-align: center;
  padding: 3px 8px;
  border: 1px solid var(--opi-control-border);
  border-radius: 8px;
  background: var(--opi-status-bg);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.opi-status-line[hidden] {
  display: none;
}

.opi-frame-fallback {
  min-height: 100%;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  box-sizing: border-box;
}

.opi-frame-fallback-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.opi-frame-fallback-copy {
  margin: 0;
  color: var(--opi-muted);
  font-size: 14px;
  line-height: 1.5;
}

.opi-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .opi-reset-countdown {
    margin: 0 10px 10px;
    padding: 13px 14px;
    gap: 12px;
  }

  .opi-reset-countdown-gauge {
    width: 48px;
    height: 48px;
  }

  .opi-reset-countdown-value {
    font-size: 19px;
  }

  .opi-chat-header {
    padding: 10px 64px 10px 14px;
  }

  .opi-transcript {
    padding: 10px;
  }

  .opi-suggestions-inner {
    padding: 0 10px 8px;
  }

  .opi-chat-composer {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .opi-reset-countdown-progress-fill,
  .opi-suggestions-shell,
  .opi-suggestions-inner,
  .opi-suggestion-button,
  .opi-composer-frame,
  .opi-send-button {
    transition: none;
  }

  .opi-entry-streaming .opi-bubble-assistant::after,
  .opi-typing-dots span {
    animation: none;
    opacity: 0.8;
  }
}
