/* WWC Advisor widget — isolated UI. Edit only this file, not global.css.
   Root container: .wwc-advisor (z-index 10000, above header 50 / reading-progress 60). */

.wwc-advisor,
.wwc-advisor *,
.wwc-advisor *::before,
.wwc-advisor *::after {
  box-sizing: border-box;
}

.wwc-advisor button,
.wwc-advisor input,
.wwc-advisor a {
  font-family: inherit;
  text-decoration: none;
}

.wwc-advisor strong {
  font-weight: 700;
}

.wwc-advisor {
  --green: #0f6b5f;
  --gold: #b98a2e;
  --gold-light: #e2bf6b;
  --ink: #1a1f1d;
  --muted: #66706b;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  font-family: "Golos Text", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.46;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--ink);
  /* Reset inherited site typography so global body scale does not break layout */
  letter-spacing: normal;
  text-transform: none;
}

.wwc-advisor__launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  padding: 10px 17px 10px 10px;
  box-shadow: 0 12px 30px rgba(15, 107, 95, 0.28);
  font: inherit;
  cursor: pointer;
  transition:
    transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 320ms,
    background 320ms,
    border-color 320ms;
}

.wwc-advisor__launcher span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: var(--green);
  font-weight: 900;
  transition:
    background 320ms,
    color 320ms,
    box-shadow 320ms;
}

.wwc-advisor__launcher strong {
  font-size: 14px;
  font-weight: 700;
}

@media (hover: hover) and (pointer: fine) {
  .wwc-advisor__launcher:hover,
  .wwc-advisor__launcher:focus-visible {
    transform: translateY(-3px);
    border-color: var(--gold-light);
    box-shadow: 0 12px 28px rgba(185, 138, 46, 0.32);
  }

  .wwc-advisor__launcher:hover span,
  .wwc-advisor__launcher:focus-visible span {
    background: var(--gold);
    color: #2a2410;
    box-shadow: 0 6px 18px rgba(185, 138, 46, 0.42);
  }
}

.wwc-advisor__launcher:focus-visible {
  outline: 3px solid rgba(185, 138, 46, 0.5);
  outline-offset: 2px;
}

.wwc-advisor__panel {
  position: absolute;
  right: 0;
  bottom: 62px;
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 110px));
  overflow: hidden;
  border: 1px solid #eadfbd;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 32, 29, 0.22);
}

.wwc-advisor__panel[hidden] {
  display: none;
}

.wwc-advisor__panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 18px;
  background: #f0f7f5;
  border-bottom: 1px solid #dce9e5;
}

.wwc-advisor__panel header div {
  display: grid;
  gap: 2px;
}

.wwc-advisor__panel header b {
  font-size: 16px;
  font-family: "Golos Text", system-ui, sans-serif;
}

.wwc-advisor__panel header small {
  color: var(--muted);
  font-size: 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.wwc-advisor__panel header button {
  border: 0;
  background: transparent;
  font-size: 27px;
  line-height: 1;
  color: #53605b;
  cursor: pointer;
  border-radius: 8px;
  transition: color 180ms, background 180ms;
}

.wwc-advisor__panel header button:hover,
.wwc-advisor__panel header button:focus-visible {
  color: var(--gold);
  background: rgba(185, 138, 46, 0.1);
}

.wwc-advisor__messages {
  height: 330px;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fbfcfb;
}

.wwc-advisor__message {
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 14px;
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.46;
}

.wwc-advisor__message.is-bot {
  align-self: flex-start;
  background: #eef5f3;
}

.wwc-advisor__message.is-user {
  align-self: flex-end;
  background: var(--green);
  color: #fff;
}

.wwc-advisor__quick {
  display: flex;
  gap: 7px;
  overflow: auto;
  padding: 10px 14px 4px;
}

.wwc-advisor__quick button {
  flex: 0 0 auto;
  border: 1px solid #d7c38d;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 180ms,
    border-color 180ms,
    background 180ms,
    color 180ms;
}

@media (hover: hover) {
  .wwc-advisor__quick button:hover,
  .wwc-advisor__quick button:focus-visible {
    transform: translateY(-2px);
    border-color: var(--gold);
    background: #fffaf0;
    color: var(--gold);
  }
}

.wwc-advisor__panel form {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
}

.wwc-advisor__panel input {
  min-width: 0;
  flex: 1;
  border: 1px solid #cfd8d4;
  border-radius: 11px;
  padding: 11px 12px;
  font: inherit;
  font-family: "Golos Text", system-ui, sans-serif;
}

.wwc-advisor__panel form button {
  width: 42px;
  border: 0;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: transform 180ms, background 180ms, box-shadow 180ms;
}

@media (hover: hover) {
  .wwc-advisor__panel form button:hover,
  .wwc-advisor__panel form button:focus-visible {
    transform: translateY(-2px);
    background: #0c5449;
    box-shadow: 0 8px 20px rgba(15, 107, 95, 0.28);
  }
}

.wwc-advisor__note {
  margin: 0;
  padding: 0 15px 12px;
  color: #7a827d;
  font-size: 11px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.wwc-advisor__actions {
  display: flex;
  gap: 8px;
  margin: 0 16px 10px;
}

.wwc-advisor__actions a,
.wwc-advisor__actions button {
  border: 0;
  border-radius: 9px;
  padding: 9px 12px;
  background: #e8f2ef;
  color: var(--green);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms, background 180ms, color 180ms;
}

.wwc-advisor__actions button {
  background: var(--green);
  color: #fff;
}

@media (hover: hover) {
  .wwc-advisor__actions a:hover,
  .wwc-advisor__actions a:focus-visible {
    transform: translateY(-2px);
    background: #fffaf0;
    color: var(--gold);
  }

  .wwc-advisor__actions button:hover,
  .wwc-advisor__actions button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 107, 95, 0.28);
  }
}

@media (max-width: 600px) {
  .wwc-advisor {
    right: 12px;
    bottom: 12px;
  }

  .wwc-advisor__launcher strong {
    display: none;
  }

  .wwc-advisor__launcher {
    padding: 8px;
  }

  .wwc-advisor__panel {
    position: fixed;
    left: 12px !important;
    right: auto !important;
    bottom: 68px;
    width: calc(100vw - 24px) !important;
    height: min(600px, calc(100vh - 80px));
  }

  .wwc-advisor__messages {
    height: calc(100% - 202px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wwc-advisor__launcher,
  .wwc-advisor__launcher span,
  .wwc-advisor__quick button,
  .wwc-advisor__panel form button,
  .wwc-advisor__actions a,
  .wwc-advisor__actions button {
    transition-duration: 1ms !important;
    transform: none !important;
  }
}
