/* ISA Front UI Common — layout + scrollbars dodgerblue */

@import "./neon-theme.css";

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

/* Placeholder en index.html hasta que React monte la app */

@keyframes isa-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Layout compartido (AppShell) — body sin scroll; scroll por sección */

/* Marca AppShell — icono + nombre desde AppMeta (index.html) */

/* Chip de sesión en AppBar — fondo suave sin icono */

#root {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

* {
  scrollbar-width: thin; scrollbar-color: rgba(30, 144, 255, 0.5) transparent;
  &::-webkit-scrollbar {
    width: 10px; height: 10px;
  }
  &::-webkit-scrollbar-thumb {
    background: rgba(30, 144, 255, 0.45); border-radius: 6px;
  }
}

.header-session-chip {
  &.MuiChip-clickable {
    &:focus-visible {
      background: rgba(20, 184, 166, 0.28);
    }
    &:hover {
      background: rgba(20, 184, 166, 0.28);
    }
  }
  &.MuiChip-root {
    background: rgba(20, 184, 166, 0.18);
    border: 1px solid rgba(20, 184, 166, 0.32);
    color: #5eead4;
    font-weight: 600;
    box-shadow: none;
  }
  html[data-mui-color-scheme="light"] & {
    &.MuiChip-clickable {
      &:focus-visible {
        background: rgba(20, 184, 166, 0.2);
      }
      &:hover {
        background: rgba(20, 184, 166, 0.2);
      }
    }
    &.MuiChip-root {
      background: rgba(20, 184, 166, 0.12);
      border-color: rgba(20, 184, 166, 0.26);
      color: #0f766e;
    }
  }
}

.header-session-chip.MuiChip-root {
  & .MuiChip-label {
    color: inherit;
  }
}

.header-session-avatar-btn {
  padding: 0 !important;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 2px solid rgba(20, 184, 166, 0.45);
  background: rgba(15, 23, 42, 0.35);
  &--view-as {
    border-color: rgba(245, 158, 11, 0.55);
  }
  &:hover {
    border-color: rgba(20, 184, 166, 0.75);
    background: rgba(20, 184, 166, 0.12);
  }
}

.header-session-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

html[data-mui-color-scheme="light"] .header-session-avatar-btn {
  border-color: rgba(20, 184, 166, 0.38);
  background: rgba(255, 255, 255, 0.92);
  &--view-as {
    border-color: rgba(245, 158, 11, 0.5);
  }
}

.isa-app-boot {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--isa-text-secondary, #94a3b8);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  &--inline {
    min-height: 12rem;
    padding: 1.5rem;
  }
  &__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding: 1.65rem 2rem 1.45rem;
    min-width: min(17.5rem, 88vw);
    max-width: 22rem;
    border-radius: 14px;
    border: 1px solid rgba(0, 229, 255, 0.24);
    background: linear-gradient(165deg, rgba(11, 18, 32, 0.94), rgba(15, 23, 42, 0.82));
    box-shadow:
      0 0 0 1px rgba(30, 144, 255, 0.08),
      0 10px 36px rgba(30, 144, 255, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
  }
  &__card--compact {
    min-width: min(14rem, 100%);
    padding: 1.25rem 1.5rem 1.1rem;
    gap: 0.4rem;
  }
  &__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.1rem;
    height: 3.1rem;
    margin-bottom: 0.15rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 229, 255, 0.38);
    background: rgba(14, 165, 233, 0.12);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.16);
    color: #7dd3fc;
  }
  &__icon-wrap--sm {
    width: 2.35rem;
    height: 2.35rem;
    margin-bottom: 0;
    border-radius: 10px;
  }
  &__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #e2e8f0;
    line-height: 1.25;
  }
  &__label {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.35;
  }
  &__bar {
    width: 100%;
    height: 3px;
    margin-top: 0.45rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
    overflow: hidden;
  }
  &__bar-fill {
    display: block;
    height: 100%;
    width: 36%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1e90ff, #6366f1, #00e5ff);
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.4);
    animation: isa-boot-bar-slide 1.75s ease-in-out infinite;
  }
  & iconify-icon.isa-spin {
    animation: isa-spin 1s linear infinite;
  }
  html[data-mui-color-scheme="light"] & {
    &__card {
      border-color: rgba(30, 144, 255, 0.2);
      background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.92));
      box-shadow: 0 8px 28px rgba(30, 144, 255, 0.1);
    }
    &__icon-wrap {
      border-color: rgba(30, 144, 255, 0.28);
      background: rgba(224, 242, 254, 0.95);
      color: #0369a1;
      box-shadow: 0 0 14px rgba(30, 144, 255, 0.12);
    }
    &__title {
      color: #0f172a;
    }
    &__label {
      color: #64748b;
    }
    &__bar {
      background: rgba(148, 163, 184, 0.28);
    }
  }
}

@keyframes isa-boot-bar-slide {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(330%); }
}

@media (prefers-reduced-motion: reduce) {
  .isa-app-boot__bar-fill {
    animation: none !important;
  }
}

.isa-app-brand {
  user-select: none;
  line-height: 1.2;
  & .MuiTypography-root {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
  }
  &--clickable {
    &:focus-visible {
      outline: 2px solid var(--neon-blue, #1e90ff);
      outline-offset: 2px;
    }
  }
}

.isa-layout-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.isa-layout-root {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.isa-mobile-nav-drawer {
  box-sizing: border-box !important;
  overflow: hidden !important;
  & .MuiListItemButton-root.Mui-selected {
    background: rgba(30, 144, 255, 0.14);
  }
}

.isa-scroll-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.isa-view-frame {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.panel {
  border: 1px solid rgba(30, 144, 255, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
  background: rgba(30, 144, 255, 0.04);
}

.paty-mobile-sidebar-drawer {
  box-sizing: border-box !important;
  overflow: hidden !important;
  & .conv-log-action-grp {
    max-width: 100%;
    min-width: 0;
  }
  & .conv-log-sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  & .conv-log-sidebar-block {
    max-width: 100%;
    min-width: 0;
  }
  & .paty-chat-sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

.rule-mono {
  font-family: Consolas, monospace; font-size: 0.82rem; word-break: break-all;
}

body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  font-family: "IBM Plex Sans", "Space Grotesk", system-ui, sans-serif;
}

html {
  height: 100%;
  overflow: hidden;
}


@media (max-width: 899px) {
  .isa-app-brand {
    & .MuiTypography-root {
      font-size: 0.95rem;
    }
  }

  .isa-layout-root {
    & .MuiAppBar-root .MuiToolbar-root {
      min-height: 44px;
      gap: 0.25rem;
    }
  }

}

/* nest-css-max:processed */
