/* A visit on a personal device or a shared laptop: the contact form after the intro, the
   "Ukončiť návštevu" button in the header and the "Ste tu ešte?" question.
   Tokens, buttons, fields and the rise keyframes come from dashboard.css. */

/* The dashboard waits hidden behind the contact form; its wrapper adds no box. */
.dashboard { display: contents; }
.dashboard[hidden] { display: none; }
.welcome h1:focus, .visit-gate h1:focus { outline: none; }

/* Header */
.header-side { display: flex; align-items: center; gap: 18px; }
.visit-end[hidden] { display: none; }
.visit-end-button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px 8px 13px; border: 1px solid #b9d9cf; border-radius: 100px; background: rgb(255 255 255 / 85%); color: var(--deep-teal); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer; box-shadow: 0 10px 22px -16px rgb(6 71 67 / 45%); transition: background-color .2s ease, border-color .2s ease; }
.visit-end-button svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--teal); stroke-width: 2; }
.visit-end-button:hover { border-color: var(--teal); background: #f1f8f5; }
.visit-end-button:focus-visible { outline: 3px solid var(--deep-teal); outline-offset: 3px; }

/* Contact form */
.visit-gate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 56px; align-items: center; padding: 30px 0 26px; perspective: 1400px; }
.visit-intro .welcome-description { max-width: 520px; margin-top: 12px; }
.steps { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 12px; max-width: 520px; color: var(--deep-teal); font-size: 15px; font-weight: 500; line-height: 1.45; }
.step-number { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: #e8f5f0; color: var(--teal); font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 1px #c8e5df; }

.form-card { padding: 26px; border: 1px solid var(--border); border-radius: 22px; background: white; box-shadow: 0 18px 44px -34px rgb(6 71 67 / 32%), 0 2px 6px rgb(6 71 67 / 3%); transition: box-shadow .4s ease, border-color .3s ease; }
.form-card:focus-within { border-color: #b4dbd0; box-shadow: 0 26px 56px -36px rgb(6 71 67 / 45%), 0 2px 6px rgb(6 71 67 / 3%); }
.form-card h2 { font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
.form-hint { margin-top: 4px; color: var(--muted); font-size: 13px; }
.form-card .error-summary { margin-top: 16px; }
.error-summary[hidden] { display: none; }
.visit-status { margin-top: 16px; padding: 12px 14px; border: 1px solid #ffd9a8; border-radius: 12px; background: #fff7ec; color: #6b3b00; font-size: 14px; line-height: 1.5; }
.contact-form { display: grid; gap: 16px; margin-top: 18px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.privacy-note { padding: 14px 16px; border-radius: 12px; background: #f1f8f5; color: var(--text); font-size: 13px; line-height: 1.55; }
.privacy-note h3 { margin: 0 0 4px; color: var(--deep-teal); font-size: 14px; }
.privacy-note p + p { margin-top: 6px; }
.privacy-note a { color: var(--teal); font-weight: 600; }
.contact-form .button-primary { width: 100%; }

/* "Ste tu ešte?" Only a tint behind it, a blur would cost the weak booth laptops frames. */
.visit-idle { width: min(470px, calc(100% - 32px)); padding: 28px; border: 0; border-radius: 22px; background: white; color: var(--deep-teal); box-shadow: 0 40px 80px -40px rgb(6 71 67 / 65%); }
.visit-idle::backdrop { background: rgb(6 71 67 / 34%); }
.visit-idle h2 { font-size: 26px; font-weight: 700; letter-spacing: -.6px; }
.visit-idle h2:focus { outline: none; }
.visit-idle p { margin-top: 10px; color: var(--text); font-size: 15px; line-height: 1.55; }
.visit-idle .visit-idle-count { color: var(--deep-teal); font-weight: 600; }
.visit-idle-count strong { color: var(--teal); font-variant-numeric: tabular-nums; }
.visit-idle .visit-idle-new { color: var(--muted); font-size: 13px; }
.visit-idle-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.visit-idle-actions .button-primary { flex: 1 1 auto; }

@media (prefers-reduced-motion: no-preference) {
    .visit-end:not([hidden]) { animation: rise .6s var(--ease-out) both; }
    .visit-intro > :not(.steps) { animation: rise .7s var(--ease-out) both; }
    .visit-intro > :nth-child(2) { animation-delay: .06s; }
    .visit-intro > :nth-child(3) { animation-delay: .18s; }
    .steps li { animation: rise .6s var(--ease-out) both; }
    .steps li:nth-child(1) { animation-delay: .5s; }
    .steps li:nth-child(2) { animation-delay: .62s; }
    .steps li:nth-child(3) { animation-delay: .74s; }
    /* The card flies in from the depth, turned towards the page, and settles. */
    .visit-card { transform-origin: 70% 100%; animation: visit-fly-in 1.15s var(--ease-out) .1s both; }
    .visit-card .field, .visit-card .privacy-note, .visit-card .button-primary { animation: rise .6s var(--ease-out) both; }
    .visit-card .field-row:nth-of-type(1) .field { animation-delay: .5s; }
    .visit-card .field-row:nth-of-type(2) .field { animation-delay: .6s; }
    .visit-card .privacy-note { animation-delay: .7s; }
    .visit-card .button-primary { animation-delay: .8s; }
    .visit-gate.is-leaving .visit-card { animation: visit-fly-out .42s cubic-bezier(.55, 0, .75, .2) both; }
    .visit-gate.is-leaving .visit-intro { animation: visit-fade-out .3s ease both; }
    .visit-idle[open] { animation: visit-pop .4s var(--ease-spring) both; }
}

@keyframes visit-fly-in {
    0% { opacity: 0; transform: translate3d(160px, 70px, -360px) rotateY(-26deg) rotateX(12deg); }
    45% { opacity: 1; }
    100% { opacity: 1; transform: none; }
}
@keyframes visit-fly-out { to { opacity: 0; transform: translate3d(0, -50px, -260px) rotateX(-12deg); } }
@keyframes visit-fade-out { to { opacity: 0; translate: 0 -12px; } }
@keyframes visit-pop { from { opacity: 0; scale: .94; } }

@media (max-width: 1050px) {
    .visit-gate { gap: 32px; }
}

@media (max-width: 900px) {
    .visit-gate { grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
}

@media (max-width: 760px) {
    .header-side { gap: 10px; }
    .visit-end-button { min-height: 38px; padding: 7px 13px 7px 11px; font-size: 13px; }
    .visit-gate { padding: 24px 0 20px; }
    .steps { margin-top: 20px; }
    .field-row { grid-template-columns: minmax(0, 1fr); }
    .form-card { padding: 20px; }
    .visit-idle { padding: 22px; }
    .visit-idle-actions .button-primary, .visit-idle-actions .button-secondary { flex: 1 1 100%; }
}

/* Laptops with a visible browser toolbar: the whole form fits without scrolling. */
@media (min-width: 1000px) and (max-height: 800px) {
    .visit-gate { padding: 20px 0 18px; }
    .steps { gap: 10px; margin-top: 20px; }
    .form-card { padding: 22px 24px; }
    .contact-form { gap: 13px; margin-top: 14px; }
}

@media (min-width: 1000px) and (max-height: 700px) {
    .visit-gate { padding: 12px 0 12px; }
    .steps { gap: 8px; margin-top: 16px; }
    .steps li { font-size: 14px; }
    .step-number { width: 26px; height: 26px; font-size: 13px; }
    .form-card { padding: 18px 22px; }
    .form-card h2 { font-size: 20px; }
    .contact-form { gap: 11px; margin-top: 12px; }
    .field { gap: 5px; }
    .field input { min-height: 44px; padding-block: 9px; }
    .privacy-note { padding: 10px 14px; font-size: 12.5px; line-height: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
    .visit-card { transform: none; }
}
