/* Blend the live Ozzi engine into Jerry's /home/ chrome. */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ozzi-live-shell {
  width: 100%;
}

.ozzi-live-shell .oz-tab-bar {
  max-width: none;
  padding: 0;
  margin: 0 0 12px;
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.hero-ozzi-panel .oz-tab-bar .oz-tab,
.ozzi-page-panel .oz-tab-bar .oz-tab {
  color: rgba(255, 255, 255, 0.72);
}

.hero-ozzi-panel .oz-tab-bar .oz-tab.active,
.ozzi-page-panel .oz-tab-bar .oz-tab.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-bottom-color: #fff;
}

.page-tight .ozzi-page-panel .oz-tab-bar {
  border-bottom-color: rgba(30, 48, 59, 0.12);
}

.page-tight .ozzi-page-panel .oz-tab-bar .oz-tab {
  color: #4a6270;
}

.page-tight .ozzi-page-panel .oz-tab-bar .oz-tab.active {
  color: #17384d;
  background: rgba(23, 56, 77, 0.06);
  border-bottom-color: #17384d;
}

.ozzi-live-shell .oz-panel {
  display: none;
}

.ozzi-live-shell .oz-panel.active {
  display: block;
}

.ozzi-live-mount #ozzy-chat-log.ozzy-chat-log-collapsed {
  display: none;
}

.ozzi-live-mount #ozzy-chat-log:not(.ozzy-chat-log-collapsed) {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: min(48vh, 420px);
  overflow-y: auto;
  overscroll-behavior: auto;
  padding: 0.5rem 0.55rem;
  border: 1px solid rgba(51, 101, 138, 0.12);
  background: rgba(238, 245, 248, 0.72);
  margin: 0 0 12px;
}

@media (max-width: 768px) {
  html.ozzi-has-chat .hero-ozzi-panel:not(.is-fs) #ozzy-chat-log:not(.ozzy-chat-log-collapsed),
  html.ozzi-has-chat .ozzi-page-panel:not(.is-fs) #ozzy-chat-log:not(.ozzy-chat-log-collapsed) {
    max-height: min(52dvh, 22rem);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: auto;
  }
}

/* Homepage + Meet Ozzi use the same compact chat chrome */
.hero-ozzi-panel .ozzy-local-weather,
.hero-ozzi-panel .ozzy-chat-secondary,
.ozzi-page-panel .ozzy-local-weather,
.ozzi-page-panel .ozzy-chat-secondary {
  display: none;
}

.hero-ozzi-panel .oz-tab-bar,
.ozzi-page-panel .oz-tab-bar {
  display: none;
}

.hero-ozzi-panel #ozzy-chat-log .user-msg,
.ozzi-page-panel #ozzy-chat-log .user-msg {
  color: #fff;
}

.hero-ozzi-panel #ozzy-chat-log .ai-msg,
.ozzi-page-panel #ozzy-chat-log .ai-msg {
  color: var(--ink, #1a2c36);
}

.hero-ozzi-panel #ozzy-chat-log .ozzy-formatted a,
.ozzi-page-panel #ozzy-chat-log .ozzy-formatted a {
  color: var(--green-deep, #3d6b47);
}

.ozzi-inline-results {
  margin: 0.35rem 0 0.65rem;
}

.ozzi-live-mount .ozzi-inline-results .ozzi-biz {
  color: var(--ink, #1a2c36);
}

/* Let Jerry's .ozzi-form grid handle layout — no custom overrides needed */

.ozzi-live-mount .ozzy-local-weather {
  margin-top: 10px;
}

.hero-ozzi-panel .ozzy-local-weather-link,
.hero-ozzi-panel .ozzy-text-link {
  color: rgba(255, 255, 255, 0.82);
}

.home .ozzy-category-nav,
.ozzi-page-panel .ozzy-category-nav {
  display: none;
}

html.ozzi-has-chat .ozzi-suggest,
html.ozzi-has-chat [data-ozzi-static-welcome] {
  display: none;
}

.ozzi-live-shell .legacy-search-runtime {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.ozzi-live-shell .oz-events-frame-wrap {
  max-width: none;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.ozzi-live-shell .oz-events-frame {
  min-height: 72vh;
}

html.ozzi-results-active .ozzi-live-mount #oz-panel-results,
.ozzi-live-shell #oz-panel-results.active {
  background: #fff;
  color: #17384d;
  border-radius: 14px;
  padding: 12px;
}

.ozzi-live-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 22, 28, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.ozzi-live-overlay[hidden] {
  display: none !important;
}

.ozzi-live-overlay-panel {
  position: relative;
  width: min(40rem, 100%);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--white, #fff);
  color: var(--ink, #1a2c36);
  border-radius: var(--radius-lg, 16px);
  padding: 0.85rem 1.05rem 1.1rem;
  border-top: 4px solid var(--yellow, #f1b71b);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.ozzi-live-overlay-panel .ozzi-live-shell,
.ozzi-live-overlay-panel .ozzi-live-shell .oz-panel.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.ozzi-live-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.55rem;
  min-height: 2rem;
}

.ozzi-live-overlay-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink, #1a2c36);
}

.ozzi-live-overlay-close {
  flex: 0 0 auto;
  margin: -0.15rem -0.35rem -0.15rem 0;
  border: 0;
  background: transparent;
  color: var(--ink, #1a2c36);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ozzi-live-overlay-panel.is-fs .ozzi-live-overlay-head {
  display: none;
}

.ozzi-live-overlay:has(.is-fs) {
  padding: 0;
  background: #fff;
  align-items: stretch;
}

@media (max-width: 768px) {
  .ozzi-live-overlay {
    align-items: stretch;
    padding: 8px;
  }

  .ozzi-live-overlay-panel {
    width: 100%;
    max-height: calc(100dvh - 16px);
  }

  html.ozzi-has-chat .ozzi-live-overlay-panel:not(.is-fs) #ozzy-chat-log:not(.ozzy-chat-log-collapsed) {
    max-height: min(52dvh, 22rem);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: auto;
  }
}

body.ozzi-live-overlay-open {
  overflow: hidden;
}

.ozzy-thinking-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  opacity: 0.85;
}

.ozzi-clear-confirm {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ozzi-clear-confirm[hidden] {
  display: none !important;
}

.ozzi-clear-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 28, 0.5);
}

.ozzi-clear-confirm-panel {
  position: relative;
  width: min(22.5rem, 100%);
  background: var(--white, #fff);
  color: var(--ink, #1a2c36);
  border-radius: var(--radius-lg, 8px);
  border-top: 4px solid var(--yellow, #f1b71b);
  padding: 1.1rem 1.15rem 1.15rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.ozzi-clear-confirm-panel h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.2rem;
  line-height: 1.25;
}

.ozzi-clear-confirm-panel p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted, #54707e);
}

.ozzi-clear-confirm-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55rem;
}

.ozzi-clear-confirm-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius, 3px);
  border: 1.5px solid rgba(51, 101, 138, 0.22);
  background: transparent;
  color: var(--dark-blue, #2f4858);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.ozzi-clear-confirm-cancel:hover,
.ozzi-clear-confirm-cancel:focus-visible {
  background: rgba(47, 72, 88, 0.06);
  outline: none;
}

.ozzi-clear-confirm-actions .btn {
  min-height: 2.4rem;
  padding: 0.45rem 1.05rem;
  font-size: 0.92rem;
}

/* hero Send: keep Jerry yellow over live #ozzy-chat-send blue */
#ozzy-chat-send.btn-primary,
#ozzy-chat-send.btn,
.hero-ozzi-panel #ozzy-chat-send,
.ozzi-page-panel #ozzy-chat-send,
[data-ozzi-form] #ozzy-chat-send {
  background: var(--yellow, #f1b71b) !important;
  color: var(--ink, #1a2b33) !important;
  border-color: var(--yellow, #f1b71b) !important;
}
#ozzy-chat-send.btn-primary:hover,
#ozzy-chat-send.btn:hover,
.hero-ozzi-panel #ozzy-chat-send:hover,
.ozzi-page-panel #ozzy-chat-send:hover,
[data-ozzi-form] #ozzy-chat-send:hover {
  background: var(--yellow-hot, #ffc93a) !important;
  color: var(--ink, #1a2b33) !important;
  border-color: var(--yellow-hot, #ffc93a) !important;
}
