/* ==========================================================================
   project-content.css — Orcheum CANONICAL "Project Content" page
   --------------------------------------------------------------------------
   The page a project opens into: a back affordance, the project title with an
   Edit/Delete menu, and the project's conversations as a card grid. One
   reusable, presentation-agnostic component; the host owns width and mount.

   1:1 with Figma node 547:7905 (Project content) + 547:8610 (the options
   menu). The centred 700px column and 79.5px top offset match the Projects
   Directory (projects-index.css) so the two views sit in the same place.
   ========================================================================== */

/* Opaque #fbf7ef surface above .ws-main's Spectre backdrop, same as the
   directory — with that frame's 4% top vignette. */
.oc-pc {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 79.5px 28px 8px;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 762.7px 37.8px at 50% 0%,
      rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0) 100%),
    var(--color-background);
}

.oc-pc__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);          /* 32 — Figma 547:7907 */
  width: 700px;
  max-width: 100%;
}

/* ------------------------------- back ----------------------------------- */
.oc-pc__back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-sans);
  font-weight: var(--font-weight-medium);
  font-size: var(--text-xs);    /* 12 */
  line-height: 1.35;
  color: var(--color-foreground);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.oc-pc__back-icon { width: 18px; height: 18px; display: block; flex: 0 0 auto; }
.oc-pc__back:hover .oc-pc__back-label { text-decoration: underline; }

/* ------------------------------ header ---------------------------------- */
.oc-pc__header {
  display: flex;
  gap: 16px;
  align-items: center;
  width: 100%;
}
.oc-pc__title {
  flex: 1 0 0;
  min-width: 0;
  margin: 0;
  font-family: var(--font-serif);
  font-weight: var(--font-weight-normal);
  font-size: var(--text-3xl); /* 30 */
  line-height: 1.35;
  color: var(--color-foreground);
  word-break: break-word;
}

/* Options trigger — ⋯ in a 22px translucent square (Figma 547:8206). */
.oc-pc__menu-wrap {
  position: relative;
  flex: 0 0 auto;
}
.oc-pc__menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm); /* 4 */
  background: rgba(225, 229, 230, 0.5);
  cursor: pointer;
  transition: background 140ms ease;
}
.oc-pc__menu-trigger:hover { background: rgba(213, 218, 220, 0.85); }
.oc-pc__menu-trigger img { width: 16px; height: 16px; display: block; }

/* --------------------------- options menu ------------------------------- */
/* Figma 547:8610 — right-aligned to the trigger, opening downward. */
.oc-pc__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 9px 22px 8px;
  background: #eeeeeb;
  border: 1px solid #d5d9d9;
  border-radius: 12px;
  box-shadow: 0 3.38px 20.29px rgba(0, 0, 0, 0.04);
  -webkit-backdrop-filter: blur(35.5px);
  backdrop-filter: blur(35.5px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transform-origin: top right;
  transition: opacity 140ms ease, transform 140ms ease, visibility 0s linear 140ms;
}
.oc-pc__menu-wrap.is-open .oc-pc__menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 140ms ease, transform 140ms ease;
}
.oc-pc__menu-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-sans);
  font-weight: var(--font-weight-normal);
  font-size: var(--text-sm); /* 14 */
  line-height: 1.25;
  color: var(--color-foreground);
  white-space: nowrap;
  cursor: pointer;
}
.oc-pc__menu-item img { width: 14px; height: 14px; display: block; flex: 0 0 auto; }
.oc-pc__menu-item:hover .oc-pc__menu-label { text-decoration: underline; }

/* ------------------------------- divider -------------------------------- */
.oc-pc__rule {
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--color-card-separator);
  width: 100%;
}

/* -------------------------------- grid ---------------------------------- */
.oc-pc__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

/* Conversation card — Figma 547:8128. Transparent with the hairline
   separator, matching the directory's card treatment. */
.oc-pc__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--color-card-separator);
  border-radius: 16px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.oc-pc__card:hover { background: rgba(225, 229, 230, 0.28); }
.oc-pc__card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-background), 0 0 0 4px var(--color-puddle-700);
}
.oc-pc__card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
}
.oc-pc__card-title,
.oc-pc__card-sub {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: var(--text-sm); /* 14 */
  line-height: 1.25;
}
.oc-pc__card-title {
  font-weight: var(--font-weight-medium);
  color: var(--color-foreground);
}
.oc-pc__card-sub {
  font-weight: var(--font-weight-normal);
  color: var(--color-text-secondary);
}

.oc-pc__empty {
  grid-column: 1 / -1;
  padding: 4px 0;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-placeholder);
}

@media (prefers-reduced-motion: reduce) {
  .oc-pc__menu { transition: opacity 120ms ease; transform: none; }
}

/* Single column when the column can no longer hold two cards side by side. */
@media (max-width: 620px) {
  .oc-pc__grid { grid-template-columns: minmax(0, 1fr); }
}
