/* A miniature app, scaled as one interface from the supplied Codex reference.
   Keep proportions in cqw: pixel minimums make the sidebar look zoomed in. */
.laptop-frame .codex-preview {
  --codex-rail: 3.8%;
  --codex-sidebar: 28%;
  display: grid;
  grid-template-columns: var(--codex-rail) var(--codex-sidebar) minmax(0, 1fr);
  grid-template-rows: 5.1% minmax(0, 1fr);
  overflow: hidden;
  background: #ecebee;
  color: #424246;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  container: codex / inline-size;
}

.codex-preview svg {
  display: block;
  flex-shrink: 0;
  width: 1.6cqw;
  height: 1.6cqw;
  fill: currentColor;
  stroke: none;
}

.codex-topbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--codex-rail) var(--codex-sidebar) minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  background: #ecebee;
}

.codex-topbar-leading {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 2cqw;
  min-width: 0;
  padding-inline: 1cqw;
}

.codex-topbar .traffic-lights { width: auto; gap: .65cqw; }
.codex-topbar .traffic-lights i { width: 1.15cqw; height: 1.15cqw; border-width: .1cqw; }
.codex-history { display: flex; align-items: center; gap: 1.25cqw; color: #939397; }
.codex-history svg { width: 1.4cqw; height: 1.4cqw; }
.codex-history svg:nth-child(2) { opacity: .4; }

.codex-topbar-title {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: .8cqw;
  min-width: 0;
  padding-inline: 1.7cqw;
  color: #414145;
}

.codex-topbar-title > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.42cqw;
  font-weight: 500;
  letter-spacing: -.015cqw;
}

.codex-topbar-title > svg { width: 1.55cqw; height: 1.55cqw; }
.codex-topbar-actions { display: flex; gap: 1.5cqw; margin-left: auto; padding-left: 1cqw; color: #89898d; }
.codex-topbar-actions svg { width: 1.55cqw; height: 1.55cqw; }

.codex-rail {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25cqw;
  padding: 1cqw .25cqw;
  color: #919195;
}

.codex-rail > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3cqw;
  height: 3.15cqw;
  border-radius: .7cqw;
}

.codex-rail svg { width: 1.85cqw; height: 1.85cqw; }
.codex-rail .codex-rail-active { color: #31383c; background: #dedde2; }
.codex-rail .codex-rail-profile { width: 2.1cqw; height: 2.1cqw; margin-top: auto; border-radius: 50%; background: #8c9799; color: white; font-size: .95cqw; }

.laptop-frame .codex-sidebar {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-right: .1cqw solid #e6e6e8;
  border-radius: 1cqw 0 0 0;
  background: #f7f7f8;
}

.laptop-frame .codex-brand {
  display: flex;
  align-items: center;
  gap: .65cqw;
  flex-shrink: 0;
  min-height: 4.9cqw;
  margin: 0;
  padding: 0 1.45cqw;
  font-size: 1.8cqw;
  color: #49494c;
}

.codex-brand > strong { font-weight: 600; letter-spacing: -.04cqw; }
.codex-brand > svg { width: 1.1cqw; height: 1.1cqw; color: #96969a; }
.codex-sidebar-tools { display: flex; align-items: center; gap: 1.25cqw; margin-left: auto; color: #96969a; }
.codex-sidebar-tools svg { width: 1.55cqw; height: 1.55cqw; }

.codex-new-chat {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 1.1cqw;
  min-height: 3.65cqw;
  margin-bottom: 1.6cqw;
  padding: 0 1.45cqw;
  font-size: 1.5cqw;
  color: #535357;
}

.codex-new-chat svg { width: 1.65cqw; height: 1.65cqw; }

.codex-preview .conversation-list {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 0 .65cqw .9cqw;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #e2e2e5 transparent;
}

.codex-preview .project-group + .project-group { margin-top: 1.3cqw; }
.codex-preview .project-group h3 {
  display: flex;
  align-items: center;
  gap: 1.05cqw;
  height: 3.25cqw;
  margin: 0;
  padding: 0 .8cqw;
  font-size: 1.5cqw;
  font-weight: 400;
  letter-spacing: -.01cqw;
  color: #4f4f53;
}

.codex-preview .project-folder { display: flex; color: #757579; }
.codex-preview .project-folder svg { width: 1.65cqw; height: 1.65cqw; }

.codex-preview .conversation-button {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  min-height: 3.25cqw;
  height: 3.25cqw;
  margin: 0;
  padding: .55cqw .9cqw .55cqw 3.5cqw;
  border: 0;
  border-radius: .7cqw;
  background: transparent;
  color: #56565a;
  text-align: left;
  font-size: 1.5cqw;
  font-weight: 400;
  letter-spacing: -.015cqw;
  line-height: 1.3;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

/* The labels, like native Codex rows, stay on one line. Each button keeps its
   full accessible name and native title; the larger project controls sit above. */
.codex-preview .conversation-button .conversation-button-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

.codex-preview .conversation-button:hover { background: #e8e8eb; color: #303035; }
.codex-preview .conversation-button[aria-pressed=true] { background: #e9e9eb; color: #343438; font-weight: 400; }
.codex-preview .conversation-button:focus-visible { outline: 1px solid #377ff4; outline-offset: -1px; background: #edf3fc; }

.laptop-frame .codex-conversation {
  grid-column: 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0 1cqw 0 0;
  background: #fff;
}

.codex-preview .conversation-body {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 4cqw 3.6cqw 1.5cqw;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #e1e1e4 transparent;
  font-size: 1.6cqw;
  line-height: 1.6;
}

.codex-preview .message-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.codex-preview .user-message { display: flex; justify-content: flex-end; margin-bottom: 4.8cqw; }
.codex-preview .user-message p {
  max-width: 88%;
  width: fit-content;
  margin: 0;
  padding: 1.35cqw 1.65cqw;
  border: 0;
  border-radius: 1.5cqw;
  background: #edf4fc;
  color: #3b526b;
  font-size: inherit;
  line-height: 1.55;
  text-wrap: pretty;
}

.codex-activity { display: flex; align-items: center; gap: .8cqw; margin: 0 0 1.45cqw; color: #949499; font-size: 1.25cqw; }
.codex-activity svg { width: 1.3cqw; height: 1.3cqw; }
.codex-preview .assistant-message { display: block; margin: 0; }
.codex-preview .assistant-message p { margin: 0; color: #3e3e44; font-size: inherit; line-height: 1.65; text-wrap: pretty; }

.codex-preview .context-files {
  display: flex;
  flex-wrap: wrap;
  gap: .8cqw 1.7cqw;
  margin: 1.8cqw 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.codex-preview .codex-file-row { display: flex; align-items: center; gap: .55cqw; min-width: 0; color: #5e7eae; }
.codex-preview .codex-file-row svg { width: 1.3cqw; height: 1.3cqw; }
.codex-preview .codex-file-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  white-space: nowrap;
  font-family: inherit;
  font-size: 1.25cqw;
}
.codex-preview .codex-file-row small { display: none; }
.codex-response-actions { display: flex; align-items: center; gap: 1.25cqw; margin-top: 2.2cqw; color: #9b9ba0; }
.codex-response-actions svg { width: 1.4cqw; height: 1.4cqw; }

.codex-composer-area { flex-shrink: 0; padding: 1cqw 2.4cqw 2cqw; background: #fff; }
.codex-preview .mock-composer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 2.4cqw;
  position: static;
  width: 100%;
  height: auto;
  min-height: 10.5cqw;
  max-width: none;
  margin: 0;
  padding: 1.5cqw 1.7cqw 1.25cqw;
  border: .12cqw solid #e9e9ec;
  border-radius: 2.3cqw;
  background: #fff;
  box-shadow: 0 .25cqw 1cqw #22222205;
  color: #929298;
  font-size: 1.45cqw;
  line-height: 1.4;
}

.codex-preview #composer-placeholder { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.composer-tools { display: flex; align-items: center; gap: 1.35cqw; width: 100%; }
.composer-attach { color: #717175; }
.composer-attach svg { width: 1.85cqw; height: 1.85cqw; }
.codex-preview .composer-model { display: flex; align-items: center; gap: .65cqw; position: static; margin: 0 0 0 auto; color: #6f6f76; font-size: 1.25cqw; }
.composer-model svg { width: 1.45cqw; height: 1.45cqw; }
.composer-model > svg:last-child { width: 1.15cqw; height: 1.15cqw; }
.composer-effort { color: #9b7fdc; font-size: 1.2cqw; }
.composer-microphone { color: #7b7b80; }
.composer-microphone svg { width: 1.55cqw; height: 1.55cqw; }
.codex-preview .composer-send { display: grid; place-items: center; width: 3cqw; height: 3cqw; flex-shrink: 0; margin: 0; border-radius: 50%; background: #3785ff; color: white; }
.composer-send svg { width: 1.85cqw; height: 1.85cqw; }

@media (prefers-reduced-motion: reduce) {
  .codex-preview .conversation-button { transition: none; }
}
