/* ═══════════════════════════════════════════
   ALTITUDIGITAL SUPPORT WIDGET — widget.css
═══════════════════════════════════════════ */
:root {
  --alt-bg: #0e0f1c;
  --alt-bg2: #141528;
  --alt-border: rgba(255,255,255,0.08);
  --alt-border2: rgba(255,255,255,0.14);
  --alt-white: #eef0f8;
  --alt-muted: rgba(238,240,248,0.4);
  --alt-cyan: #00f0d4;
  --alt-violet: #6c5ce7;
  --alt-green: #00d68f;
  --alt-amber: #ffb830;
  --alt-red: #ff4f6a;
  --alt-orange: #ff7a3d;
}

/* FAB */
#alt-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 99999;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(145deg, var(--alt-violet), var(--alt-cyan));
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  box-shadow: 0 6px 28px rgba(108,92,231,.5);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
  animation: alt-pulse 3.5s ease-in-out infinite;
}
#alt-fab:hover { transform: scale(1.12); }
#alt-fab svg { width: 22px; height: 22px; fill: #fff; transition: transform .3s; }
#alt-fab.alt-open { animation: none; }
#alt-fab.alt-open svg { transform: rotate(135deg); }

@keyframes alt-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,240,212,.4),0 6px 28px rgba(108,92,231,.5); }
  55%     { box-shadow: 0 0 0 14px rgba(0,240,212,0),0 6px 28px rgba(108,92,231,.5); }
}

#alt-badge {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--alt-red); color: #fff;
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* Panel */
#alt-panel {
  position: fixed; bottom: 96px; right: 28px; z-index: 99998;
  width: 400px; max-width: calc(100vw - 40px);
  background: var(--alt-bg);
  border: 1px solid var(--alt-border2);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.75);
  transform: translateY(20px) scale(.96); opacity: 0;
  transition: transform .38s cubic-bezier(.34,1.2,.64,1), opacity .25s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#alt-panel:not([hidden]) { transform: translateY(0) scale(1); opacity: 1; }

/* Header */
.alt-ph {
  padding: 18px 20px 14px;
  background: linear-gradient(135deg,rgba(108,92,231,.22),rgba(0,240,212,.06));
  border-bottom: 1px solid var(--alt-border);
}
.alt-ph-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.alt-ph-brand { display: flex; align-items: center; gap: 10px; }
.alt-ph-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg,var(--alt-violet),var(--alt-cyan));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff;
}
.alt-ph-name { font-weight: 700; font-size: 14px; color: var(--alt-white); }
.alt-ph-name span { color: var(--alt-cyan); }
.alt-ph-sub { font-size: 11px; color: var(--alt-muted); margin-top: 1px; }
.alt-status { display: flex; align-items: center; gap: 5px; font-size: 11px; color: rgba(0,214,143,.7); }
.alt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--alt-green); box-shadow: 0 0 8px var(--alt-green); animation: alt-blink 2s infinite; }
@keyframes alt-blink { 0%,100%{opacity:1} 50%{opacity:.3} }
.alt-prog { height: 2px; background: var(--alt-border); border-radius: 2px; overflow: hidden; }
.alt-prog-fill { height: 100%; background: linear-gradient(90deg,var(--alt-violet),var(--alt-cyan)); transition: width .4s ease; width: 8%; border-radius: 2px; }

/* Tabs */
.alt-tabs { display: flex; border-bottom: 1px solid var(--alt-border); background: rgba(0,0,0,.22); }
.alt-tab {
  flex: 1; padding: 10px 4px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(238,240,248,.2); border-bottom: 2px solid transparent;
  transition: color .25s, border-color .25s;
}
.alt-tab-num { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; transition: all .25s; }
.alt-tab--active   { color: var(--alt-cyan); border-bottom-color: var(--alt-cyan); }
.alt-tab--active .alt-tab-num { background: var(--alt-cyan); color: #07080f; }
.alt-tab--done     { color: rgba(0,214,143,.55); border-bottom-color: rgba(0,214,143,.2); }
.alt-tab--done .alt-tab-num   { background: rgba(0,214,143,.2); color: var(--alt-green); }

/* Body / Screens */
.alt-body { padding: 18px 20px; position: relative; min-height: 280px; }
.alt-screen { display: none; animation: alt-su .28s ease forwards; }
.alt-screen--active { display: block; }
@keyframes alt-su { from{opacity:0;transform:translateY(7px)} to{opacity:1;transform:translateY(0)} }

.alt-title { font-weight: 700; font-size: 15px; color: var(--alt-white); margin: 0 0 3px; }
.alt-sub   { font-size: 12px; color: var(--alt-muted); margin: 0 0 16px; line-height: 1.5; }
.alt-label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(238,240,248,.35); margin-bottom: 6px; }

/* Category grid */
.alt-cats { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 14px; }
.alt-cat {
  padding: 11px 6px; border-radius: 11px;
  border: 1px solid var(--alt-border); background: rgba(255,255,255,.025);
  cursor: pointer; text-align: center;
  font-size: 18px; transition: border-color .2s, background .2s, transform .15s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.alt-cat span { font-size: 10.5px; font-weight: 500; color: var(--alt-muted); display: block; }
.alt-cat:hover { border-color: rgba(108,92,231,.5); transform: translateY(-1px); background: rgba(108,92,231,.06); }
.alt-cat.alt-sel { border-color: var(--alt-cyan); background: rgba(0,240,212,.06); }
.alt-cat.alt-sel span { color: var(--alt-cyan); }

/* Priority */
.alt-pris { display: flex; gap: 6px; margin-bottom: 18px; }
.alt-pri {
  flex: 1; padding: 9px 4px; border-radius: 9px; border: 1px solid var(--alt-border);
  background: transparent; cursor: pointer;
  font-family: inherit; font-size: 11px; font-weight: 600; color: var(--alt-muted);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: all .2s;
}
.alt-pri span { font-size: 13px; }
.alt-pri:hover { border-color: rgba(255,255,255,.3); color: var(--alt-white); }
.alt-pri--low.alt-sel      { border-color:var(--alt-green);  color:var(--alt-green);  background:rgba(0,214,143,.08); }
.alt-pri--medium.alt-sel   { border-color:var(--alt-amber);  color:var(--alt-amber);  background:rgba(255,184,48,.08); }
.alt-pri--high.alt-sel     { border-color:var(--alt-orange); color:var(--alt-orange); background:rgba(255,122,61,.08); }
.alt-pri--critical.alt-sel { border-color:var(--alt-red);    color:var(--alt-red);    background:rgba(255,79,106,.1); box-shadow:0 0 16px rgba(255,79,106,.15); }

/* Fields */
.alt-field { margin-bottom: 11px; }
.alt-input, .alt-textarea {
  width: 100%; background: rgba(255,255,255,.04);
  border: 1px solid var(--alt-border); border-radius: 9px;
  padding: 9px 12px; color: var(--alt-white);
  font-family: inherit; font-size: 13px; outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.alt-input::placeholder, .alt-textarea::placeholder { color: rgba(238,240,248,.22); }
.alt-input:focus, .alt-textarea:focus { border-color: rgba(0,240,212,.45); box-shadow: 0 0 0 3px rgba(0,240,212,.055); }
.alt-textarea { resize: vertical; line-height: 1.55; }
.alt-input.alt-error { border-color: var(--alt-red) !important; animation: alt-shk .4s ease; }
@keyframes alt-shk { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

/* Info box */
.alt-info-box {
  background: rgba(108,92,231,.08); border: 1px solid rgba(108,92,231,.2);
  border-radius: 9px; padding: 10px 13px; margin-bottom: 14px;
  font-size: 12px; color: rgba(238,240,248,.55); line-height: 1.5;
}

/* Buttons */
.alt-btns { display: flex; gap: 8px; margin-top: 4px; }
.alt-btn-back {
  flex: 0 0 auto; padding: 0 14px; height: 40px; border-radius: 9px;
  border: 1px solid var(--alt-border2); background: transparent;
  color: var(--alt-muted); font-family: inherit; font-size: 13px; cursor: pointer; transition: all .2s;
}
.alt-btn-back:hover { border-color: rgba(255,255,255,.3); color: var(--alt-white); }
.alt-btn-next {
  flex: 1; height: 40px; border-radius: 9px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--alt-violet) 0%, #4a9cf5 50%, var(--alt-cyan) 100%);
  background-size: 200% 100%;
  color: #fff; font-family: inherit; font-size: 13px; font-weight: 700;
  box-shadow: 0 4px 18px rgba(108,92,231,.35);
  transition: background-position .4s, box-shadow .25s, transform .15s, opacity .2s;
}
.alt-btn-next:hover:not(:disabled) { background-position: 100%; box-shadow: 0 7px 24px rgba(108,92,231,.5); transform: translateY(-1px); }
.alt-btn-next:disabled { opacity: .35; cursor: not-allowed; }

/* Success */
.alt-success { text-align: center; padding: 6px 0 2px; }
.alt-success-ring {
  width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 14px;
  border: 2px solid var(--alt-cyan);
  background: rgba(0,240,212,.06);
  display: flex; align-items: center; justify-content: center;
  animation: alt-popin .5s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes alt-popin { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }
.alt-success-ring svg { width: 28px; height: 28px; stroke: var(--alt-cyan); }
.alt-tid {
  display: inline-block; padding: 7px 18px; border-radius: 8px; margin: 10px 0;
  background: rgba(0,240,212,.08); border: 1px solid rgba(0,240,212,.2);
  font-size: 18px; font-weight: 800; color: var(--alt-cyan);
  letter-spacing: .1em; font-family: monospace;
}
.alt-sla { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin: 12px 0; }
.alt-sla-item { background: rgba(255,255,255,.03); border: 1px solid var(--alt-border); border-radius: 7px; padding: 8px 4px; text-align: center; font-size: 10px; color: var(--alt-muted); }
.alt-sla-item strong { display: block; font-size: 10.5px; margin-bottom: 2px; }

/* Loading */
.alt-loading {
  position: absolute; inset: 0; background: rgba(14,15,28,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  border-radius: 0 0 20px 20px;
}
.alt-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(0,240,212,.15);
  border-top-color: var(--alt-cyan);
  animation: alt-spin .8s linear infinite;
}
@keyframes alt-spin { to { transform: rotate(360deg); } }
.alt-loading p { color: var(--alt-muted); font-size: 13px; }

/* Footer */
.alt-footer {
  padding: 9px 20px; border-top: 1px solid var(--alt-border);
  display: flex; justify-content: space-between;
  background: rgba(0,0,0,.18);
  font-size: 10px; color: rgba(238,240,248,.2);
}
.alt-footer em { color: rgba(0,240,212,.5); font-style: normal; }

@media (max-width: 480px) {
  #alt-panel { bottom: 0; right: 0; left: 0; width: 100%; max-width: 100%; border-radius: 20px 20px 0 0; }
  #alt-fab   { bottom: 20px; right: 20px; }
}
