/* ============================================================
   aura-support.css  |  AURA Support Widget — Blue Theme
   TerraLeap · UpLeap Technologies
   ============================================================ */

/* ── Launcher pill ── */
.as-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  background: linear-gradient(135deg, #0B1D3B 0%, #1248A0 100%);
  border-radius: 999px;
  box-shadow: 0 12px 38px rgba(11,29,59,.5), 0 4px 12px rgba(0,0,0,.2);
  cursor: pointer;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  border: 1px solid rgba(96,165,250,.32);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: as-launcher-in .55s cubic-bezier(.22,1,.36,1) .4s both;
}
.as-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(74,158,255,.45), 0 4px 14px rgba(0,0,0,.25);
}
.as-launcher:active { transform: translateY(0); }

@keyframes as-launcher-in {
  from { opacity: 0; transform: translateY(20px) scale(.85); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Spinning conic avatar */
.as-launcher-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #3b82f6, #60a5fa, #93c5fd, #2563eb, #3b82f6);
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: as-spin 6s linear infinite;
}
.as-launcher-avatar::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #0B1D3B;
}
.as-launcher-avatar-mark {
  position: relative;
  z-index: 1;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
}
@keyframes as-spin { to { transform: rotate(360deg); } }

/* Launcher text */
.as-launcher-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: #fff;
}
.as-launcher-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 15px;
  font-weight: 500;
  background: linear-gradient(135deg, #fff, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.as-launcher-sub {
  font-size: 9.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(147,197,253,.85);
  margin-top: 1px;
  font-weight: 600;
}

/* Ping ring */
.as-launcher::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid rgba(96,165,250,.55);
  opacity: 0;
  animation: as-launcher-ping 2.6s ease-out infinite .9s;
  pointer-events: none;
}
@keyframes as-launcher-ping {
  0%   { opacity: .7;  transform: scale(.95); }
  100% { opacity: 0;   transform: scale(1.18); }
}

/* ── Panel ── */
.as-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(400px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 80px));
  z-index: 10001;
  background: linear-gradient(180deg, #0B1D3B 0%, #0F3272 50%, #1248A0 100%);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(11,29,59,.52), 0 4px 18px rgba(0,0,0,.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  border: 1px solid rgba(147,197,253,.22);
}
.as-panel.as-open {
  display: flex;
  animation: as-panel-in .4s cubic-bezier(.22,1,.36,1);
}
@keyframes as-panel-in {
  from { opacity: 0; transform: translateY(16px) scale(.96); transform-origin: bottom right; }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.as-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(147,197,253,.14);
  flex-shrink: 0;
}
.as-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #3b82f6, #60a5fa, #93c5fd, #2563eb, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 3px 14px rgba(74,158,255,.5);
  animation: as-spin 6s linear infinite;
}
.as-avatar::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #0B1D3B;
}
.as-avatar-mark {
  position: relative;
  z-index: 1;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  color: #fff;
}
.as-says {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  line-height: 1.15;
}
.as-says em { font-style: normal; color: #93c5fd; font-weight: 400; }
.as-meta {
  font-size: 9.5px;
  color: rgba(147,197,253,.7);
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-top: 2px;
}
.as-min-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,.55);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 10px;
  line-height: 1;
  border-radius: 6px;
}
.as-min-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Body */
.as-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(147,197,253,.25) transparent;
}
.as-body::-webkit-scrollbar { width: 5px; }
.as-body::-webkit-scrollbar-thumb { background: rgba(147,197,253,.25); border-radius: 3px; }

/* Messages */
.as-msg {
  margin-bottom: 12px;
  max-width: 90%;
  animation: as-msg-in .35s cubic-bezier(.22,1,.36,1);
}
@keyframes as-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.as-msg.as-bot {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(147,197,253,.18);
  color: #DBEAFE;
  border-radius: 14px 14px 14px 4px;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.5;
}
.as-msg.as-bot strong { color: #fff; font-weight: 600; }
.as-msg.as-bot a { color: #93c5fd; text-decoration: none; border-bottom: 1px dotted rgba(147,197,253,.4); }
.as-msg.as-user {
  background: linear-gradient(135deg, #1D4ED8, #2563EB);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
  padding: 9px 13px;
  font-size: 13px;
  margin-left: auto;
  box-shadow: 0 2px 10px rgba(29,78,216,.4);
}

/* Choice buttons */
.as-choices {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 6px 0 14px;
  max-width: 92%;
  animation: as-msg-in .4s cubic-bezier(.22,1,.36,1);
}
.as-choice {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(96,165,250,.38);
  color: #93c5fd;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  transition: all .15s ease;
  line-height: 1.35;
}
.as-choice:hover {
  background: rgba(96,165,250,.14);
  color: #fff;
  border-color: #60a5fa;
  transform: translateX(2px);
}
.as-choice .as-choice-icon { margin-right: 8px; opacity: .9; }

/* Course card */
.as-course-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(96,165,250,.25);
  color: #DBEAFE;
  padding: 11px 14px;
  border-radius: 11px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.as-course-card:hover { background: rgba(96,165,250,.12); border-color: #60a5fa; transform: translateX(2px); }
.as-course-card-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(96,165,250,.18); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.as-course-card-meta { flex: 1; min-width: 0; }
.as-course-card-name { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.3; }
.as-course-card-prog { font-size: 10.5px; color: rgba(147,197,253,.8); margin-top: 2px; letter-spacing: .3px; }

/* Category button */
.as-cat {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(96,165,250,.3);
  color: #93c5fd;
  padding: 9px 13px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  transition: all .15s ease;
}
.as-cat:hover { background: rgba(96,165,250,.1); color: #fff; border-color: #60a5fa; }
.as-cat-icon { font-size: 14px; }
.as-cat-arrow { margin-left: auto; opacity: .5; font-size: 11px; }

/* Answer card */
.as-ans {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(96,165,250,.3);
  border-radius: 14px;
  padding: 14px;
  margin: 8px 0 14px;
}
.as-ans-label { font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase; color: #60a5fa; font-weight: 700; margin-bottom: 6px; }
.as-ans-title { font-family: 'Fraunces', Georgia, serif; font-size: 15px; font-weight: 600; color: #fff; line-height: 1.3; margin-bottom: 6px; }
.as-ans-body { font-size: 12.5px; color: rgba(219,234,254,.85); line-height: 1.55; margin-bottom: 10px; }
.as-ans-body p { margin: 0 0 8px; }
.as-ans-body p:last-child { margin-bottom: 0; }
.as-ans-body strong { color: #fff; font-weight: 600; }
.as-ans-body code { background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 4px; font-family: ui-monospace, monospace; font-size: 11.5px; }
.as-ans-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.as-ans-btn {
  flex: 1; min-width: 0;
  background: linear-gradient(135deg, #1D4ED8, #2563EB);
  color: #fff; border: none; border-radius: 8px;
  padding: 8px 12px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; text-decoration: none; text-align: center;
  font-family: 'DM Sans', sans-serif; transition: all .15s; white-space: nowrap;
}
.as-ans-btn:hover { background: linear-gradient(135deg, #1E3A8A, #1D4ED8); transform: translateY(-1px); }
.as-ans-btn-ghost { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); }
.as-ans-btn-ghost:hover { background: rgba(255,255,255,.12); }

/* Helpful buttons */
.as-helped { display: flex; gap: 7px; align-items: center; margin: 6px 0 14px; font-size: 11.5px; color: rgba(147,197,253,.75); font-family: 'DM Sans', sans-serif; }
.as-helped-btn {
  background: rgba(255,255,255,.05); border: 1px solid rgba(96,165,250,.28);
  color: #93c5fd; cursor: pointer; padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 600; font-family: inherit;
}
.as-helped-btn:hover { background: rgba(96,165,250,.14); color: #fff; border-color: #60a5fa; }

/* Ticket */
.as-ticket {
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.4);
  border-radius: 12px;
  padding: 14px;
  margin: 6px 0 14px;
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.as-ticket-icon { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#2563EB,#3b82f6); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-size: 18px; font-weight: 700; }
.as-ticket-meta { flex: 1; }
.as-ticket-id { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #60a5fa; font-weight: 700; margin-bottom: 3px; }
.as-ticket-num { font-family: 'Fraunces', Georgia, serif; font-size: 15px; color: #fff; font-weight: 600; margin-bottom: 5px; }
.as-ticket-eta { font-size: 11.5px; color: rgba(219,234,254,.8); line-height: 1.4; }

/* Pivot card */
.as-pivot {
  background: linear-gradient(135deg, rgba(109,40,217,.15), rgba(109,40,217,.05));
  border: 1px solid rgba(139,92,246,.4);
  border-radius: 12px;
  padding: 13px 14px;
  margin: 6px 0 14px;
}
.as-pivot-label { font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase; color: #a78bfa; font-weight: 700; margin-bottom: 5px; }
.as-pivot-body { font-size: 12.5px; color: rgba(237,233,254,.85); line-height: 1.5; margin-bottom: 10px; }

/* Rec card (cross-sell) */
.as-rec-card { background: rgba(255,255,255,.06); border: 1px solid rgba(139,92,246,.3); border-radius: 14px; padding: 14px; margin: 6px 0 14px; }
.as-rec-card-label { font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase; color: #a78bfa; font-weight: 700; margin-bottom: 6px; }
.as-rec-card-title { font-family: 'Fraunces', Georgia, serif; font-size: 16px; font-weight: 600; color: #fff; line-height: 1.25; margin-bottom: 4px; }
.as-rec-card-sub { font-size: 12px; color: rgba(237,233,254,.75); line-height: 1.5; margin-bottom: 11px; }
.as-rec-card-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.as-rec-card-btn {
  flex: 1; min-width: 0;
  background: linear-gradient(135deg, #5B21B6, #7C3AED);
  color: #fff; border: none; border-radius: 8px;
  padding: 9px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; text-decoration: none; text-align: center;
  font-family: 'DM Sans', sans-serif; transition: all .15s; white-space: nowrap;
}
.as-rec-card-btn:hover { background: linear-gradient(135deg, #3B0764, #5B21B6); transform: translateY(-1px); }
.as-rec-card-btn-ghost { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); }
.as-rec-card-btn-ghost:hover { background: rgba(255,255,255,.12); }

/* Typing dots */
.as-typing {
  display: inline-flex;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(147,197,253,.18);
  border-radius: 14px 14px 14px 4px;
  margin-bottom: 12px;
}
.as-typing span { width: 6px; height: 6px; border-radius: 50%; background: #60a5fa; animation: as-typing-bob 1.2s ease-in-out infinite; }
.as-typing span:nth-child(2) { animation-delay: .15s; background: #93c5fd; }
.as-typing span:nth-child(3) { animation-delay: .3s;  background: #bfdbfe; }
@keyframes as-typing-bob {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40%           { opacity: 1;   transform: translateY(-3px); }
}

/* Input row */
.as-input-row {
  display: none;
  padding: 10px 12px;
  border-top: 1px solid rgba(147,197,253,.14);
  background: rgba(11,29,59,.55);
  flex-shrink: 0;
  gap: 6px;
}
.as-input-row.as-show { display: flex; }
.as-input-row input {
  flex: 1;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(147,197,253,.22);
  color: #fff;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 18px;
  outline: none;
  font-family: 'DM Sans', sans-serif;
}
.as-input-row input::placeholder { color: rgba(147,197,253,.5); }
.as-input-row input:focus { border-color: #60a5fa; background: rgba(255,255,255,.12); }
.as-input-row button {
  background: linear-gradient(135deg, #1D4ED8, #2563EB);
  color: #fff; border: none; border-radius: 18px;
  padding: 8px 14px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
}
.as-input-row button:hover { background: linear-gradient(135deg, #1E3A8A, #1D4ED8); }

/* Restart row */
.as-restart-row { text-align: center; padding: 8px 14px 12px; font-size: 11px; color: rgba(147,197,253,.5); flex-shrink: 0; }
.as-restart-row a { color: rgba(147,197,253,.75); text-decoration: none; cursor: pointer; border-bottom: 1px dotted rgba(147,197,253,.35); }
.as-restart-row a:hover { color: #fff; }

/* Hide launcher when panel open */
body.as-panel-open .as-launcher { display: none; }

@media (max-width: 480px) {
  .as-launcher { padding: 9px 16px 9px 9px; right: 14px; bottom: 78px; }
}
