/* The 2026-11 look refresh — forms. Every rule starts with body.rf (see refresh-base.css). */

/* ═════════════ «פרויקט חדש» · «הגדרות קבוצה» (and «קבוצה חדשה»): the insides ═════════════
   The frame (head, the white body, the foot) is refresh-windows.css. Inside, the
   windows read like the «הגדרות הסרט» drawer in planning (refresh-plan.css):
   - a row of choices = ONE grey capsule, the chosen option white + a hairline;
   - «סגנון» and «איך בונים את הסרטון?» = grey tiles, the chosen one white + a
     1.5px teal ring;
   - a text field = white with a hairline, teal only while typing in it.
   The style-panel classes (.style-choice, .style-choice-grid--*, .style-prefs-grid)
   also build the planning drawer and the style tab, so every rule here is held to
   these windows: .np-modal = «פרויקט חדש», .ng-modal = «קבוצה חדשה» and
   «הגדרות קבוצה» (one shared builder, js/views/group-form.js). */

/* ── headings: one size for every part of the window, a smaller one inside ── */
body.rf .form-sheet:is(.np-modal, .ng-modal) .form-sheet-sec-title,
body.rf .form-sheet:is(.np-modal, .ng-modal) .form-sheet-sec > .style-section-label,
body.rf .form-sheet:is(.np-modal, .ng-modal) .ngroup-field > .style-section-label,
body.rf .form-sheet:is(.np-modal, .ng-modal) .gsetup-namebar-label {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .form-sheet-sec-sub {
  font-size: 12px;
  color: var(--text-3);
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-section {
  gap: 7px;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-section-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
}

/* ── text fields: white, a hairline round, teal only while typing ── */
body.rf .form-sheet:is(.np-modal, .ng-modal) .input,
body.rf .form-sheet:is(.np-modal, .ng-modal) .textarea {
  border: 1px solid var(--rf-line-2);
  border-radius: 10px;
  background-color: var(--rf-card);
  box-shadow: none;
  color: var(--text);
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .input:hover:not(:focus),
body.rf .form-sheet:is(.np-modal, .ng-modal) .textarea:hover:not(:focus) {
  border-color: var(--border-strong);
  background-color: var(--rf-card);
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .input:focus,
body.rf .form-sheet:is(.np-modal, .ng-modal) .textarea:focus {
  border-color: var(--accent);
  background-color: var(--rf-card);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* the name of the project / the group */
body.rf .form-sheet:is(.np-modal, .ng-modal) .input.input-big {
  height: 38px;
  min-height: 0;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* «הוראות קבועות» */
body.rf .form-sheet:is(.np-modal, .ng-modal) .style-instructions-input {
  min-height: 58px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.45;
}

/* ── «איך בונים את הסרטון?»: three grey cards, the chosen one white + a teal ring ── */
body.rf .form-sheet.np-modal .np-route-grid {
  gap: 8px;
}

body.rf .form-sheet.np-modal .np-route-grid > .style-choice {
  min-height: 0;
  padding: 9px 12px 10px;
  gap: 2px;
  border: 0;
  border-radius: 12px;
  background: var(--rf-grey);
  box-shadow: none;
}

body.rf .form-sheet.np-modal .np-route-grid > .style-choice:hover:not(.active) {
  background: var(--rf-grey-2);
}

body.rf .form-sheet.np-modal .np-route-grid > .style-choice.active {
  background: var(--rf-card);
  box-shadow: 0 0 0 1.5px var(--accent);
}

body.rf .form-sheet.np-modal .np-route-grid .style-choice-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

body.rf .form-sheet.np-modal .np-route-grid .style-choice-hint {
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-3);
}

/* ── «סגנון»: grey tiles with the swatch, the chosen one white + a teal ring ── */
body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice-grid--styles {
  gap: 8px;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--with-swatch {
  min-width: 0;
  min-height: 44px;
  height: auto;
  padding: 7px 9px;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: var(--rf-grey);
  box-shadow: none;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--with-swatch:hover:not(.active) {
  border: 0;
  background: var(--rf-grey-2);
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--with-swatch.active {
  background: var(--rf-card);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--with-swatch .style-choice-swatch {
  width: 40px;
  height: 30px;
  border-radius: 7px;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--with-swatch.active .style-choice-swatch {
  border-color: transparent;
  box-shadow: none;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--with-swatch .style-choice-text {
  gap: 1px;
  min-width: 0;
  max-width: 100%;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--with-swatch .style-choice-label,
body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--with-swatch .style-choice-hint {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--with-swatch .style-choice-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--with-swatch .style-choice-hint {
  font-size: 11px;
  color: var(--text-3);
}

/* ── the preferences: no hairlines between them, a little air instead ── */
body.rf .form-sheet:is(.np-modal, .ng-modal) .style-prefs-grid {
  gap: 14px 16px;
  padding-top: 6px;
  border-top: 0;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-prefs-grid > .style-section + .style-section {
  padding-inline-start: 0;
  padding-top: 0;
  border-inline-start: 0;
  border-top: 0;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-section--instructions {
  padding-top: 6px;
  border-top: 0;
}

/* ── every row of choices: ONE grey capsule, the chosen option white + a hairline ──
   «אנשים בתמונה» · «שפת תוכן» · «קהילה» · «עונה» · «יחס תמונה» · «קבוצה» */
body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice-grid:is(.style-choice-grid--2, .style-choice-grid--season, .style-choice-grid--aspect),
body.rf .form-sheet.np-modal .form-sheet-pills {
  gap: 2px;
  padding: 3px;
  border: 0;
  border-radius: 11px;
  background: var(--rf-grey);
}

/* «קבוצה»: the capsule as wide as its names, not the whole row */
body.rf .form-sheet.np-modal .form-sheet-pills {
  display: inline-flex;
  flex-wrap: wrap;
  align-self: flex-start;
  max-width: 100%;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) :is(.style-choice-grid--2, .style-choice-grid--season, .style-choice-grid--aspect) > .style-choice,
body.rf .form-sheet.np-modal .form-sheet-pill {
  min-width: 0;
  min-height: 30px;
  height: auto;
  padding: 3px 10px;
  gap: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) :is(.style-choice-grid--2, .style-choice-grid--season, .style-choice-grid--aspect) > .style-choice:hover:not(.active),
body.rf .form-sheet.np-modal .form-sheet-pill:hover:not(.active) {
  border: 0;
  background: color-mix(in srgb, var(--rf-card) 55%, transparent);
  color: var(--text);
}

body.rf .form-sheet:is(.np-modal, .ng-modal) :is(.style-choice-grid--2, .style-choice-grid--season, .style-choice-grid--aspect) > .style-choice.active,
body.rf .form-sheet.np-modal .form-sheet-pill.active {
  border: 0;
  background: var(--rf-card);
  box-shadow: var(--rf-raise);
  color: var(--text);
}

body.rf .form-sheet:is(.np-modal, .ng-modal) :is(.style-choice-grid--2, .style-choice-grid--season, .style-choice-grid--aspect) > .style-choice .style-choice-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 15px;
  letter-spacing: 0;
  color: inherit;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) :is(.style-choice-grid--2, .style-choice-grid--season, .style-choice-grid--aspect) > .style-choice.active .style-choice-label {
  color: var(--text);
}

/* «ברירת מחדל», «מסך רחב»…: kept — a small muted line under the name */
body.rf .form-sheet:is(.np-modal, .ng-modal) :is(.style-choice-grid--2, .style-choice-grid--aspect) > .style-choice .style-choice-hint {
  font-size: 10.5px;
  font-weight: 500;
  line-height: 13px;
  color: var(--text-3);
  white-space: nowrap;
}

/* «יחס תמונה»: the frame beside the name, not over it — four in one row, a phone too */
body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice-grid--aspect {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice-grid--aspect > .style-choice--aspect {
  display: grid;
  grid-template-columns: auto auto;
  grid-auto-rows: auto;
  column-gap: 8px;
  row-gap: 0;
  justify-content: center;
  align-content: center;
  align-items: center;
  justify-items: start;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--aspect .style-aspect-icon {
  grid-row: 1 / span 2;
  justify-self: center;
  border-width: 1.5px;
  border-radius: 3px;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--aspect .style-aspect-icon--16x9 {
  width: 22px;
  height: 13px;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--aspect .style-aspect-icon--9x16 {
  width: 12px;
  height: 20px;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--aspect .style-aspect-icon--1x1 {
  width: 16px;
  height: 16px;
}

body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--aspect .style-aspect-icon--4x3 {
  width: 19px;
  height: 14px;
}

/* «עונה»: five even parts of one capsule */
body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice-grid--season > .style-choice {
  flex: 1 1 0;
  min-width: max-content;
}

/* ═════════════ «הגדרות קבוצה»: the name, the projects, the three boxes ═════════════ */

/* «הגדרות הסרט» stands as far from the boxes as every other part of the window */
body.rf .form-sheet.ng-modal .gsetup {
  gap: 22px;
}

/* the name and the red bin beside it */
body.rf .form-sheet.ng-modal .gsetup-namebar {
  gap: 7px;
}

body.rf .form-sheet.ng-modal .gsetup-namebar-row {
  align-items: center;
  gap: 6px;
}

body.rf .form-sheet.ng-modal .btn.btn-ghost.gsetup-namebar-delete {
  width: 38px;
  height: 38px;
  align-self: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: var(--red);
}

body.rf .form-sheet.ng-modal .btn.btn-ghost.gsetup-namebar-delete:hover {
  background: var(--rf-danger-soft);
  color: var(--red);
}

/* its «מחק קבוצה» tip opens toward the field, so the narrower bin does not push
   the window sideways on a phone */
body.rf .form-sheet.ng-modal .gsetup-namebar-delete[data-tooltip]::after {
  left: auto;
  right: auto;
  inset-inline-end: 0;
  transform: none;
}

/* «הפרויקטים»: quiet grey chips — the cover, the name, a red bin */
body.rf .form-sheet.ng-modal .gsetup-projects {
  gap: 6px;
}

body.rf .form-sheet.ng-modal .gsetup-pchip {
  max-width: 220px;
  height: 30px;
  padding: 3px;
  gap: 2px;
  border: 0;
  border-radius: 9px;
  background: var(--rf-grey);
  box-shadow: none;
  color: var(--text);
}

body.rf .form-sheet.ng-modal .gsetup-pchip:hover {
  border: 0;
  background: var(--rf-grey-2);
  color: var(--text);
}

body.rf .form-sheet.ng-modal .gsetup-pchip-open {
  gap: 7px;
  padding-block: 0;
  padding-inline: 1px 6px;
}

body.rf .form-sheet.ng-modal .gsetup-pchip-thumb {
  width: 28px;
  height: 22px;
  border-radius: 6px;
  background: var(--rf-card);
}

body.rf .form-sheet.ng-modal .gsetup-pchip-name {
  font-size: 12px;
  font-weight: 600;
}

body.rf .form-sheet.ng-modal .gsetup-pchip-delete {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: var(--red);
}

body.rf .form-sheet.ng-modal .gsetup-pchip-delete:hover {
  background: var(--rf-danger-soft);
  color: var(--red);
}

body.rf .form-sheet.ng-modal .gsetup-pchip-delete svg {
  width: 13px;
  height: 13px;
}

/* «דמויות» · «מקומות» · «תמונות עוקבות»: grey boxes, white quiet buttons */
body.rf .form-sheet.ng-modal .gsetup-cats {
  gap: 10px;
}

body.rf .form-sheet.ng-modal .gsetup-cat {
  gap: 8px;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--rf-grey);
  box-shadow: none;
}

body.rf .form-sheet.ng-modal .gsetup-cat-head {
  gap: 2px;
}

body.rf .form-sheet.ng-modal .gsetup-cat-title {
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

body.rf .form-sheet.ng-modal .gsetup-cat-title .ui-icon {
  color: var(--text-3);
}

body.rf .form-sheet.ng-modal .gsetup-cat-sub {
  font-size: 12px;
  color: var(--text-3);
}

body.rf .form-sheet.ng-modal .gsetup-tiles {
  gap: 6px;
}

body.rf .form-sheet.ng-modal .gsetup-empty {
  padding: 6px 2px 2px;
  font-size: 12px;
  color: var(--text-3);
}

body.rf .form-sheet.ng-modal .gsetup-tile {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 8px;
}

body.rf .form-sheet.ng-modal .gsetup-thumb {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--rf-card);
}

body.rf .form-sheet.ng-modal .gsetup-name-input {
  height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12.5px;
}

body.rf .form-sheet.ng-modal .gsetup-remove {
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--text-3);
}

body.rf .form-sheet.ng-modal .gsetup-remove:hover {
  background: var(--rf-card);
  color: var(--text);
}

body.rf .form-sheet.ng-modal .gsetup-addbar {
  gap: 6px;
}

body.rf .form-sheet.ng-modal .gsetup-addbar .btn {
  gap: 6px;
  height: 30px;
  min-height: 0;
  padding: 0 12px;
  border: 1px solid var(--rf-line);
  border-radius: 9px;
  background: var(--rf-card);
  box-shadow: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

body.rf .form-sheet.ng-modal .gsetup-addbar .btn:hover:not(:disabled) {
  border-color: var(--rf-line-2);
  background: var(--rf-card);
  color: var(--text);
}

body.rf .form-sheet.ng-modal .gsetup-addbar .btn .ui-icon {
  color: var(--text-3);
}

/* ── the keyboard: a teal outline on the option in focus ── */
body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice:focus-visible,
body.rf .form-sheet.np-modal .form-sheet-pill:focus-visible,
body.rf .form-sheet.ng-modal :is(.gsetup-pchip-open, .gsetup-pchip-delete, .gsetup-namebar-delete):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ── dark: the chosen option a step lighter than the capsule, so it still reads ── */
[data-theme="dark"] body.rf .form-sheet:is(.np-modal, .ng-modal) :is(.style-choice-grid--2, .style-choice-grid--season, .style-choice-grid--aspect) > .style-choice.active,
[data-theme="dark"] body.rf .form-sheet.np-modal .form-sheet-pill.active {
  background: var(--surface-hover);
}

/* ── phone ── */
@media (max-width: 768px) {
  /* 16px in a field stops iOS from zooming in on it */
  body.rf .form-sheet:is(.np-modal, .ng-modal) .input,
  body.rf .form-sheet:is(.np-modal, .ng-modal) .textarea,
  body.rf .form-sheet:is(.np-modal, .ng-modal) .input.input-big {
    font-size: 16px;
  }

  body.rf .form-sheet:is(.np-modal, .ng-modal) .input.input-big {
    height: 40px;
  }

  /* a finger needs a little more than a mouse */
  body.rf .form-sheet:is(.np-modal, .ng-modal) :is(.style-choice-grid--2, .style-choice-grid--season, .style-choice-grid--aspect) > .style-choice,
  body.rf .form-sheet.np-modal .form-sheet-pill {
    min-height: 34px;
  }

  body.rf .form-sheet:is(.np-modal, .ng-modal) .style-prefs-grid {
    gap: 12px;
  }

  body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--with-swatch .style-choice-swatch {
    width: 34px;
    height: 26px;
  }

  body.rf .form-sheet:is(.np-modal, .ng-modal) .style-choice--with-swatch {
    gap: 8px;
    padding: 6px 8px;
  }
}
