/* ==========================================================================
   PORTAL FIT — scheduling widget (Stage E4, guided booking wizard)
   Reuses tokens from css/style.css (:root vars). No new color values.
   ========================================================================== */

.pfsc-launcher{
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9em 1.4em;
  min-height: 44px;
  background: var(--gold);
  color: var(--black);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: background 160ms ease-out;
}
.pfsc-launcher:hover{ background: #DCAE4E; }
.pfsc-launcher:active{ background: #B58A31; }
.pfsc-launcher[hidden]{ display: none; }

.pfsc-panel{
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 61;
  width: 400px;
  max-width: calc(100vw - 2rem);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: rgba(23,24,26,0.92);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid var(--gold-soft);
  border-radius: 2px;
  overflow: hidden;
}
.pfsc-panel[hidden]{ display: none; }

.pfsc-panel__header{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.pfsc-panel__title{
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}
.pfsc-panel__close{
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--off-white);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 160ms ease-out, color 160ms ease-out;
}
.pfsc-panel__close:hover{ color: var(--gold); border-color: var(--gold-soft); }

.pfsc-panel__body{
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* Step instruction line — plain text, not a chat bubble. */
.pfsc-step__heading{
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--off-white);
  margin: 0;
}

/* Structured scheduling context (e.g. "Segunda, 24 de agosto" /
   "16:30 às 17:30") — plain stacked lines, never a chat bubble and never an
   echo of a button click as a user message. */
.pfsc-summary{
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.pfsc-summary__line{
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gold);
}

.pfsc-confirm__title{
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--off-white);
  margin: 0;
}

/* Two-line option buttons (day: weekday + date; period: label + range). */
.pfsc-chip2-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-self: stretch;
}
.pfsc-chip2{
  flex: 1 1 auto;
  min-width: 8.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  font-family: var(--font-body);
  padding: 0.7em 1em;
  min-height: 44px;
  background: transparent;
  color: var(--off-white);
  border: 1px solid var(--gold-soft);
  border-radius: 2px;
  cursor: pointer;
  transition: background 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .pfsc-chip2:hover{ background: var(--gold); color: var(--black); border-color: var(--gold); }
}
.pfsc-chip2:active{ background: #B58A31; border-color: #B58A31; }
.pfsc-chip2:disabled{ opacity: 0.4; cursor: default; pointer-events: none; }
.pfsc-chip2__top{
  font-weight: 700;
  font-size: 0.95rem;
}
.pfsc-chip2__bottom{
  font-size: 0.8rem;
  opacity: 0.8;
}

.pfsc-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-self: stretch;
}
.pfsc-chip{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.65em 1.1em;
  min-height: 44px;
  background: transparent;
  color: var(--off-white);
  border: 1px solid var(--gold-soft);
  border-radius: 2px;
  cursor: pointer;
  transition: background 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .pfsc-chip:hover{ background: var(--gold); color: var(--black); border-color: var(--gold); }
}
.pfsc-chip:active{ background: #B58A31; border-color: #B58A31; }
.pfsc-chip:disabled{ opacity: 0.4; cursor: default; pointer-events: none; }

.pfsc-form{
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: stretch;
}
.pfsc-field{ display: flex; flex-direction: column; gap: 0.4rem; }
.pfsc-field label{
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--off-white-soft);
}
.pfsc-field input{
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--off-white);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.6em 0.1em;
  min-height: 44px;
}
.pfsc-field input:focus-visible{ border-bottom-color: var(--gold); }
.pfsc-field input::placeholder{ color: var(--off-white-faint); }

.pfsc-card{
  align-self: stretch;
  background: var(--charcoal-3);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.pfsc-card dl{ margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.8rem; }
.pfsc-card dt{ font-size: 0.78rem; color: var(--off-white-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.pfsc-card dd{ margin: 0; font-size: 0.95rem; color: var(--off-white); }

.pfsc-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-self: stretch;
}
.pfsc-btn{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75em 1.2em;
  min-height: 44px;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
}
.pfsc-btn--primary{ background: var(--gold); color: var(--black); border: 0; }
.pfsc-btn--primary:hover{ background: #DCAE4E; }
.pfsc-btn--primary:active{ background: #B58A31; }
.pfsc-btn--outline{ background: transparent; color: var(--off-white); border: 1px solid var(--gold-soft); }
.pfsc-btn--outline:hover{ background: var(--gold); color: var(--black); border-color: var(--gold); }
.pfsc-btn:disabled{ opacity: 0.4; cursor: default; pointer-events: none; }

/* Local-only "confirming" delay before the demo result — no network call
   backs this, it's a fixed setTimeout so the wizard has a believable beat
   before the demo-safe result copy. */
.pfsc-loading{
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 0.6em;
  color: var(--off-white-soft);
  font-size: 0.9rem;
}
.pfsc-loading__dot{
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pfsc-pulse 1.1s ease-in-out infinite;
}
.pfsc-loading__dot:nth-child(2){ animation-delay: 0.15s; }
.pfsc-loading__dot:nth-child(3){ animation-delay: 0.3s; }
@keyframes pfsc-pulse{
  0%, 80%, 100%{ opacity: 0.25; }
  40%{ opacity: 1; }
}
@media (prefers-reduced-motion: reduce){
  .pfsc-loading__dot{ animation: none; opacity: 0.7; }
}

.pfsc-result{
  align-self: stretch;
  background: var(--charcoal-3);
  border-left: 2px solid var(--gold);
  padding: 0.9em 1em;
}
.pfsc-result__kicker{
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.5em;
}
.pfsc-result__text{
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--off-white);
}

body.pfsc-lock{ overflow: hidden; }

/* ==========================================================================
   Mobile — full-screen takeover below 600px
   ========================================================================== */
@media (max-width: 600px){
  .pfsc-panel{
    top: 0; right: 0; bottom: 0; left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .pfsc-panel__header{ position: sticky; top: 0; background: rgba(23,24,26,0.98); z-index: 1; }
  .pfsc-launcher{
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
  }
}
