/* AllFours.tt – contact form popup */
.ct-dlg {
  margin: auto; inset: 0; width: min(620px, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); padding: 0;
  border: 1px solid var(--border-strong); border-radius: 22px; background: var(--card); color: var(--text);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75); overflow: auto; overscroll-behavior: contain;
}
.ct-dlg[open] { animation: ct-in .3s cubic-bezier(.2, .9, .25, 1.05); }
.ct-dlg::backdrop { background: rgba(4, 18, 12, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@keyframes ct-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.ct-in { position: relative; padding: 1.6rem 1.5rem 1.4rem; }
.ct-x { position: absolute; top: .8rem; right: .8rem; width: 36px; height: 36px; border: 0; border-radius: 10px; cursor: pointer;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); font-size: 1.4rem; line-height: 1; }
.ct-x:hover { background: color-mix(in srgb, var(--text) 16%, transparent); }
.ct-dlg h2 { margin: 0 2.5rem .25rem 0; font-family: var(--display); font-weight: 600; font-size: clamp(1.45rem, 4vw, 1.8rem); }
.ct-lead { margin: 0 0 1.1rem; color: var(--muted); }

.ct-form { display: grid; gap: .85rem; }
.ct-form[hidden] { display: none; }
.ct-two { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.ct-player, .ct-org { display: none; }
.ct-dlg.is-player .ct-player { display: grid; }
.ct-dlg.is-org .ct-org { display: block; }
.ct-f label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: .3rem; }
.ct-f label small { font-weight: 500; color: var(--muted); }
.ct-f input, .ct-f select, .ct-f textarea {
  width: 100%; padding: .68rem .85rem; border-radius: 12px; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); transition: border-color .15s, box-shadow .15s;
}
.ct-f select { appearance: none; -webkit-appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23889' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; }
.ct-f textarea { resize: vertical; min-height: 7.5rem; }
.ct-f input:focus, .ct-f select:focus, .ct-f textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.ct-f.bad input, .ct-f.bad select, .ct-f.bad textarea { border-color: var(--red); }
.ct-err { margin: .3rem 0 0; font-size: .82rem; color: var(--red); min-height: 0; }
.ct-err:empty { display: none; }
.ct-f[data-f="email"]:not(.bad) .ct-err { color: var(--muted); }
.ct-fix { font: inherit; font-weight: 700; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.ct-hint { margin: -.35rem 0 0; font-size: .85rem; color: var(--muted); }
.ct-hint:empty { display: none; }
.ct-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ct-cap { min-height: 65px; }
.ct-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ct-privacy { margin: 0; flex: 1 1 220px; font-size: .8rem; color: var(--muted); }
.ct-privacy a { color: inherit; }
.ct-send[disabled] { opacity: .65; cursor: progress; }
.ct-preview { margin: 0; font-size: .78rem; color: var(--muted); text-align: center; font-style: italic; }

.ct-done { text-align: center; padding: 1.4rem 0 .6rem; }
.ct-done[hidden] { display: none; }
.ct-tick { width: 64px; height: 64px; margin: 0 auto .8rem; display: grid; place-items: center; border-radius: 50%; color: #fff;
  background: linear-gradient(160deg, #23a35f, #157a44); box-shadow: 0 12px 26px -12px rgba(21, 122, 68, .9); animation: ct-pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes ct-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.ct-done h3 { margin: 0 0 .3rem; font-family: var(--display); font-weight: 600; font-size: 1.5rem; }
.ct-done p { margin: 0 0 1rem; color: var(--muted); }
.ct-dlg .btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }

@media (max-width: 560px) {
  .ct-in { padding: 1.3rem 1.1rem 1.1rem; }
  .ct-two, .ct-dlg.is-player .ct-player { grid-template-columns: minmax(0, 1fr); }
  .ct-foot .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ct-dlg[open], .ct-tick { animation: none; } }
