/* ============================================================================
   Espaço Pet Dani · tela de agendamento
   Mesmos tokens, fontes e botões do site (site.css). Aqui só o que é da tela:
   painel da marca, campos, opções em cartão, dias e horários, revisão.
   ========================================================================== */

.ag-body { min-height: 100svh; display: flex; flex-direction: column; }

/* ------------------------------------------------------------- topo ---- */
.ag-top {
  position: relative; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: .75rem var(--sc-gutter, 1.25rem); border-bottom: 1px solid var(--line); background: var(--bg);
}
.ag-voltar { justify-self: start; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9rem; }
.ag-voltar svg { width: 18px; height: 18px; transition: transform 380ms var(--sc-ease-out); }
.ag-marca { display: inline-flex; align-items: center; min-height: 44px; gap: .6rem; color: var(--ink); text-decoration: none; font: 500 1.1rem/1 var(--sc-font-display); }
.ag-marca img { width: 30px; height: auto; border-radius: 6px; }
.ag-tel { justify-self: end; display: inline-flex; align-items: center; min-height: 44px; padding: 0 .95rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .85rem; transition: box-shadow 160ms var(--sc-ease-out); }
@media (hover: hover) and (pointer: fine) {
  .ag-voltar:hover svg { transform: translateX(-3px); }
  .ag-tel:hover { box-shadow: inset 0 0 0 1px var(--ink); }
}

/* ------------------------------------------------------------ layout ---- */
.ag { flex: 1; display: grid; grid-template-columns: minmax(20rem, .85fr) 1.15fr; }

/* painel da marca */
.ag-lado { background: var(--bg-2); border-right: 1px solid var(--line); }
.ag-lado__in { position: sticky; top: 0; min-height: calc(100svh - 66px); display: flex; flex-direction: column; gap: 1.4rem; padding: clamp(2.5rem, 6vh, 4rem) clamp(1.5rem, 4vw, 4rem) 2rem; }
.ag-h1 { font: 500 clamp(2.1rem, 1.5rem + 2vw, 3.3rem)/1.06 var(--sc-font-display); letter-spacing: -0.015em; font-variation-settings: "opsz" 120; }
.ag-h1 em { font-style: italic; text-decoration: underline; text-decoration-color: var(--amarelo); text-decoration-thickness: 2px; text-underline-offset: 7px; }
.ag-lede { color: var(--ink-soft); max-width: 26rem; }

.ag-passos { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .1rem; }
.ag-passos button {
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: .85rem; width: 100%; min-height: 44px; padding: .2rem .4rem; border-radius: 12px;
  color: var(--ink-soft); font-weight: 600; font-size: .95rem; cursor: default;
}
.ag-passos__n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .78rem; font-weight: 700; box-shadow: inset 0 0 0 1px var(--line-2); background: transparent; transition: background-color 300ms var(--sc-ease-out), color 300ms var(--sc-ease-out), box-shadow 300ms var(--sc-ease-out); }
.ag-passos li.is-feito button { color: var(--ink); cursor: pointer; }
.ag-passos li.is-feito .ag-passos__n { background: var(--ink); color: #fff; box-shadow: none; }
.ag-passos li.is-atual button { color: var(--ink); font-weight: 700; }
.ag-passos li.is-atual .ag-passos__n { background: var(--amarelo); color: var(--ink); box-shadow: none; }
.ag-passos button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .ag-passos li.is-feito button:hover { background: rgba(35,37,40,.05); } }

/* o gesto da marca, pequeno */
.ag-dog { margin-top: auto; width: min(12rem, 60%); align-self: flex-start; }
@media (min-width: 861px) and (max-height: 980px) { .ag-dog { width: 8.5rem; } .ag-lado__in { gap: 1.1rem; padding-top: 2rem; } }
@media (min-width: 861px) and (max-height: 720px) { .ag-dog { display: none; } }
.ag-dog__arch { width: 74%; margin: 0 auto; aspect-ratio: 4 / 5; border-radius: 999px 999px 18px 18px; overflow: hidden; background: #EDE9E0; box-shadow: 0 0 0 5px rgba(255,255,255,.95), var(--sh-2); }
.ag-dog__arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; }
.ag-dog__plate { position: relative; margin-top: -14%; display: grid; justify-items: center; gap: .05rem; padding: .85rem .8rem .8rem; border-radius: 14px; background: linear-gradient(180deg, #56595A, #474A4B); color: #fff; text-align: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), var(--sh-2); }
.ag-dog__plate .plate__top, .ag-dog__plate .plate__bot { font: 700 .58rem/1.6 var(--sc-font-text); letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.ag-dog__plate .plate__dani { font: 600 2.2rem/1 var(--sc-font-display); color: var(--amarelo); }
.ag-info { font-size: .82rem; color: var(--ink-soft); }

/* ----------------------------------------------------- formulário ---- */
.ag-form-wrap { position: relative; overflow-x: clip; display: flex; flex-direction: column; padding: clamp(2rem, 6vh, 4rem) clamp(1.25rem, 5vw, 5rem) 2rem; }
.ag-progresso { height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; max-width: 38rem; }
.ag-progresso__bar { display: block; height: 100%; width: 20%; background: var(--ink); border-radius: 2px; transition: width 600ms cubic-bezier(.22,1,.36,1); }
.ag-etapa { margin-top: .9rem; font: 700 .72rem/1.3 var(--sc-font-text); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }

.ag-form { flex: 1; display: flex; flex-direction: column; max-width: 38rem; margin-top: 1.4rem; }
.ag-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.passo { display: grid; gap: 1.5rem; }
.passo[hidden] { display: none; }
.passo__h { padding: 0; margin: 0 0 .3rem; font: 500 clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem)/1.12 var(--sc-font-display); letter-spacing: -0.012em; text-wrap: balance; outline: none; }
.passo.is-entrando { animation: ag-entra 520ms cubic-bezier(.22,1,.36,1) both; }
.passo.is-voltando { animation: ag-volta 520ms cubic-bezier(.22,1,.36,1) both; }
@keyframes ag-entra { from { opacity: 0; transform: translate3d(18px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes ag-volta { from { opacity: 0; transform: translate3d(-18px, 0, 0); } to { opacity: 1; transform: none; } }

/* campos */
.campo { display: grid; gap: .5rem; }
.campo > label, .grupo > legend { font-weight: 700; font-size: .95rem; padding: 0; }
.opc { font-weight: 600; font-size: .78rem; color: var(--ink-soft); margin-left: .35rem; letter-spacing: .02em; }
.campo input, .campo textarea {
  width: 100%; box-sizing: border-box; font: 500 1.05rem/1.4 var(--sc-font-text); color: var(--ink);
  background: var(--card); border: 0; border-radius: 14px; padding: 0 1.1rem; min-height: 56px;
  box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow 200ms var(--sc-ease-out);
  -webkit-appearance: none; appearance: none;
}
.campo textarea { padding: .9rem 1.1rem; min-height: 6rem; resize: vertical; }
.campo input::placeholder, .campo textarea::placeholder { color: #8C8F92; }
.campo input:focus, .campo textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 4px var(--amarelo-tint); }
.campo input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px #B3261E; }
.campo input::-webkit-calendar-picker-indicator { opacity: .5; }
.campo__dica { font-size: .84rem; color: var(--ink-soft); }
.campo__erro { font-size: .86rem; font-weight: 700; color: #B3261E; }
.campo__erro:empty { display: none; }

/* opções em cartão (porte, serviço) */
.opcoes { display: grid; gap: .6rem; }
.opcoes--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opcoes--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opcao { position: relative; display: flex; }
.opcao input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opcao span {
  flex: 1; display: grid; align-content: start; gap: .3rem; padding: 1rem 1.05rem; min-height: 76px; border-radius: 16px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer;
  transition: background-color 220ms var(--sc-ease-out), box-shadow 220ms var(--sc-ease-out), color 220ms var(--sc-ease-out), transform 220ms var(--sc-ease-out);
}
.opcao b { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.opcao small { font-size: .8rem; line-height: 1.35; color: var(--ink-soft); }
.opcao input:checked + span { background: var(--ink); color: #fff; box-shadow: none; }
.opcao input:checked + span small { color: rgba(255,255,255,.72); }
.opcao input:checked + span b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: .45rem; vertical-align: .15em; border-radius: 50%; background: var(--amarelo); }
.opcao input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.opcao:active span { transform: scale(.985); }
@media (hover: hover) and (pointer: fine) { .opcao:hover input:not(:checked) + span { box-shadow: inset 0 0 0 1px var(--ink); } }

/* hidratação (caixinha) */
.extra { position: relative; display: inline-flex; align-items: center; gap: .75rem; min-height: 48px; cursor: pointer; font-size: .98rem; justify-self: start; }
.extra input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.extra__box { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color 200ms var(--sc-ease-out), box-shadow 200ms var(--sc-ease-out); }
.extra__box svg { width: 16px; height: 16px; color: var(--ink); opacity: 0; transform: scale(.6); transition: opacity 200ms var(--sc-ease-out), transform 260ms var(--sc-ease-out); }
.extra input:checked + .extra__box { background: var(--amarelo); box-shadow: none; }
.extra input:checked + .extra__box svg { opacity: 1; transform: none; }
.extra input:focus-visible + .extra__box { outline: 2px solid var(--focus); outline-offset: 3px; }

/* dias */
.dias { display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px .6rem; margin: -2px -2px 0; scrollbar-width: thin; }
.dia { position: relative; flex: 0 0 auto; display: flex; scroll-snap-align: start; }
.dia input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dia span { display: grid; justify-items: center; gap: .15rem; width: 4.4rem; padding: .7rem 0 .75rem; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: background-color 220ms var(--sc-ease-out), color 220ms var(--sc-ease-out), box-shadow 220ms var(--sc-ease-out); }
.dia small { font: 700 .64rem/1.2 var(--sc-font-text); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.dia b { font: 500 1.6rem/1 var(--sc-font-display); }
.dia i { font-style: normal; font-size: .72rem; color: var(--ink-soft); }
.dia input:checked + span { background: var(--ink); color: #fff; box-shadow: none; }
.dia input:checked + span small, .dia input:checked + span i { color: rgba(255,255,255,.72); }
.dia input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .dia:hover input:not(:checked) + span { box-shadow: inset 0 0 0 1px var(--ink); } }

/* horários */
.horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: .5rem; }
.hora { position: relative; display: flex; }
.hora input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hora span { flex: 1; display: grid; place-items: center; min-height: 48px; border-radius: 12px; font-weight: 700; font-size: .95rem; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: background-color 220ms var(--sc-ease-out), color 220ms var(--sc-ease-out), box-shadow 220ms var(--sc-ease-out); }
.hora input:checked + span { background: var(--ink); color: #fff; box-shadow: none; }
.hora input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.hora input:disabled + span { opacity: .38; cursor: not-allowed; text-decoration: line-through; }
@media (hover: hover) and (pointer: fine) { .hora:hover input:not(:checked):not(:disabled) + span { box-shadow: inset 0 0 0 1px var(--ink); } }

.opcao__preco { font-style: normal; font: 500 1.05rem/1.2 var(--sc-font-display); margin-top: .25rem; }
.opcao__preco:empty, .extra__preco:empty { display: none; }
.opcao input:checked + span .opcao__preco { color: var(--amarelo); }
.extra__preco { font-style: normal; font-weight: 700; color: var(--ink-soft); margin-left: .25rem; }
.dia.is-lotado span { opacity: .45; cursor: not-allowed; box-shadow: inset 0 0 0 1px var(--line); }
.dia.is-lotado i { font-weight: 700; }
.vazio { font-size: .92rem; color: var(--ink-soft); padding: .9rem 0; }
.fim__codigo { font-size: .92rem; color: var(--ink-soft); }
.fim__codigo b { color: var(--ink); letter-spacing: .12em; font-size: 1.05rem; }
.ag-segue[aria-busy="true"] { opacity: .75; cursor: progress; }
.aviso { font-size: .88rem; color: var(--ink-soft); padding-left: 1rem; border-left: 1px solid var(--amarelo); }

/* revisão */
.resumo { margin: 0; display: grid; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); padding: .4rem 1.3rem; }
.resumo > div { display: grid; grid-template-columns: 7.5rem 1fr auto; align-items: baseline; gap: .4rem 1rem; padding: .95rem 0; border-top: 1px solid var(--line); }
.resumo > div:first-child { border-top: 0; }
.resumo dt { font: 700 .68rem/1.4 var(--sc-font-text); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.resumo dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.resumo dd small { display: block; font-weight: 500; color: var(--ink-soft); font-size: .88rem; margin-top: .15rem; }
.resumo__alt { all: unset; cursor: pointer; font-weight: 700; font-size: .82rem; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; min-height: 32px; display: inline-flex; align-items: center; }
.resumo__alt:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
@media (hover: hover) and (pointer: fine) { .resumo__alt:hover { text-decoration-color: var(--amarelo); } }

/* fim */
.passo--fim { justify-items: start; gap: 1.1rem; padding-top: 1rem; }
.fim__ok { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--amarelo); color: var(--ink); animation: ag-pop 620ms cubic-bezier(.22,1.3,.36,1) both; }
.fim__ok svg { width: 30px; height: 30px; }
.fim__txt { color: var(--ink-soft); max-width: 30rem; }
.fim__acoes { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin-top: .4rem; }
@keyframes ag-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* ações */
.ag-acoes { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.ag-acoes.is-fim { display: none; }
.ag-volta { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: 0 1.1rem 0 .9rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 700; font-size: .92rem; cursor: pointer; transition: box-shadow 200ms var(--sc-ease-out); }
.ag-volta[hidden] { display: none; }
.ag-volta svg { width: 18px; height: 18px; }
.ag-volta:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .ag-volta:hover { box-shadow: inset 0 0 0 1px var(--ink); } }
.ag-segue { margin-left: auto; border: 0; cursor: pointer; }
.ag-segue .ag-dir { transform: none; opacity: 1; }
.ag-segue .is-off { display: none; }
@media (hover: hover) and (pointer: fine) {
  .ag-segue:hover .ag-dir { transform: translateX(3px); opacity: 1; }
  .ag-segue:hover .ag-wa { transform: none; opacity: 1; }
}

/* ============================================================ CELULAR == */
@media (max-width: 860px) {
  .ag-top { grid-template-columns: auto 1fr auto; padding: .55rem 1rem; }
  .ag-voltar span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ag-voltar { width: 44px; justify-content: center; margin-left: -.6rem; }
  .ag-marca { justify-self: center; font-size: 1rem; white-space: nowrap; }
  .ag-marca img { width: 26px; }
  .ag-tel { font-size: .78rem; padding: 0 .75rem; min-height: 44px; }

  .ag { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .ag-lado { border-right: 0; border-bottom: 1px solid var(--line); }
  .ag-lado__in { position: static; min-height: 0; gap: .6rem; padding: 1.4rem 1rem 1.3rem; }
  .ag-lado .kicker { display: none; }
  .ag-h1 { font-size: clamp(1.6rem, 6.6vw, 2rem); }
  .ag-lede { font-size: .92rem; }
  .ag-passos, .ag-dog, .ag-info { display: none; }

  .ag-form-wrap { padding: 1.3rem 1rem 0; }
  .ag-form { margin-top: 1rem; }
  .passo { gap: 1.25rem; }
  .passo__h { font-size: clamp(1.45rem, 6vw, 1.8rem); }
  .opcoes--3 { grid-template-columns: 1fr; }
  .opcoes--3 .opcao span { min-height: 0; grid-template-columns: auto 1fr; align-items: baseline; column-gap: .7rem; padding: .95rem 1rem; }
  .opcoes--2 .opcao span { min-height: 88px; padding: .9rem; }
  .resumo { padding: .2rem 1rem; }
  .resumo > div { grid-template-columns: 1fr auto; }
  .resumo dt { grid-column: 1 / -1; }

  /* barra de ações presa embaixo, ao alcance do polegar */
  .ag-acoes { position: sticky; bottom: 0; z-index: 4; margin: 1.8rem -1rem 0; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: rgba(250,248,244,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .ag-segue { flex: 1; min-width: 0; justify-content: space-between; max-width: none; padding-left: 1.3rem; }
  .ag-volta { flex: none; width: 52px; height: 52px; padding: 0; justify-content: center; }
  .ag-volta span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .passo.is-entrando, .passo.is-voltando, .fim__ok { animation: none; }
  .ag-progresso__bar { transition: none; }
}
