/* =========================================
   IC ENGLISH ASSISTANT — PREMIUM GLASS UI
========================================= */

.ic-assistant {
  --ic-navy: #061936;
  --ic-navy-deep: #03122b;
  --ic-blue: #0b4ddb;
  --ic-blue-bright: #1768ff;
  --ic-yellow: #ffd21f;
  --ic-white: #ffffff;
  --ic-text-soft: rgba(255, 255, 255, 0.72);
  --ic-line: rgba(255, 255, 255, 0.14);
  --ic-glass: rgba(7, 29, 67, 0.84);
  --ic-glass-light: rgba(255, 255, 255, 0.075);

  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 99999;

  font-family: Inter, Arial, sans-serif;
  color: var(--ic-white);
}

.ic-assistant,
.ic-assistant * {
  box-sizing: border-box;
}

.ic-assistant__message-link {
  color: #ffd21f;
  text-decoration: underline;
  text-decoration-color: rgba(255, 210, 31, 0.45);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.ic-assistant__message-link:hover {
  color: #ffffff;
  text-decoration-color: #ffd21f;
}

/* =========================================
   FLOATING LAUNCHER
========================================= */

.ic-assistant__launcher {
  position: relative;
  isolation: isolate;

  min-height: 60px;
  padding: 0 22px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;

  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;

  background:
    linear-gradient(
      145deg,
      rgba(26, 85, 214, 0.88),
      rgba(4, 30, 83, 0.92)
    );

  color: var(--ic-white);

  font-family: Montserrat, Inter, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;

  cursor: pointer;
  overflow: hidden;

  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);

  box-shadow:
    0 22px 55px rgba(0, 18, 60, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);

  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.ic-assistant__launcher::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.13),
      transparent 40%
    );

  pointer-events: none;
  z-index: -1;
}

.ic-assistant__launcher-glow {
  position: absolute;
  inset: auto 15% -26px;

  height: 38px;

  background: rgba(23, 104, 255, 0.68);
  filter: blur(28px);

  pointer-events: none;
  z-index: -2;
}

.ic-assistant__launcher:hover {
  transform: translateY(-3px);

  border-color: rgba(255, 210, 31, 0.48);

  box-shadow:
    0 27px 66px rgba(0, 18, 60, 0.52),
    0 0 28px rgba(23, 104, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.ic-assistant__launcher:focus-visible {
  outline: 2px solid var(--ic-yellow);
  outline-offset: 4px;
}

.ic-assistant__launcher-icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}


/* =========================================
   MAIN PANEL
========================================= */

.ic-assistant__panel {
    
position: absolute;
  right: 0;
  bottom: 78px;

  width: min(420px, calc(100vw - 34px));
  height: min(650px, calc(100vh - 120px));

  display: none;
  flex-direction: column;

  /* IMPORTANT: override global section styling */
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  padding: 0;
  text-align: left;

  overflow: hidden;

  border: 1px solid rgba(154, 190, 255, 0.34);
  border-radius: 20px;

  background:
    radial-gradient(
      circle at 85% 4%,
      rgba(46, 101, 216, 0.28),
      transparent 30%
    ),
    linear-gradient(
      160deg,
      rgba(15, 43, 92, 0.91),
      rgba(3, 18, 50, 0.95)
    );

  backdrop-filter: blur(30px) saturate(145%);
  -webkit-backdrop-filter: blur(30px) saturate(145%);

  box-shadow:
    0 36px 100px rgba(0, 10, 40, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);

  transform-origin: bottom right;
}

.ic-assistant__panel::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.055),
      transparent 26%,
      transparent 72%,
      rgba(0, 88, 255, 0.06)
    );

  pointer-events: none;
}

.ic-assistant__panel.is-open {
  display: flex;
  animation: icAssistantOpen 280ms cubic-bezier(0.2, 0.75, 0.3, 1);
}

@keyframes icAssistantOpen {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.965);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* =========================================
   HEADER
========================================= */

.ic-assistant__header {
  position: relative;
  z-index: 2;

  padding: 24px 24px 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ic-assistant__identity {
  display: flex;
  align-items: center;
  gap: 13px;
}

.ic-assistant__mark,
.ic-assistant__avatar {
  display: grid;
  place-items: center;

  border: 1px solid rgba(255, 210, 31, 0.55);
  color: var(--ic-white);

  font-family: Montserrat, Inter, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.05em;

  background:
    linear-gradient(
      145deg,
      rgba(24, 74, 176, 0.78),
      rgba(3, 16, 48, 0.88)
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 24px rgba(0, 8, 35, 0.3);
}

.ic-assistant__mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 15px;
}

.ic-assistant__brand {
  margin: 0 0 4px;

  color: var(--ic-white);

  font-family: Montserrat, Inter, Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.ic-assistant__status {
  margin: 0;

  display: flex;
  align-items: center;
  gap: 7px;

  color: var(--ic-text-soft);
  font-size: 12px;
  font-weight: 500;
}

.ic-assistant__status-dot {
  width: 8px;
  height: 8px;

  flex: 0 0 auto;

  border-radius: 50%;
  background: #68d25c;

  box-shadow:
    0 0 0 4px rgba(104, 210, 92, 0.09),
    0 0 12px rgba(104, 210, 92, 0.38);
}

.ic-assistant__close {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border: 1px solid transparent;
  border-radius: 12px;

  background: transparent;
  color: rgba(255, 255, 255, 0.78);

  cursor: pointer;

  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.ic-assistant__close:hover {
  color: var(--ic-white);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.12);
}

.ic-assistant__close:focus-visible {
  outline: 2px solid var(--ic-yellow);
  outline-offset: 2px;
}

.ic-assistant__close svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.6;
}


/* =========================================
   GOLD ACCENT LINE
========================================= */

.ic-assistant__accent-line {
  position: relative;
  z-index: 2;

  height: 1px;
  margin: 0 24px;

  background: rgba(255, 255, 255, 0.1);
}

.ic-assistant__accent-line span {
  display: block;
  width: 82px;
  height: 2px;

  background:
    linear-gradient(
      90deg,
      var(--ic-yellow),
      rgba(255, 210, 31, 0)
    );

  box-shadow: 0 0 12px rgba(255, 210, 31, 0.24);
}


/* =========================================
   MESSAGE AREA
========================================= */

.ic-assistant__body {
  position: relative;
  z-index: 2;

flex: 1 1 0;
  min-height: 0;
  width: 100%;

  padding: 22px 24px 18px;
margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;

  scrollbar-width: thin;
  scrollbar-color:
    rgba(255, 255, 255, 0.2)
    transparent;
}

.ic-assistant__body::-webkit-scrollbar {
  width: 5px;
}

.ic-assistant__body::-webkit-scrollbar-track {
  background: transparent;
}

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

.ic-assistant__message {
  display: flex;
  align-items: flex-start;
  gap: 11px;

  margin-bottom: 18px;
}

.ic-assistant__message--bot {
  justify-content: flex-start;
}

.ic-assistant__message--user {
  justify-content: flex-end;
}

.ic-assistant__avatar {
  width: 35px;
  height: 35px;

  flex: 0 0 auto;
  border-radius: 50%;

  font-size: 11px;
}

.ic-assistant__bubble {
  max-width: 82%;
  padding: 15px 17px;

  display: flex;
  flex-direction: column;
  gap: 4px;

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;

  color: rgba(255, 255, 255, 0.88);

  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.09),
      rgba(255, 255, 255, 0.045)
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 12px 28px rgba(0, 9, 38, 0.18);
}

.ic-assistant__bubble strong {
  color: var(--ic-white);
  font-weight: 700;
}

.ic-assistant__message--user .ic-assistant__bubble {
  border-color: rgba(67, 125, 255, 0.38);

  background:
    linear-gradient(
      145deg,
      rgba(22, 86, 220, 0.92),
      rgba(5, 51, 145, 0.9)
    );

  color: var(--ic-white);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 28px rgba(0, 35, 120, 0.24);
}


/* =========================================
   QUICK ACTIONS
========================================= */

.ic-assistant__quick-actions {
  display: grid;
  gap: 9px;
  margin-top: 22px;
  margin-bottom: 24px;
}

.ic-assistant__quick-actions button {
  width: 100%;
  min-height: 58px;
  padding: 0 15px;

  display: grid;
  grid-template-columns: 34px 1fr 20px;
  align-items: center;
  gap: 12px;

  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 13px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.075),
      rgba(255, 255, 255, 0.04)
    );

  color: rgba(255, 255, 255, 0.9);

  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;

  cursor: pointer;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055);

  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.ic-assistant__quick-actions button:hover {
  transform: translateX(3px);

  border-color: rgba(255, 210, 31, 0.32);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.11),
      rgba(255, 255, 255, 0.055)
    );
}

.ic-assistant__quick-actions button:focus-visible {
  outline: 2px solid var(--ic-yellow);
  outline-offset: 2px;
}

.ic-assistant__action-icon {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  color: var(--ic-yellow);
}

.ic-assistant__action-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.6;
}

.ic-assistant__action-arrow {
  width: 18px;
  height: 18px;

  justify-self: end;

  color: rgba(255, 255, 255, 0.75);
  stroke-width: 1.6;
}


/* =========================================
   TYPING INDICATOR
========================================= */

.ic-assistant__typing {
  position: relative;
  z-index: 2;

  min-height: 34px;
  padding: 5px 24px 9px;

  display: flex;
  align-items: center;
  gap: 5px;

  color: rgba(255, 255, 255, 0.58);
}

.ic-assistant__typing[hidden] {
  display: none;
}

.ic-assistant__typing span {
  width: 5px;
  height: 5px;

  border-radius: 50%;
  background: rgba(255, 255, 255, 0.56);

  animation: icAssistantTyping 1.2s infinite ease-in-out;
}

.ic-assistant__typing span:nth-child(2) {
  animation-delay: 0.14s;
}

.ic-assistant__typing span:nth-child(3) {
  animation-delay: 0.28s;
}

.ic-assistant__typing small {
  margin-left: 6px;

  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
}

@keyframes icAssistantTyping {
  0%,
  60%,
  100% {
    opacity: 0.32;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}


/* =========================================
   MESSAGE FORM
========================================= */

.ic-assistant__form {
  position: relative;
  z-index: 2;

  margin: 0 24px;
  padding: 7px;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: end;
  gap: 8px;

  border: 1px solid rgba(165, 196, 255, 0.27);
  border-radius: 14px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.07),
      rgba(255, 255, 255, 0.035)
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 15px 35px rgba(0, 8, 34, 0.2);

  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.ic-assistant__form:focus-within {
  border-color: rgba(255, 210, 31, 0.48);

  box-shadow:
    0 0 0 3px rgba(255, 210, 31, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.ic-assistant__form textarea {
  width: 100%;
  min-height: 46px;
  max-height: 120px;
  padding: 13px 11px;

  resize: none;

  border: 0;
  outline: 0;

  background: transparent;
  color: var(--ic-white);

  font: inherit;
  font-size: 16px;
  line-height: 1.45;
}

.ic-assistant__form textarea::placeholder {
  color: rgba(255, 255, 255, 0.43);
}

.ic-assistant__form button {
  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  border: 1px solid var(--ic-yellow);
  border-radius: 11px;

  background:
    linear-gradient(
      145deg,
      rgba(17, 58, 150, 0.94),
      rgba(3, 25, 78, 0.96)
    );

  color: var(--ic-yellow);

  cursor: pointer;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 22px rgba(0, 13, 55, 0.35);

  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.ic-assistant__form button:hover {
  transform: translateY(-1px);

  background: var(--ic-yellow);
  color: var(--ic-navy-deep);
}

.ic-assistant__form button:focus-visible {
  outline: 2px solid var(--ic-white);
  outline-offset: 2px;
}

.ic-assistant__form button svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.65;
}


/* =========================================
   POWERED BY
========================================= */

.ic-assistant__powered {
  position: relative;
  z-index: 2;

  margin: 13px 24px 17px;

  color: rgba(255, 255, 255, 0.34);

  font-family: Montserrat, Inter, Arial, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: center;
}


/* =========================================
   CONDITIONAL WHATSAPP HANDOFF
========================================= */

.ic-assistant__handoff {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  padding: 12px 15px;

  border: 1px solid rgba(97, 239, 119, 0.36);
  border-radius: 12px;

  background:
    linear-gradient(
      145deg,
      rgba(41, 190, 83, 0.84),
      rgba(12, 116, 52, 0.9)
    );

  color: var(--ic-white);

  text-decoration: none;
  font-size: 13px;
  font-weight: 700;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 25px rgba(0, 65, 29, 0.24);

  transition:
    transform 180ms ease,
    filter 180ms ease;
}

.ic-assistant__handoff:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.ic-assistant__handoff svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {
  .ic-assistant {
    right: 14px;
    bottom: 14px;
  }

  .ic-assistant__launcher {
    width: 58px;
    min-height: 58px;
    padding: 0;

    border-radius: 17px;
  }

  .ic-assistant__launcher-label {
    display: none;
  }

  .ic-assistant__panel {
    position: fixed;
    inset: 10px;

    width: auto;
    height: auto;

    border-radius: 18px;
    transform-origin: bottom center;
  }

  .ic-assistant__header {
    padding:
      max(20px, env(safe-area-inset-top))
      20px
      17px;
  }

  .ic-assistant__accent-line {
    margin-inline: 20px;
  }

  .ic-assistant__body {
    padding: 24px 20px 18px;
  }

  .ic-assistant__form {
    margin-inline: 20px;
  }

  .ic-assistant__powered {
    margin-bottom:
      max(15px, env(safe-area-inset-bottom));
  }
}
.ic-assistant__bubble a {
  color: #ffd21f;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  word-break: break-word;
}

.ic-assistant__bubble a:hover {
  color: #ffffff;
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
  .ic-assistant *,
  .ic-assistant *::before,
  .ic-assistant *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.ic-assistant__typing,
.ic-assistant__form,
.ic-assistant__powered {
  flex: 0 0 auto;
}
.ic-assistant__header,
.ic-assistant__accent-line,
.ic-assistant__body,
.ic-assistant__typing,
.ic-assistant__form,
.ic-assistant__powered {
  width: auto;
  max-width: none;
}
