/* IRIA Summit — Assistente Guia (UI leve, navy + cyan) */
.iria-chat {
  position: fixed !important;
  inset: auto 1rem 1rem auto !important;
  left: auto !important;
  top: auto !important;
  right: 1rem !important;
  bottom: 1rem !important;
  z-index: 2147483000 !important;
  width: auto;
  height: auto;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
  font-family: "DM Sans", system-ui, sans-serif;
}

.iria-chat__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: transparent;
  pointer-events: none;
}

.iria-chat__backdrop[hidden] {
  display: none !important;
}

.iria-chat__toggle,
.iria-chat__panel {
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.iria-chat__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  padding: 0.3rem 0.8rem 0.3rem 0.3rem;
  background: rgba(11, 29, 58, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), 0 0 20px rgba(34, 211, 238, 0.1);
  cursor: pointer;
  float: right;
  clear: both;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.iria-chat__toggle:hover {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), 0 0 24px rgba(34, 211, 238, 0.16);
  transform: translateY(-1px);
}

.iria-chat__toggle:focus {
  outline: none;
}

.iria-chat__toggle:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.9);
  outline-offset: 3px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), 0 0 0 4px rgba(34, 211, 238, 0.18);
}

.iria-chat__toggle-avatar {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  border: 1.5px solid rgba(34, 211, 238, 0.45);
  flex-shrink: 0;
  background: #0b1d3a;
}

.iria-chat__toggle-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  padding-right: 0.2rem;
}

.iria-chat__toggle-eyebrow {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(34, 211, 238, 0.95);
  line-height: 1.2;
}

.iria-chat__toggle-label {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.2;
  text-transform: none;
}

.iria-chat.is-open .iria-chat__toggle {
  display: none;
}

.iria-chat__panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(340px, calc(100vw - 1.5rem));
  height: min(78vh, 640px);
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.18);
  background:
    linear-gradient(180deg, rgba(14, 28, 52, 0.78) 0%, rgba(12, 24, 46, 0.8) 55%, rgba(10, 20, 40, 0.86) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28), 0 0 28px rgba(34, 211, 238, 0.05);
}

.iria-chat__panel[hidden] {
  display: none !important;
}

.iria-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem 0.75rem;
  flex-shrink: 0;
  /* Escape site-wide `header` rules (iria-premium !important nearly-black bar) */
  background: rgba(14, 22, 56, 0.35) !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(34, 211, 238, 0.14) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.iria-chat__header::before,
.iria-chat__header::after {
  display: none !important;
  content: none !important;
  background: none !important;
  box-shadow: none !important;
}

.iria-chat__identity {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.iria-chat__identity .iria-guia-avatar {
  width: 2.55rem;
  height: 2.55rem;
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
}

.iria-chat__identity-text {
  min-width: 0;
}

.iria-chat__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.iria-chat__eyebrow {
  margin-top: 0.15rem;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.35;
}

.iria-chat__close {
  width: 1.85rem;
  height: 1.85rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.iria-chat__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.iria-chat__close:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.85);
  outline-offset: 2px;
}

.iria-chat__messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.95rem 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.iria-chat__messages::-webkit-scrollbar {
  width: 5px;
}

.iria-chat__messages::-webkit-scrollbar-track {
  background: transparent;
}

.iria-chat__messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.iria-chat__row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: 100%;
}

.iria-chat__row--assistant {
  align-self: flex-start;
}

.iria-chat__row--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.iria-chat__msg-avatar {
  width: 1.7rem !important;
  height: 1.7rem !important;
  border-width: 1px !important;
  box-shadow: none !important;
  opacity: 0.95;
}

.iria-chat__bubble {
  max-width: 92%;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  font-size: 0.84rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.iria-chat__bubble a {
  color: #67e8f9;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.iria-chat__bubble--assistant {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom-left-radius: 5px;
}

.iria-chat__bubble--user {
  background: rgba(34, 211, 238, 0.16);
  color: #fff;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-bottom-right-radius: 5px;
}

.iria-chat__bubble--muted {
  opacity: 0.7;
  font-style: italic;
}

.iria-chat__shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.1rem 0 0.15rem;
}

.iria-chat__chip {
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 0.38rem 0.72rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.iria-chat__chip:hover {
  background: rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.45);
  color: #fff;
}

.iria-chat__chip:focus {
  outline: none;
}

.iria-chat__chip:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.85);
  outline-offset: 2px;
}

.iria-chat__chip:disabled {
  opacity: 0.45;
  cursor: wait;
}

.iria-chat__form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 0.45rem;
  padding: 0.65rem 0.8rem 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.iria-chat__input {
  width: 100%;
  resize: none;
  min-height: 2.55rem;
  max-height: 6.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 0.65rem 0.75rem;
  font-size: 0.84rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.iria-chat__input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.iria-chat__input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.iria-chat__send {
  align-self: end;
  border: 0;
  border-radius: 12px;
  min-height: 2.55rem;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.92), rgba(15, 118, 110, 0.95));
  color: #041018;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.iria-chat__send:hover {
  filter: brightness(1.06);
}

.iria-chat__send:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.9);
  outline-offset: 2px;
}

.iria-chat__send:disabled {
  opacity: 0.55;
  cursor: wait;
}

.iria-chat__disclaimer {
  padding: 0 0.85rem 0.7rem;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.38);
  flex-shrink: 0;
}

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

@media (max-width: 767.98px) {
  .iria-chat {
    inset: auto 0.75rem 0.75rem auto !important;
    right: 0.75rem !important;
    bottom: 0.75rem !important;
  }

  .iria-chat__toggle-copy {
    display: none;
  }

  .iria-chat__toggle {
    width: 3.35rem;
    height: 3.35rem;
    justify-content: center;
    padding: 0.2rem;
    border-radius: 999px;
    float: none;
  }

  .iria-chat__toggle-avatar {
    width: 2.85rem;
    height: 2.85rem;
  }

  .iria-chat.is-open {
    inset: auto 0.55rem 0.55rem auto !important;
    right: 0.55rem !important;
    bottom: 0.55rem !important;
    left: auto !important;
    top: auto !important;
    width: auto;
    height: auto;
    display: block;
  }

  .iria-chat.is-open .iria-chat__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(340px, calc(100vw - 1.1rem));
    height: min(76vh, 620px);
    max-height: min(76vh, 620px);
    border-radius: 18px;
  }

  .iria-chat__header {
    padding: 0.75rem 0.8rem 0.65rem;
  }

  .iria-chat__eyebrow {
    font-size: 0.62rem;
  }

  .iria-chat__chip {
    font-size: 0.68rem;
    padding: 0.32rem 0.58rem;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
}

.iria-premium-theme #wrapper > .iria-chat,
body > .iria-chat {
  position: fixed !important;
  z-index: 2147483000 !important;
}

html.iria-chat-lock,
html.iria-chat-lock body {
  overflow: hidden !important;
}
