/* ALYZ assistant overrides. Load after the existing Onclimate theme styles. */
.oc-ai {
  --alyz-ink: #101a1d;
  --alyz-ink-deep: #0a1114;
  --alyz-turquoise: #42dfcf;
  --alyz-teal: #087f77;
  --alyz-line: #d7e9e6;
}

.oc-ai .oc-ai__launcher {
  min-width: 224px;
  gap: 12px;
  border-color: #263a3e;
  border-radius: 20px;
  background: var(--alyz-ink-deep);
  color: #fff;
  box-shadow: 0 12px 34px rgb(7 24 28 / 22%);
}

.oc-ai .oc-ai__launcher strong {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.25;
}

.oc-ai .oc-ai__launcher small {
  margin-top: 3px;
  color: #bfcecf;
  font-size: .8125rem;
  line-height: 1.3;
}

.oc-ai .oc-ai__launcher-orb,
.oc-ai .oc-ai__avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(66 223 207 / 38%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #244f50, #102629 72%);
  color: var(--alyz-turquoise);
  box-shadow: inset 0 0 12px rgb(66 223 207 / 8%);
}

.oc-ai .oc-ai__launcher-orb svg,
.oc-ai .oc-ai__avatar svg {
  width: 27px;
  height: 27px;
}

.oc-ai .oc-ai__launcher i {
  background: #1c3337;
  color: var(--alyz-turquoise);
}

.oc-ai .oc-ai__panel {
  width: min(430px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 120px));
  max-height: min(760px, calc(100dvh - 120px));
  border-color: #c8dedb;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgb(7 24 28 / 24%);
}

.oc-ai .oc-ai__head {
  flex: 0 0 auto;
  min-height: 80px;
  background: linear-gradient(115deg, var(--alyz-ink-deep), #172b2e);
  border-bottom: 1px solid rgb(66 223 207 / 22%);
}

.oc-ai .oc-ai__brand {
  min-width: 0;
  gap: 12px;
}

.oc-ai .oc-ai__brand > div {
  min-width: 0;
  gap: 4px;
}

.oc-ai .oc-ai__brand strong {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.2;
}

.oc-ai .oc-ai__brand small {
  color: #c4d5d4;
  font-size: .875rem;
  line-height: 1.3;
}

.oc-ai .oc-ai__close {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-color: #3b5053;
  background: #1c3034;
  border-radius: 12px;
}

.oc-ai .oc-ai__body {
  min-height: 0;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, #f2faf8, #fff 70%);
}

.oc-ai .oc-ai__mini-avatar {
  flex-basis: 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #102629;
  color: var(--alyz-turquoise);
  font-size: .625rem;
  letter-spacing: .02em;
}

.oc-ai .oc-ai__message > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.oc-ai .oc-ai__message--user > div {
  border-color: var(--alyz-teal);
  background: var(--alyz-teal);
}

.oc-ai .oc-ai__composer {
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  border-top-color: var(--alyz-line);
}

.oc-ai .oc-ai__composer input {
  min-height: 44px;
  border-color: #c9ded9;
  border-radius: 13px;
  color: var(--alyz-ink);
}

.oc-ai .oc-ai__composer > button[type="submit"] {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--alyz-ink);
  color: var(--alyz-turquoise);
}

.oc-ai .oc-ai__voicebar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 14px 12px;
  background: #fff;
}

.oc-ai .oc-ai__composer .oc-ai__voicebar {
  padding: 0;
}

.oc-ai .oc-ai__voice-action {
  display: inline-flex;
  flex: 1 1 130px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  min-height: 44px;
  height: auto;
  padding: 10px 12px;
  border: 1px solid #cee4df;
  border-radius: 12px;
  background: #f3faf8;
  color: #17554f;
  font: inherit;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
}

.oc-ai .oc-ai__voice-action svg {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
}

.oc-ai .oc-ai__voice-action[aria-pressed="true"] {
  border-color: var(--alyz-teal);
  background: #d9f5ef;
  color: #07564f;
}

.oc-ai .oc-ai__voice-status {
  grid-column: 1 / -1;
  flex-basis: 100%;
  margin: 0;
  padding: 1px 2px;
  color: #37645e;
  font-size: .875rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.oc-ai .oc-ai__voice-note {
  grid-column: 1 / -1;
  margin: 0;
  color: #617571;
  font-size: .8125rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.oc-ai .oc-ai__voicebar[hidden],
.oc-ai .oc-ai__voice-action[hidden],
.oc-ai .oc-ai__voice-status[hidden],
.oc-ai .oc-ai__voice-note[hidden] {
  display: none !important;
}

.oc-ai .oc-ai__voice-action:disabled,
.oc-ai .oc-ai__composer > button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.oc-ai .oc-ai__footer {
  flex: 0 0 auto;
  border-top-color: #e4efed;
}

.oc-ai .oc-ai__footer button {
  min-height: 32px;
  color: #08756d;
}

.oc-ai .oc-ai__footer span {
  color: #617571;
}

.oc-ai button:focus-visible,
.oc-ai a:focus-visible {
  outline: 3px solid #0aa99b;
  outline-offset: 3px;
}

.oc-ai.is-listening .oc-ai__launcher-orb,
.oc-ai.is-listening .oc-ai__avatar {
  border-color: var(--alyz-turquoise);
  animation: alyz-listening 1.5s ease-out infinite;
}

@keyframes alyz-listening {
  0%, 100% { box-shadow: 0 0 0 0 rgb(66 223 207 / 0%); }
  50% { box-shadow: 0 0 0 5px rgb(66 223 207 / 13%); }
}

@media (hover: hover) {
  .oc-ai .oc-ai__voice-action:hover:not(:disabled) {
    border-color: #83bfb5;
    background: #e7f6f1;
  }

  .oc-ai .oc-ai__close:hover {
    background: #2a4246;
  }
}

@media (max-width: 640px) {
  .oc-ai .oc-ai__launcher {
    width: auto;
    min-width: 128px;
    height: 58px;
    padding: 7px 14px 7px 7px;
    gap: 9px;
    border-radius: 20px;
  }

  .oc-ai .oc-ai__launcher > span:nth-child(2) {
    display: grid;
  }

  .oc-ai .oc-ai__launcher small {
    display: none;
  }

  .oc-ai .oc-ai__launcher strong {
    font-size: .9375rem;
  }

  .oc-ai .oc-ai__panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
    border-radius: 20px;
  }

  .oc-ai .oc-ai__head {
    min-height: 76px;
    gap: 10px;
  }

  .oc-ai .oc-ai__brand small {
    font-size: .8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .oc-ai.is-listening .oc-ai__launcher-orb,
  .oc-ai.is-listening .oc-ai__avatar {
    animation: none;
  }

  .oc-ai .oc-ai__panel,
  .oc-ai .oc-ai__launcher i,
  .oc-ai .oc-ai__quick button {
    transition: none;
  }
}

/* Keep the panel inside the viewport when WPVibe adds its preview banner. */
body:has(#wpvibe-preview-banner) .oc-ai .oc-ai__panel {
  max-height: calc(100vh - 170px);
  max-height: calc(100dvh - 170px);
}
