/* ==========================================================================
   create-project-modal.css — Orcheum CANONICAL "Create Project" component
   --------------------------------------------------------------------------
   The pop-up that initiates project creation, opened from the "New Project"
   button in the Projects Directory. The host owns nothing but the trigger;
   the component owns the overlay, the card, and every state.

   Faithful to the approved Figma frame (Projects — Create Project overlay,
   node 547:6476). Values come from the design-token layer (styles/tokens.css);
   the overlay/dim treatment matches the canonical share modal so every modal
   in the product enters the same way.
   ========================================================================== */

/* ------------------------------- overlay -------------------------------- */
/* Blurs and dims the page behind; keeps the card sharp and centered above. */
.oc-newproj {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(36, 37, 45, 0.12);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}
.oc-newproj.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms ease;
}

/* -------------------------------- card ---------------------------------- */
.oc-newproj__card {
  position: relative;
  width: 432px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 18px;
  background: var(--color-cream-50);
  border-radius: 16px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(8px) scale(0.985);
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.oc-newproj.is-open .oc-newproj__card { transform: none; }

.oc-newproj__inner {
  display: flex;
  flex-direction: column;
  gap: 19px;
}

/* ------------------------------- header --------------------------------- */
.oc-newproj__head {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.oc-newproj__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: var(--font-weight-medium);
  font-size: 24px;
  line-height: normal;
  letter-spacing: 0.24px;
  color: #000;
  word-break: break-word;
}
.oc-newproj__desc {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: var(--font-weight-normal);
  font-size: var(--text-xs);      /* 12px */
  line-height: normal;
  color: var(--color-text-secondary);
  word-break: break-word;
}

/* -------------------------------- fields -------------------------------- */
.oc-newproj__field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.oc-newproj__label {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-medium);
  font-size: var(--text-sm);      /* 14px */
  line-height: 24px;
  color: #000;
}

/* Title input — the "AI Chatbox" surface (card/background + 42px blur). */
.oc-newproj__input {
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--color-card-background);
  -webkit-backdrop-filter: blur(42px);
  backdrop-filter: blur(42px);
  font-family: var(--font-sans);
  font-weight: var(--font-weight-normal);
  font-size: var(--text-sm);      /* 14px */
  line-height: 1.25;
  color: var(--color-foreground);
}

/* Custom instructions — a flat #ebeded well; text starts at the top. */
.oc-newproj__textarea {
  box-sizing: border-box;
  width: 100%;
  height: 98px;
  padding: 12px;
  border: 0;
  border-radius: 6px;
  background: var(--color-textarea-bg);
  font-family: var(--font-sans);
  font-weight: var(--font-weight-normal);
  font-size: var(--text-sm);      /* 14px */
  line-height: 1.25;
  color: var(--color-foreground);
  resize: none;
}

.oc-newproj__input::placeholder,
.oc-newproj__textarea::placeholder {
  color: var(--color-card-placeholder);
  opacity: 1;                     /* Firefox dims placeholders by default. */
}

/* The composer's focus language, so every field in the product agrees. */
.oc-newproj__input:focus-visible,
.oc-newproj__textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--color-composer-border-focus);
}

/* ------------------------------- actions -------------------------------- */
/* Both buttons are the canonical .oc-btn; the row only splits the width. */
.oc-newproj__row {
  display: flex;
  gap: 12px;
}
.oc-newproj__row .oc-btn {
  flex: 1 0 0;
}

/* ------------------------- reduced motion ------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .oc-newproj,
  .oc-newproj__card { transition: opacity 120ms ease; }
  .oc-newproj__card { transform: none; }
}

/* ---------------------------- narrow screens ---------------------------- */
@media (max-width: 480px) {
  .oc-newproj {
    padding: 0;
    align-items: flex-end;
  }
  .oc-newproj__card {
    width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
