/* Oom assistant - Terrain Tactics brand */

.tt-oom-root[hidden] {
  display: none;
}

.tt-oom-root:not([hidden]) {
  display: block;
}

/* Launcher: smaller tyre button + hover dismiss */
.tt-oom-fab-wrap {
  position: fixed;
  z-index: 1001;
  right: 1.35rem;
  bottom: 1rem;
  width: 3.75rem;
  height: 3.75rem;
  pointer-events: none;
}

.tt-oom-fab-wrap .tt-oom-fab,
.tt-oom-fab-wrap .tt-oom-fab-dismiss {
  pointer-events: auto;
}

.tt-oom-root.tt-oom-fab-hidden .tt-oom-fab-wrap {
  display: none;
}

.tt-oom-fab {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 32% 28%, #3d3d3d 0%, #1f1f1f 42%, #0f0f0f 100%);
  box-shadow:
    0 0 0 2px rgba(45, 45, 45, 0.95),
    0 0 0 4px rgba(196, 31, 37, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -3px 8px rgba(0, 0, 0, 0.45),
    0 8px 22px rgba(0, 0, 0, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tt-oom-fab:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 2px rgba(45, 45, 45, 0.95),
    0 0 0 4px rgba(196, 31, 37, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -3px 8px rgba(0, 0, 0, 0.4),
    0 11px 28px rgba(0, 0, 0, 0.36);
}

.tt-oom-fab:focus-visible {
  outline: 2px solid var(--tt4x4-red, #c41f25);
  outline-offset: 4px;
}

.tt-oom-fab-dismiss {
  position: absolute;
  top: -0.1rem;
  right: -0.1rem;
  z-index: 2;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(15, 15, 15, 0.88);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.tt-oom-fab-wrap:hover .tt-oom-fab-dismiss,
.tt-oom-fab-wrap:focus-within .tt-oom-fab-dismiss {
  opacity: 1;
  transform: scale(1);
}

.tt-oom-fab-dismiss:hover {
  background: var(--tt4x4-red, #c41f25);
}

.tt-oom-fab-dismiss:focus-visible {
  opacity: 1;
  transform: scale(1);
  outline: 2px solid var(--tt4x4-red, #c41f25);
  outline-offset: 2px;
}

.tt-oom-fab-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.28rem 0.35rem;
  text-align: center;
  line-height: 1.05;
  pointer-events: none;
}

.tt-oom-fab-line1 {
  display: block;
  width: 100%;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0.08rem;
}

.tt-oom-fab-line2 {
  display: block;
  width: 100%;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--tt4x4-white, #fff);
}

/* Panel + floating close (outside header bar) */
.tt-oom-panel-shell {
  position: fixed;
  z-index: 1002;
  right: 1.35rem;
  left: auto;
  bottom: 5.85rem;
  width: min(24rem, calc(100vw - 2.75rem));
  max-height: min(42rem, calc(100vh - 5.25rem));
  display: flex;
  flex-direction: column;
  min-height: 0;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.tt-oom-root.tt-oom-open .tt-oom-panel-shell {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.tt-oom-panel-shell .tt-oom-close {
  position: absolute;
  top: -0.45rem;
  right: -0.45rem;
  z-index: 5;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.9);
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}

.tt-oom-panel-shell .tt-oom-close:hover {
  background: var(--tt4x4-red, #c41f25);
  transform: scale(1.06);
}

.tt-oom-panel-shell .tt-oom-close:focus-visible {
  background: var(--tt4x4-red, #c41f25);
  transform: scale(1.06);
  outline: 2px solid var(--tt4x4-white, #fff);
  outline-offset: 2px;
}

.tt-oom-panel {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-height: min(42rem, calc(100vh - 5.25rem));
  display: flex;
  flex-direction: column;
  /* Glass surface */
  background: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.55) inset,
    0 4px 0 var(--tt4x4-red, #c41f25),
    0 24px 48px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  border: 1px solid rgba(31, 31, 31, 0.08);
}

@supports not (backdrop-filter: blur(1px)) {
  .tt-oom-panel {
    background: rgba(245, 245, 245, 0.92);
  }
}
.tt-oom-panel-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0.7rem 0.55rem;
  background: linear-gradient(
    155deg,
    rgba(42, 42, 42, 0.98) 0%,
    rgba(28, 28, 30, 0.99) 38%,
    rgba(22, 22, 24, 0.99) 72%,
    rgba(14, 14, 16, 1) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(196, 31, 37, 0.28);
  color: var(--tt4x4-white, #fff);
  border-bottom: 3px solid var(--tt4x4-red, #c41f25);
}

.tt-oom-panel-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.tt-oom-panel-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.4)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
}

.tt-oom-panel-heading {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.tt-oom-panel-title {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.012em;
}

.tt-oom-panel-disclaimer {
  font-size: 0.56rem;
  font-weight: 500;
  opacity: 0.72;
  line-height: 1.25;
  letter-spacing: 0.01em;
  min-width: 0;
}

.tt-oom-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(243, 244, 246, 0.18);
}

.tt-oom-welcome {
  padding: 0.45rem 0.75rem 0.35rem;
}

.tt-oom-intro {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--tt4x4-red, #c41f25);
  line-height: 1.4;
  margin: 0 0 0.45rem;
}

.tt-oom-presets {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.tt-oom-preset {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 0.72rem;
  line-height: 1.32;
  padding: 0.42rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(31, 31, 31, 0.08);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-dark, #1f2937);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.tt-oom-preset:hover {
  border-color: rgba(196, 31, 37, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tt-oom-preset:focus-visible {
  outline: 2px solid var(--tt4x4-red, #c41f25);
  outline-offset: 2px;
}

.tt-oom-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.2rem 0.75rem 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tt-oom-msg-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 100%;
}

.tt-oom-msg-wrap-user {
  align-self: flex-end;
  max-width: 92%;
}

.tt-oom-msg-wrap-oom {
  align-self: flex-start;
  max-width: 100%;
}

.tt-oom-msg {
  max-width: 100%;
  padding: 0.42rem 0.62rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  line-height: 1.42;
  white-space: pre-wrap;
  word-break: break-word;
}

.tt-oom-msg-user {
  background: var(--tt4x4-dark, #1f1f1f);
  color: var(--tt4x4-white, #fff);
  border-bottom-right-radius: 4px;
}

.tt-oom-msg-oom {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-dark, #1f2937);
  border: 1px solid rgba(229, 231, 235, 0.75);
  border-bottom-left-radius: 4px;
}

.tt-oom-cards {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  width: min(100%, 20.5rem);
}

.tt-oom-card {
  display: grid;
  grid-template-columns: 3.1rem 1fr;
  gap: 0.45rem;
  align-items: center;
  padding: 0.38rem 0.45rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-left-width: 3px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tt-oom-card:hover {
  background: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  color: inherit;
}

.tt-oom-card--vehicle {
  border-left-color: var(--tt4x4-red, #c41f25);
}

.tt-oom-card--classified {
  border-left-color: #2563eb;
}

.tt-oom-card--event {
  border-left-color: #059669;
}

.tt-oom-card--tour {
  border-left-color: #d97706;
}

.tt-oom-card--training {
  border-left-color: #7c3aed;
}

.tt-oom-card--jeep_hire {
  border-left-color: #0891b2;
}

.tt-oom-card-img {
  width: 3.1rem;
  height: 3.1rem;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(243, 244, 246, 0.9);
  flex-shrink: 0;
}

.tt-oom-card-img--empty {
  display: block;
  background: linear-gradient(135deg, rgba(31, 31, 31, 0.08), rgba(196, 31, 37, 0.12));
}

.tt-oom-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.tt-oom-card-type {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.tt-oom-card--vehicle .tt-oom-card-type { color: var(--tt4x4-red, #c41f25); }
.tt-oom-card--classified .tt-oom-card-type { color: #2563eb; }
.tt-oom-card--event .tt-oom-card-type { color: #059669; }
.tt-oom-card--tour .tt-oom-card-type { color: #d97706; }
.tt-oom-card--training .tt-oom-card-type { color: #7c3aed; }
.tt-oom-card--jeep_hire .tt-oom-card-type { color: #0891b2; }

.tt-oom-card-title {
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tt-oom-card-meta {
  font-size: 0.62rem;
  color: #6b7280;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tt-oom-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem;
  margin-top: 0.12rem;
}

.tt-oom-card-tag {
  display: inline-block;
  font-size: 0.56rem;
  line-height: 1.2;
  padding: 0.1rem 0.28rem;
  border-radius: 4px;
  background: rgba(31, 31, 31, 0.06);
  color: #4b5563;
}

.tt-oom-card--vehicle .tt-oom-card-tag {
  background: rgba(196, 31, 37, 0.08);
  color: #7f1d1d;
}

.tt-oom-card-price {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--tt4x4-dark, #1f1f1f);
  line-height: 1.2;
}

.tt-oom-error {
  margin: 0 0.75rem 0.35rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.72rem;
  border-radius: 8px;
  background: rgba(254, 242, 242, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #b91c1c;
  border: 1px solid rgba(254, 202, 202, 0.9);
}

.tt-oom-form {
  flex-shrink: 0;
  padding: 0.45rem 0.75rem 0.6rem;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(229, 231, 235, 0.45);
}

.tt-oom-input {
  display: block;
  width: 100%;
  resize: none;
  border: 1px solid rgba(209, 213, 219, 0.75);
  border-radius: 8px;
  padding: 0.42rem 0.58rem;
  font-size: 0.8125rem;
  line-height: 1.38;
  margin-bottom: 0.4rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.58);
}

.tt-oom-input:focus {
  outline: none;
  border-color: var(--tt4x4-red, #c41f25);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 3px rgba(196, 31, 37, 0.12);
}

.tt-oom-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.tt-oom-human-link {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--tt4x4-red, #c41f25);
  text-decoration: none;
  padding: 0.3rem 0.1rem;
  flex-shrink: 1;
  min-width: 0;
  line-height: 1.2;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tt-oom-human-link:hover {
  color: var(--accent-hover, #bb1f24);
  border-bottom-color: rgba(196, 31, 37, 0.45);
}

.tt-oom-human-link:focus-visible {
  outline: 2px solid var(--tt4x4-red, #c41f25);
  outline-offset: 2px;
  border-radius: 4px;
}

.tt-oom-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.05rem;
  padding: 0 0.95rem;
  border: none;
  border-radius: 8px;
  background: var(--tt4x4-red, #c41f25);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}

.tt-oom-send:hover:not(:disabled) {
  background: var(--accent-hover, #bb1f24);
}

.tt-oom-send:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.tt-oom-send.tt-oom-loading .tt-oom-send-label {
  opacity: 0;
}

.tt-oom-send-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: tt-oom-spin 0.65s linear infinite;
}

.tt-oom-send.tt-oom-loading .tt-oom-send-spinner {
  display: block;
  position: absolute;
}

@keyframes tt-oom-spin {
  to {
    transform: rotate(360deg);
  }
}

.tt-oom-welcome.tt-oom-welcome-hidden {
  display: none;
}

@media (max-width: 575.98px) {
  .tt-oom-panel-shell {
    right: 0.65rem;
    bottom: 5.4rem;
    width: calc(100vw - 1.3rem);
    max-height: min(78vh, 36rem);
  }

  .tt-oom-panel {
    max-height: min(78vh, 36rem);
  }

  .tt-oom-fab-wrap {
    right: 0.85rem;
    bottom: 0.85rem;
    width: 3.5rem;
    height: 3.5rem;
  }

  .tt-oom-fab-line2 {
    font-size: 0.88rem;
  }
}
