/* =========================================================
   BOXARIO — DORADCA v0.1
   /doradca/doradca.css

   Założenie:
   - korzystamy z globalnego ../style.css,
   - Doradca ma wyglądać jak naturalna część BOXARIO,
   - jasna przestrzeń robocza wewnątrz ciemnej identyfikacji strony,
   - jedna decyzja = jeden ekran.
========================================================= */


/* =========================================================
   PAGE
========================================================= */

.advisor-page {
  position: relative;
  min-height: calc(100vh - 72px);
  padding-top: 72px;
  overflow: hidden;
  color: #0b1220;
  background:
    radial-gradient(circle at 8% 10%, rgba(45, 212, 191, .13), transparent 28%),
    radial-gradient(circle at 92% 20%, rgba(255, 106, 0, .08), transparent 26%),
    linear-gradient(180deg, #f7f9fb 0%, #eef2f5 100%);
}

.advisor-page__section {
  position: relative;
  z-index: 2;
  padding: 62px 0 72px;
}

.advisor-page__frame {
  width: min(100%, 900px);
  margin: 0 auto;
}

.advisor-page__ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
}

.advisor-page__ambient--one {
  width: 340px;
  height: 340px;
  top: 100px;
  left: -160px;
  background: rgba(45, 212, 191, .08);
}

.advisor-page__ambient--two {
  width: 300px;
  height: 300px;
  right: -150px;
  top: 340px;
  background: rgba(255, 106, 0, .05);
}

.advisor-page__trust {
  margin: 20px auto 0;
  text-align: center;
  color: rgba(11, 18, 32, .55);
  font-size: 12px;
  line-height: 1.5;
}


/* =========================================================
   APP / COMMON
========================================================= */

.advisor-app {
  width: 100%;
  min-height: 520px;
}

.advisor {
  width: 100%;
}

.advisor__top {
  min-height: 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.advisor__topLeft {
  justify-self: start;
}

.advisor__topRight {
  justify-self: end;
}

.advisor__context {
  justify-self: center;
  color: rgba(11, 18, 32, .48);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.advisor__back,
.advisor__changeTopic,
.advisor-linkButton {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(11, 18, 32, .64);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color .18s ease, transform .18s ease;
}

.advisor__back:hover,
.advisor__changeTopic:hover,
.advisor-linkButton:hover {
  color: #0f766e;
}

.advisor__back:hover {
  transform: translateX(-2px);
}

.advisor-linkButton:hover {
  transform: translateX(2px);
}

.advisor__screen {
  width: 100%;
}

.advisor-initialLoading,
.advisor-loading {
  min-height: 430px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: rgba(11, 18, 32, .58);
  font-weight: 600;
}

.advisor-initialLoading p,
.advisor-loading p {
  margin: 0;
}

.advisor-initialLoading__dot {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(15, 118, 110, .15);
  border-top-color: #0f766e;
  border-radius: 999px;
  animation: advisorSpin .8s linear infinite;
}

@keyframes advisorSpin {
  to { transform: rotate(360deg); }
}


/* =========================================================
   ROUTER — 3 + 3
========================================================= */

.advisor-router {
  padding: 46px 48px 42px;
  border: 1px solid rgba(11, 18, 32, .09);
  border-radius: 28px;
  background: rgba(255, 255, 255, .94);
  box-shadow:
    0 28px 80px rgba(11, 18, 32, .10),
    0 2px 8px rgba(11, 18, 32, .04);
}

.advisor-router__header {
  max-width: 720px;
  margin: 0 auto 34px;
  text-align: center;
}

.advisor-router__eyebrow,
.advisor-realizationCard__eyebrow {
  margin: 0 0 10px;
  color: #0f766e;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.advisor-router__title {
  max-width: 720px;
  margin: 0 auto 14px;
  color: #0b1220;
  font-size: clamp(30px, 4.7vw, 46px);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 800;
}

.advisor-router__lead {
  max-width: 690px;
  margin: 0 auto;
  color: rgba(11, 18, 32, .66);
  font-size: 16px;
  line-height: 1.65;
}

.advisor-router__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.advisor-routerCard {
  grid-column: span 2;
  min-height: 148px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(11, 18, 32, .11);
  border-radius: 18px;
  background: #fff;
  color: #0b1220;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(11, 18, 32, .035);
  transition:
    transform .16s ease,
    border-color .16s ease,
    box-shadow .16s ease,
    background .16s ease;
}

.advisor-routerCard:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, .34);
  background: #fbfffe;
  box-shadow: 0 14px 30px rgba(11, 18, 32, .08);
}

.advisor-routerCard:focus-visible,
.advisor-answer:focus-visible,
.advisor-action:focus-visible,
.advisor-formField__input:focus-visible {
  outline: 3px solid rgba(45, 212, 191, .26);
  outline-offset: 2px;
}

.advisor-routerCard__content {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.advisor-routerCard__title {
  color: #0b1220;
  font-size: 16px;
  line-height: 1.32;
  font-weight: 800;
}

.advisor-routerCard__description {
  color: rgba(11, 18, 32, .58);
  font-size: 13px;
  line-height: 1.48;
}

.advisor-routerCard__arrow,
.advisor-answer__arrow {
  flex: 0 0 auto;
  color: #0f766e;
  font-size: 20px;
  line-height: 1;
  transform: translateY(1px);
  transition: transform .16s ease;
}

.advisor-routerCard:hover .advisor-routerCard__arrow,
.advisor-answer:hover .advisor-answer__arrow {
  transform: translate(3px, 1px);
}

.advisor-router__human {
  margin-top: 24px;
  text-align: center;
}


/* =========================================================
   QUESTION
========================================================= */

.advisor-question,
.advisor-result,
.advisor-handoff,
.advisor-resume,
.advisor-error {
  padding: 38px 42px 42px;
  border: 1px solid rgba(11, 18, 32, .09);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(11, 18, 32, .09);
}

.advisor-question {
  max-width: 760px;
  margin: 0 auto;
}

.advisor-question__title,
.advisor-result__title,
.advisor-handoff__title,
.advisor-resume__title,
.advisor-error__title {
  margin: 0;
  color: #0b1220;
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.12;
  letter-spacing: -.03em;
  font-weight: 800;
}

.advisor-question__answers {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.advisor__back,
.advisor__changeTopic {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 8px;
}

.advisor__back:focus-visible,
.advisor__changeTopic:focus-visible,
.advisor__screen h1:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 3px;
}

.advisor-question__description {
  margin: 14px 0 0;
  color: rgba(11, 18, 32, .68);
  font-size: 15px;
  line-height: 1.55;
}

.advisor-question__input {
  display: grid;
  gap: 9px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(11, 18, 32, .10);
}

.advisor-question__input label {
  color: #0b1220;
  font-size: 14px;
  font-weight: 750;
}

.advisor-question__inputRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.advisor-question__inputRow input,
.advisor-question__inputRow button {
  min-height: 52px;
  border-radius: 12px;
  font: inherit;
}

.advisor-question__inputRow input {
  min-width: 0;
  padding: 0 14px;
  border: 1px solid rgba(11, 18, 32, .18);
}

.advisor-question__inputRow button {
  padding: 0 20px;
  border: 0;
  background: #0f766e;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.advisor-answer {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 19px;
  border: 1px solid rgba(11, 18, 32, .12);
  border-radius: 15px;
  background: #fff;
  color: #0b1220;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color .16s ease,
    background .16s ease,
    transform .16s ease,
    box-shadow .16s ease;
}

.advisor-answer:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, .40);
  background: #f8fffd;
  box-shadow: 0 8px 20px rgba(11, 18, 32, .05);
}

.advisor-answer.is-selected {
  border-color: #0f766e;
  background: rgba(45, 212, 191, .08);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .08);
}

.advisor-answer__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.advisor-answer__label {
  color: #0b1220;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 750;
}

.advisor-answer__description {
  color: rgba(11, 18, 32, .58);
  font-size: 13px;
  line-height: 1.45;
}


/* =========================================================
   RESULT
========================================================= */

.advisor-result {
  max-width: 840px;
  margin: 0 auto;
}

.advisor-result--review {
  border-top: 4px solid #d97706;
}

.advisor-result--recommendation {
  border-top: 4px solid #0f766e;
}

.advisor-result__main {
  max-width: 720px;
}

.advisor-result__reasonTitle {
  margin: 24px 0 8px;
  color: #0f766e;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: .02em;
}

.advisor-result__body {
  margin-top: 14px;
}

.advisor-result__paragraph {
  margin: 0 0 10px;
  color: rgba(11, 18, 32, .68);
  font-size: 15px;
  line-height: 1.68;
}

.advisor-result__paragraph:last-child {
  margin-bottom: 0;
}

.advisor-result__tips {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 14px;
  background: #f5faf9;
}

.advisor-result__tipsTitle {
  margin: 0 0 10px;
  color: #0f766e;
  font-size: 16px;
  line-height: 1.35;
}

.advisor-result__tips ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: rgba(11, 18, 32, .72);
  font-size: 14px;
  line-height: 1.55;
}

.advisor-result__details {
  display: grid;
  gap: 9px;
  margin-top: 24px;
}

.advisor-detail {
  border: 1px solid rgba(11, 18, 32, .10);
  border-radius: 13px;
  background: #f8fafb;
  overflow: hidden;
}

.advisor-detail__summary {
  padding: 14px 16px;
  color: #0b1220;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.advisor-detail__body {
  padding: 0 16px 16px;
}


/* =========================================================
   ACTIONS
========================================================= */

.advisor-result__actions,
.advisor-resume__actions,
.advisor-realizationCard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.advisor-action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 17px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition:
    transform .14s ease,
    border-color .14s ease,
    box-shadow .14s ease,
    background .14s ease;
}

.advisor-action:hover {
  transform: translateY(-1px);
}

.advisor-action--primary {
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .16);
}

.advisor-action--primary:hover {
  background: #115e59;
  border-color: #115e59;
}

.advisor-action--secondary {
  border: 1px solid rgba(11, 18, 32, .14);
  background: #fff;
  color: #0b1220;
}

.advisor-action--secondary:hover {
  border-color: rgba(15, 118, 110, .34);
  background: #f8fffd;
}

.advisor-action--link {
  min-height: 0;
  padding: 8px 2px;
  border: 0;
  background: transparent;
  color: #0f766e;
}

.advisor-action[disabled] {
  opacity: .6;
  pointer-events: none;
}

.advisor-result__support {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(11, 18, 32, .08);
}


/* =========================================================
   RECOMMENDATIONS
========================================================= */

.advisor-recommendations {
  margin-top: 34px;
}

.advisor-recommendations__header {
  margin-bottom: 14px;
}

.advisor-recommendations__title {
  margin: 0;
  color: #0b1220;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
}

.advisor-recommendations__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.advisor-loadingText {
  grid-column: 1 / -1;
  margin: 0;
  padding: 20px;
  border-radius: 14px;
  background: #f8fafb;
  color: rgba(11, 18, 32, .56);
  text-align: center;
  font-size: 13px;
}

.advisor-realizationCard {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(11, 18, 32, .10);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(11, 18, 32, .05);
}

.advisor-realizationCard__imageLink {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e9eef1;
}

.advisor-realizationCard__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .25s ease;
}

.advisor-realizationCard__imageLink:hover .advisor-realizationCard__image {
  transform: scale(1.02);
}

.advisor-realizationCard__body {
  padding: 15px;
}

.advisor-realizationCard__eyebrow {
  margin-bottom: 6px;
  font-size: 9px;
}

.advisor-realizationCard__title {
  margin: 0;
  color: #0b1220;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
}

.advisor-realizationCard__highlights {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(11, 18, 32, .60);
  font-size: 11px;
  line-height: 1.45;
}

.advisor-realizationCard__highlights li::before {
  content: "✓";
  margin-right: 5px;
  color: #0f766e;
  font-weight: 800;
}

.advisor-realizationCard__price {
  margin: 12px 0 0;
  color: #0b1220;
  font-size: 18px;
  font-weight: 800;
}

.advisor-realizationCard__actions {
  flex-direction: column;
  margin-top: 13px;
}

.advisor-realizationCard__actions .advisor-action {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  font-size: 11px;
}

.advisor-emptyState {
  grid-column: 1 / -1;
  padding: 20px;
  border: 1px dashed rgba(11, 18, 32, .16);
  border-radius: 14px;
  background: #f8fafb;
  color: rgba(11, 18, 32, .64);
  font-size: 14px;
  line-height: 1.6;
}

.advisor-emptyState p {
  margin: 0;
}

.advisor-emptyState .advisor-action {
  margin-top: 14px;
}


/* =========================================================
   HANDOFF FORM
========================================================= */

.advisor-handoff {
  max-width: 650px;
  margin: 0 auto;
}

.advisor-handoff__lead,
.advisor-resume__lead,
.advisor-error__text {
  margin: 13px 0 0;
  color: rgba(11, 18, 32, .64);
  font-size: 15px;
  line-height: 1.65;
}

.advisor-handoff__form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.advisor-formField {
  display: grid;
  gap: 7px;
}

.advisor-formField__label {
  color: #0b1220;
  font-size: 13px;
  font-weight: 750;
}

.advisor-formField__input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid rgba(11, 18, 32, .16);
  border-radius: 11px;
  background: #fff;
  color: #0b1220;
  font-family: inherit;
  font-size: 15px;
  transition: border-color .14s ease, box-shadow .14s ease;
}

.advisor-formField__input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .12);
  outline: none;
}

.advisor-formField__error {
  min-height: 16px;
  color: #b42318;
  font-size: 11px;
  line-height: 1.4;
}

.advisor-handoff__status {
  min-height: 20px;
  margin: 0;
  color: rgba(11, 18, 32, .66);
  font-size: 12px;
  line-height: 1.5;
}


/* =========================================================
   RESUME / ERROR
========================================================= */

.advisor-resume,
.advisor-error {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

.advisor-resume__actions {
  justify-content: center;
}


/* =========================================================
   LOADING
========================================================= */

.advisor--loading .advisor__screen {
  min-height: 380px;
  border: 1px solid rgba(11, 18, 32, .08);
  border-radius: 22px;
  background: rgba(255, 255, 255, .88);
}

.advisor-loading--compact {
  min-height: 300px;
}


/* =========================================================
   TOPBAR SMALL ADJUSTMENT
========================================================= */

.advisor-topbar__nav {
  margin-left: 4px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

  .advisor-page__section {
    padding: 44px 0 60px;
  }

  .advisor-router {
    padding: 38px 30px 34px;
  }

  .advisor-router__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advisor-routerCard {
    grid-column: auto;
  }

  .advisor-recommendations__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 640px) {

  .advisor-page {
    padding-top: 68px;
  }

  .advisor-page__section {
    padding: 24px 0 42px;
  }

  .advisor-page .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .advisor-page__frame {
    width: 100%;
  }

  .advisor__top {
    min-height: 32px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 11px;
  }

  .advisor__context {
    display: none;
  }

  .advisor__topRight {
    grid-column: 2;
  }

  .advisor-router,
  .advisor-question,
  .advisor-result,
  .advisor-handoff,
  .advisor-resume,
  .advisor-error {
    padding: 26px 18px 28px;
    border-radius: 18px;
  }

  .advisor-router__header {
    margin-bottom: 24px;
  }

  .advisor-router__title {
    font-size: 31px;
  }

  .advisor-router__lead {
    font-size: 14px;
    line-height: 1.58;
  }

  .advisor-router__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .advisor-routerCard {
    grid-column: auto;
  }

  .advisor-routerCard {
    min-height: 0;
    padding: 17px 16px;
    border-radius: 14px;
  }

  .advisor-routerCard__title {
    font-size: 15px;
  }

  .advisor-question__title,
  .advisor-result__title,
  .advisor-handoff__title,
  .advisor-resume__title,
  .advisor-error__title {
    font-size: 27px;
  }

  .advisor-question__answers {
    margin-top: 22px;
  }

  .advisor-question__inputRow {
    grid-template-columns: 1fr;
  }

  .advisor-question__inputRow button {
    width: 100%;
  }

  .advisor-answer {
    min-height: 64px;
    padding: 15px;
  }

  .advisor-result__actions,
  .advisor-resume__actions {
    flex-direction: column;
  }

  .advisor-result__actions .advisor-action,
  .advisor-resume__actions .advisor-action {
    width: 100%;
  }

  .advisor-recommendations__grid {
    grid-template-columns: 1fr;
  }

  .advisor-realizationCard {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .advisor-realizationCard__imageLink {
    height: 100%;
    min-height: 190px;
    aspect-ratio: auto;
  }

  .advisor-realizationCard__actions {
    gap: 7px;
  }

  .advisor-page__trust {
    margin-top: 15px;
    padding: 0 8px;
    font-size: 10px;
  }

  .advisor-topbar__nav {
    display: none;
  }
}


/* =========================================================
   VERY SMALL
========================================================= */

@media (max-width: 430px) {

  .advisor-realizationCard {
    display: block;
  }

  .advisor-realizationCard__imageLink {
    min-height: 0;
    height: auto;
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .advisor-router__title {
    font-size: 29px;
  }

  .advisor__back,
  .advisor__changeTopic,
  .advisor-linkButton {
    font-size: 12px;
  }
}

/* =========================================================
   UX PATCH v0.1.4
   - wynik/pytanie nie chowają się pod sticky topbarem
   - 1–2 rekomendacje są wycentrowane zamiast zostawiać pustą 3. kolumnę
========================================================= */

.advisor-app {
  scroll-margin-top: 86px;
}

.advisor-recommendations__grid[data-count="1"] {
  grid-template-columns: minmax(0, 280px);
  justify-content: center;
}

.advisor-recommendations__grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 280px));
  justify-content: center;
}

@media (max-width: 640px) {
  .advisor-recommendations__grid[data-count="1"],
  .advisor-recommendations__grid[data-count="2"] {
    grid-template-columns: 1fr;
  }
}
