/* ResnSec360 website assistant widget.
   Standalone stylesheet (not part of the Tailwind build) using the same
   Dell-theme tokens as the rest of the site. */

.rs-assist {
  --rs-deep: #0A1119;
  --rs-deep-2: #101926;
  --rs-blue: #0076CE;
  --rs-blue-dark: #004B8D;
  --rs-ink: #1D1D1D;
  --rs-slate: #595959;
  --rs-border: #DDDDDD;
  --rs-page: #F5F5F5;
  --rs-soft: #E3F0FB;
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 45;
  font-family: "Instrument Sans", "Segoe UI", system-ui, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--rs-ink);
}

/* Keep the site's back-to-top button clear of the launcher. */
.to-top { bottom: 5.25rem !important; }

.rs-assist__launcher {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--rs-deep);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(10, 17, 25, .25);
  transition: background-color 150ms ease, transform 150ms ease;
}
.rs-assist__launcher:hover { background: var(--rs-blue); }
.rs-assist__launcher:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(0, 118, 206, .30); }
.rs-assist.is-open .rs-assist__launcher { display: none; }

.rs-assist__panel {
  width: min(24rem, calc(100vw - 2.5rem));
  max-height: min(40rem, calc(100vh - 2.5rem));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--rs-border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(10, 17, 25, .28);
  overflow: hidden;
}
.rs-assist__panel[hidden] { display: none; }

.rs-assist__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  padding: .9rem 1rem;
  background: var(--rs-deep);
  color: #fff;
}
.rs-assist__head strong { display: block; font-size: 15px; font-weight: 700; }
.rs-assist__head span { display: block; font-size: 12px; color: rgba(255, 255, 255, .7); }
.rs-assist__close {
  flex: none;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
}
.rs-assist__close:hover { background: rgba(255, 255, 255, .18); }

.rs-assist__log {
  flex: 1 1 auto;
  min-height: 12rem;
  overflow-y: auto;
  padding: 1rem;
  background: var(--rs-page);
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.rs-assist__msg {
  max-width: 88%;
  padding: .6rem .8rem;
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.rs-assist__msg p { margin: 0; }
.rs-assist__msg p + p, .rs-assist__msg ul + p, .rs-assist__msg p + ul { margin-top: .5rem; }
.rs-assist__msg ul { margin: 0; padding-left: 1.1rem; }
.rs-assist__msg li + li { margin-top: .2rem; }
.rs-assist__msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--rs-border);
  border-bottom-left-radius: 4px;
}
.rs-assist__msg--user {
  align-self: flex-end;
  background: var(--rs-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.rs-assist__msg--error {
  align-self: flex-start;
  background: #FDECEA;
  border: 1px solid #F5C6C2;
  color: #8A1C13;
}
.rs-assist__msg.is-typing::after {
  content: "";
  display: inline-block;
  width: .9em;
  border-bottom: 2px solid var(--rs-slate);
  margin-left: .15em;
  animation: rs-assist-blink 1s steps(2, start) infinite;
}
@keyframes rs-assist-blink { to { visibility: hidden; } }

.rs-assist__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .6rem 1rem 0;
  background: #fff;
}
.rs-assist__suggestions[hidden] { display: none; }
.rs-assist__suggestions button {
  font: inherit;
  font-size: 12px;
  padding: .35rem .7rem;
  border: 1px solid var(--rs-border);
  border-radius: 999px;
  background: var(--rs-soft);
  color: var(--rs-blue-dark);
  cursor: pointer;
}
.rs-assist__suggestions button:hover { border-color: var(--rs-blue); }

.rs-assist__form {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  padding: .75rem 1rem .5rem;
  background: #fff;
}
.rs-assist__form textarea {
  flex: 1 1 auto;
  resize: none;
  font: inherit;
  padding: .55rem .7rem;
  border: 1px solid var(--rs-border);
  border-radius: 10px;
  background: #fff;
  color: var(--rs-ink);
}
.rs-assist__form textarea:focus { outline: 0; border-color: var(--rs-blue); box-shadow: 0 0 0 3px rgba(0, 118, 206, .30); }
.rs-assist__send {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--rs-deep);
  color: #fff;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.rs-assist__send:hover { background: var(--rs-blue); }
.rs-assist__send:disabled { opacity: .5; cursor: default; }

.rs-assist__note {
  margin: 0;
  padding: 0 1rem .8rem;
  font-size: 11px;
  color: var(--rs-slate);
  background: #fff;
}
.rs-assist__note a { color: var(--rs-blue); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 640px) {
  .rs-assist { right: .75rem; bottom: .75rem; left: .75rem; }
  .rs-assist__launcher { margin-left: auto; display: inline-flex; }
  .rs-assist:not(.is-open) { display: flex; justify-content: flex-end; }
  .rs-assist__panel { width: 100%; max-height: calc(100vh - 1.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  .rs-assist__launcher, .rs-assist__send { transition: none; }
  .rs-assist__msg.is-typing::after { animation: none; }
}
