/* Contact: enquiry form with "Attach yachts" beside it. */

/* pages.css sets .p-intro padding with a shorthand, which drops the .wrap gutter on the same element */
.wrap.p-intro { padding-left: var(--gutter); padding-right: var(--gutter); }
.next .btn { justify-self: start; }

.ct { padding-top: clamp(36px, 5vw, 56px); }
.ct-form {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); grid-template-rows: auto 1fr;
  gap: 28px clamp(32px, 5vw, 72px); align-items: start;
}
.ct-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.ct-q { grid-column: 1 / -1; }
.ct-q .textarea { min-height: 200px; }
.ct-actions { grid-column: 1; grid-row: 2; display: grid; gap: 4px; justify-items: start; }
.ct-actions .form-note { margin-top: 8px; }

/* ---------- attach panel ---------- */

.ct-attach {
  grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 14px; align-content: start;
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-raised);
}
.ct-attach > .field-label { margin-bottom: -6px; }
.ct-combo { position: relative; }
.ct-pop {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 6px);
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper-raised); box-shadow: var(--shadow);
  overflow: hidden;
}
.ct-list { list-style: none; margin: 0; padding: 6px; max-height: min(420px, 60vh); overflow-y: auto; overscroll-behavior: contain; }
.ct-opt {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 6px 8px; border-radius: 3px; cursor: pointer;
}
.ct-opt img, .ct-noimg { width: 56px; height: 42px; object-fit: cover; border-radius: 2px; background: var(--line); }
.ct-opt-text { display: grid; min-width: 0; line-height: 1.25; }
.ct-opt-text b { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-opt-text small { font-size: 0.75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-opt-price { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.ct-opt[aria-selected="true"] { background: var(--wash); box-shadow: inset 2px 0 0 var(--sky); }
.ct-opt:hover { background: var(--wash); }
.ct-none { padding: 12px 10px; color: var(--muted); font-size: 0.875rem; }
.ct-more { padding: 8px 14px 10px; border-top: 1px solid var(--line); color: var(--muted); }
.ct-more[hidden] { display: none; }

.ct-offer .btn { width: 100%; white-space: normal; min-height: 44px; padding: 8px 16px; }

.ct-chips { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ct-chips:empty { display: none; }
.ct-chip {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 8px 10px 8px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
}
.ct-chip-media { display: block; width: 96px; height: 72px; border-radius: 2px; overflow: hidden; background: var(--line); }
.ct-chip-media img { width: 100%; height: 100%; object-fit: cover; }
.ct-chip-text { display: grid; min-width: 0; line-height: 1.25; gap: 3px; }
.ct-chip-text a { font-family: var(--serif); font-size: 1.2rem; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-chip-text a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ct-chip-text small { font-size: 0.75rem; color: var(--muted); }
.ct-remove {
  border: 0; background: none; padding: 8px 4px; font-size: 0.8125rem; font-weight: 600; color: var(--sky-ink);
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.ct-remove:hover { color: var(--sky-ink-hover); }
@media (prefers-reduced-motion: no-preference) {
  .ct-chip.is-new { animation: ctIn .55s cubic-bezier(.16, 1, .3, 1) both; }
}
@keyframes ctIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.ct-empty { color: var(--muted); padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.ct-sent { color: var(--ink-2); }
.ct-fix { color: var(--ink-2); padding-top: 14px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .ct-form { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .ct-attach, .ct-actions { grid-column: auto; grid-row: auto; }
}
@media (max-width: 560px) {
  .ct-fields { grid-template-columns: minmax(0, 1fr); }
  .ct-attach { padding: 16px; }
  .ct-chip { grid-template-columns: 72px minmax(0, 1fr); }
  .ct-chip-media { width: 72px; height: 54px; grid-row: span 2; }
  .ct-remove { grid-column: 2; justify-self: start; padding: 2px 0 0; }
  .ct-opt { grid-template-columns: 48px minmax(0, 1fr); }
  .ct-opt img, .ct-noimg { width: 48px; height: 36px; }
  .ct-opt-price { display: none; }
}

