/* ============================================
   PREMIUM / ENTERPRISE REDESIGN
   Condition Assessment — VishwaBuildAI
   Inspired by Salesforce Lightning & SAP Fiori

   Usage: Add <link rel="stylesheet" href="premium-redesign.css">
          AFTER the existing inline <style> block,
          or inject via <style> at the end of <head>.
   ============================================ */

/* ─── 1. REFINED COLOR PALETTE ─── */
:root {
  --bg: #0c1017 !important;
  --surface: #121824 !important;
  --surface2: #171e2c !important;
  --surface3: #1c2536 !important;
  --border: #243044 !important;
  --border2: #2d3a52 !important;
  --teal: #36b5a0 !important;
  --teal-dim: #2a9485 !important;
  --coral: #e8735a !important;
  --amber: #e5a830 !important;
  --text: #eaeff5 !important;
  --text2: #c8d1dc !important;
  --muted: #8493a8 !important;
  --accent-gradient: linear-gradient(135deg, #36b5a0 0%, #2a8fd4 100%);
  --card-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 1px 3px rgba(0,0,0,0.15);
  --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2);
  --premium-glow: 0 0 0 1px rgba(54,181,160,0.08);
}


/* ─── 2. BODY & BASE ─── */
body {
  background: linear-gradient(180deg, #0c1017 0%, #0e1320 50%, #0c1017 100%) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  letter-spacing: 0.01em !important;
}


/* ─── 3. TOP NAVBAR ─── */
.top-bar, nav.top-bar, header {
  background: rgba(12, 16, 23, 0.85) !important;
  backdrop-filter: blur(20px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
  border-bottom: 1px solid rgba(36, 48, 68, 0.6) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}


/* ─── 4. STEPPER / PROGRESS BAR ─── */
.stepper {
  background: rgba(18, 24, 36, 0.92) !important;
  backdrop-filter: blur(16px) saturate(1.3) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.3) !important;
  border: 1px solid rgba(36, 48, 68, 0.5) !important;
  border-radius: 16px !important;
  padding: 20px 32px !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2) !important;
  margin: 16px auto !important;
}

.step-circle {
  width: 42px !important;
  height: 42px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 50% !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 2px solid var(--border2) !important;
  background: var(--surface2) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
}

.step-circle.active {
  background: var(--accent-gradient) !important;
  border-color: transparent !important;
  box-shadow: 0 0 0 3px rgba(54,181,160,0.2), 0 2px 8px rgba(54,181,160,0.3) !important;
  transform: scale(1.08) !important;
}

.step-circle.done {
  background: linear-gradient(135deg, #28a088 0%, #36b5a0 100%) !important;
  border-color: transparent !important;
  box-shadow: 0 2px 4px rgba(40,160,136,0.2) !important;
}

.step-label {
  font-size: 11.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.03em !important;
  color: var(--muted) !important;
  margin-top: 8px !important;
}

.step-label.active {
  color: var(--teal) !important;
  font-weight: 600 !important;
}

.step-line, .stepper-line {
  height: 2px !important;
  background: var(--border) !important;
  border-radius: 1px !important;
}

.step-line.done, .stepper-line.done {
  background: linear-gradient(90deg, #28a088, #36b5a0) !important;
}


/* ─── 5. CARDS ─── */
.card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  padding: 28px 32px !important;
  box-shadow: var(--card-shadow) !important;
  transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.card:hover {
  border-color: var(--border2) !important;
  box-shadow: var(--card-shadow-hover) !important;
}


/* ─── 6. SECTION HEADERS ─── */
.section-title, legend, .card legend {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--teal) !important;
}

.step-header {
  background: linear-gradient(135deg, rgba(54,181,160,0.06) 0%, rgba(42,143,212,0.04) 100%) !important;
  border: 1px solid rgba(54,181,160,0.12) !important;
  border-radius: 14px !important;
  padding: 24px 32px !important;
  box-shadow: var(--premium-glow) !important;
}

.step-header .step-number {
  font-size: 42px !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, #36b5a0, #2a8fd4) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  line-height: 1 !important;
}

.step-header h2, .step-header .step-title {
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  color: var(--text) !important;
}

.step-header .step-desc {
  font-size: 14px !important;
  color: var(--muted) !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

/* Subtle background watermark number */
.step-header .watermark,
.step-header > span:last-child {
  opacity: 0.03 !important;
  font-size: 140px !important;
}


/* ─── 7. FORM FIELDS ─── */
.field input, .field select, .field textarea,
input[type="text"], input[type="number"], input[type="email"],
select, textarea {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  color: var(--text) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  transition: all 0.25s ease !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15) !important;
}

.field input:focus, .field select:focus, .field textarea:focus,
input:focus, select:focus, textarea:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(54,181,160,0.15), inset 0 1px 2px rgba(0,0,0,0.1) !important;
  outline: none !important;
  background: var(--surface3) !important;
}

.field input::placeholder, input::placeholder, textarea::placeholder {
  color: var(--muted) !important;
  font-weight: 400 !important;
  opacity: 0.7 !important;
}

.field label, label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text2) !important;
  letter-spacing: 0.02em !important;
  margin-bottom: 6px !important;
}

textarea {
  border-radius: 10px !important;
  min-height: 100px !important;
  resize: vertical !important;
  line-height: 1.6 !important;
}


/* ─── 8. BUTTONS ─── */
.btn-primary, button.primary, .btn[class*="primary"] {
  background: var(--accent-gradient) !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 12px 28px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  color: #fff !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 2px 8px rgba(54,181,160,0.25) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15) !important;
}

.btn-primary:hover, button.primary:hover {
  box-shadow: 0 4px 16px rgba(54,181,160,0.35) !important;
  transform: translateY(-1px) !important;
  filter: brightness(1.08) !important;
}

.btn-outline, button.outline, .btn-secondary {
  background: transparent !important;
  border: 1.5px solid var(--teal) !important;
  border-radius: 10px !important;
  padding: 11px 26px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--teal) !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
}

.btn-outline:hover, button.outline:hover, .btn-secondary:hover {
  background: rgba(54,181,160,0.08) !important;
  box-shadow: 0 0 0 3px rgba(54,181,160,0.1) !important;
}

.btn-icon, button.icon, [class*="upload-btn"] {
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(54,181,160,0.25) !important;
  transition: all 0.25s ease !important;
}

/* Bottom nav next/prev button */
.bottom-nav .btn-primary, .nav-footer .btn-primary,
footer .btn-primary, button[class*="Next"] {
  background: var(--accent-gradient) !important;
  border-radius: 12px !important;
  padding: 14px 36px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  box-shadow: 0 3px 12px rgba(54,181,160,0.3) !important;
}


/* ─── 9. TABLES ─── */
table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
}

table thead th {
  background: var(--surface2) !important;
  color: var(--muted) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  padding: 14px 16px !important;
  border-bottom: 2px solid var(--border) !important;
  white-space: nowrap !important;
}

table thead th:first-child {
  border-radius: 10px 0 0 0 !important;
}

table thead th:last-child {
  border-radius: 0 10px 0 0 !important;
}

table tbody tr {
  transition: background 0.15s ease !important;
}

table tbody tr:nth-child(even) {
  background: rgba(20, 24, 40, 0.4) !important;
}

table tbody tr:hover {
  background: rgba(54,181,160,0.04) !important;
}

table tbody td {
  padding: 14px 16px !important;
  border-bottom: 1px solid rgba(36, 48, 68, 0.4) !important;
  font-size: 13.5px !important;
  color: var(--text2) !important;
  vertical-align: middle !important;
}


/* ─── 10. CHIPS / TAGS / BADGES ─── */
.chip, .tag, .badge, [class*="chip"], [class*="badge"] {
  border-radius: 8px !important;
  padding: 6px 14px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  transition: all 0.2s ease !important;
  border: 1px solid transparent !important;
}

.distress-chip, .dtype-chip {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text2) !important;
  border-radius: 8px !important;
  padding: 7px 16px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.distress-chip:hover, .dtype-chip:hover {
  border-color: var(--teal-dim) !important;
  background: rgba(54,181,160,0.06) !important;
}

.distress-chip.selected, .dtype-chip.selected {
  background: rgba(54,181,160,0.12) !important;
  border-color: var(--teal) !important;
  color: var(--teal) !important;
}

.severity-btn, [class*="severity"] {
  border-radius: 8px !important;
  padding: 7px 18px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.importance-badge {
  border-radius: 8px !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
}


/* ─── 11. TAB NAVIGATION (Step 2 element tabs) ─── */
.tab-btn, [class*="tab-btn"], .element-tab {
  border-radius: 10px !important;
  padding: 10px 20px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--muted) !important;
  background: transparent !important;
  border: 1.5px solid var(--border) !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
}

.tab-btn:hover, [class*="tab-btn"]:hover, .element-tab:hover {
  border-color: var(--border2) !important;
  background: var(--surface2) !important;
  color: var(--text2) !important;
}

.tab-btn.active, [class*="tab-btn"].active, .element-tab.active {
  background: rgba(54,181,160,0.1) !important;
  border-color: var(--teal) !important;
  color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(54,181,160,0.08) !important;
}


/* ─── 12. ALERT / WARNING BOXES ─── */
.alert, .warning-box, [class*="alert"], [class*="warning"] {
  border-radius: 12px !important;
  padding: 16px 20px !important;
  font-size: 13.5px !important;
  line-height: 1.6 !important;
}


/* ─── 13. PROGRESS / COMPLETION ─── */
.progress-text, [class*="COMPLETE"] {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  color: var(--muted) !important;
}


/* ─── 14. BOTTOM NAV BAR ─── */
.bottom-nav, .nav-footer, .step-nav, [class*="step-nav"], [class*="bottom-bar"] {
  background: rgba(12, 16, 23, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-top: 1px solid var(--border) !important;
  padding: 18px 32px !important;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.15) !important;
}

footer {
  background: rgba(12, 16, 23, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-top: 1px solid rgba(36, 48, 68, 0.5) !important;
  padding: 16px 32px !important;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.15) !important;
}


/* ─── 15. SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

::-webkit-scrollbar-track {
  background: var(--bg) !important;
  border-radius: 4px !important;
}

::-webkit-scrollbar-thumb {
  background: var(--border2) !important;
  border-radius: 4px !important;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted) !important;
}


/* ─── 16. REGION CARDS (Step 5 NDT Planning) ─── */
.region-card, [class*="region-card"] {
  border-radius: 12px !important;
  padding: 20px 24px !important;
  transition: all 0.25s ease !important;
  box-shadow: var(--card-shadow) !important;
}

.region-card:hover, [class*="region-card"]:hover {
  box-shadow: var(--card-shadow-hover) !important;
  transform: translateY(-2px) !important;
}


/* ─── 17. TOOLTIPS / POPOVERS ─── */
[class*="tooltip"], [class*="popover"] {
  border-radius: 10px !important;
  padding: 10px 16px !important;
  background: var(--surface3) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important;
  font-size: 13px !important;
}


/* ─── 18. LOADING OVERLAY ─── */
[class*="loading"], .spinner-overlay {
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}


/* ─── 19. RADIO & CHECKBOX ─── */
input[type="radio"], input[type="checkbox"] {
  accent-color: #36b5a0 !important;
}


/* ─── 20. DROPDOWN SELECT ─── */
select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%238493a8'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 36px !important;
}

select option {
  background: var(--surface2) !important;
  color: var(--text) !important;
  padding: 8px 12px !important;
}


/* ─── 21. TYPOGRAPHY REFINEMENT ─── */
h1, h2, h3, h4 {
  letter-spacing: -0.01em !important;
  line-height: 1.3 !important;
}

p, li {
  line-height: 1.65 !important;
}

.hint-text, .help-text, small {
  font-size: 12px !important;
  color: var(--muted) !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em !important;
}


/* ─── 22. ACCORDION / COLLAPSIBLE ─── */
.accordion-header, [class*="accordion"], [class*="collapsible"] {
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(54,181,160,0.06) 0%, rgba(42,143,212,0.03) 100%) !important;
  border: 1px solid rgba(54,181,160,0.12) !important;
  padding: 14px 20px !important;
  transition: all 0.25s ease !important;
}


/* ─── 23. EXIT BUTTON ─── */
.exit-btn, [class*="exit"], button[class*="Exit"] {
  border-radius: 10px !important;
  font-weight: 500 !important;
  border: 1px solid var(--border) !important;
  transition: all 0.2s ease !important;
}

.exit-btn:hover, [class*="exit"]:hover {
  border-color: var(--coral) !important;
  color: var(--coral) !important;
}


/* ─── 24. FIELDSETS ─── */
fieldset {
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 24px 28px 20px !important;
}


/* ─── 25. COMPONENT / PHOTO CARDS ─── */
.component-card, [class*="photo-card"], [class*="component-card"] {
  border-radius: 12px !important;
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  padding: 16px 20px !important;
  transition: all 0.25s ease !important;
  box-shadow: var(--card-shadow) !important;
}

.component-card:hover, [class*="photo-card"]:hover {
  border-color: var(--border2) !important;
  box-shadow: var(--card-shadow-hover) !important;
}


/* ─── 26. DIVIDERS ─── */
hr, .divider {
  border: none !important;
  border-top: 1px solid var(--border) !important;
  margin: 24px 0 !important;
  opacity: 0.6 !important;
}


/* ─── 27. TOASTS / NOTIFICATIONS ─── */
.toast, [class*="toast"], [class*="notification"] {
  border-radius: 12px !important;
  background: var(--surface3) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
  padding: 14px 20px !important;
}


/* ─── 28. REGION BADGES (Step 4 table) ─── */
.region-badge, [class*="region-tag"] {
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}


/* ─── 29. STAT BARS ─── */
.stat-bar, .stats-row {
  background: var(--surface2) !important;
  border-radius: 10px !important;
  padding: 12px 20px !important;
  border: 1px solid var(--border) !important;
}


/* ─── 30. STEP COUNTER ─── */
.step-counter {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--muted) !important;
}

.progress-dots span, .step-dots span {
  border-radius: 50% !important;
  width: 8px !important;
  height: 8px !important;
}


/* ─── 31. ADD COMPONENT BUTTONS ─── */
.add-btn, [class*="add-component"], [class*="add-btn"] {
  border-radius: 10px !important;
  font-weight: 600 !important;
  padding: 10px 22px !important;
  transition: all 0.25s ease !important;
}


/* ─── 32. GLOBAL TRANSITIONS & FOCUS ─── */
*, *::before, *::after {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
}

*:focus-visible {
  outline: 2px solid rgba(54,181,160,0.5) !important;
  outline-offset: 2px !important;
  border-radius: inherit !important;
}


/* ─── 33. DAMAGE VISUALIZATION ─── */
.damage-viz, [class*="damage-viz"], [class*="visualization"] {
  border-radius: 12px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface2) !important;
}


/* ─── 34. RADIO GROUP LABELS ─── */
.radio-group label, [class*="radio"] label {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: var(--text2) !important;
}


/* ─── 35. ZNC ZONE CARD COMPACT CONTROLS ───────────────────────────────────
   Override the global field padding/font for compact controls inside
   zone cards. Must come AFTER the global rules above.             ─── */

/* Zone-level param dropdowns / inputs (znc-param-ctrl)
   Using element+class selectors for specificity 0,1,1 to beat global rules */
select.znc-param-ctrl {
  padding: 3px 22px 3px 6px !important;
  font-size: .73rem !important;
  border-radius: 5px !important;
  min-height: unset !important;
  line-height: 1.5 !important;
  max-width: 118px !important;
  width: 118px !important;
  background-position: right 6px center !important;
  background-color: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
input.znc-param-ctrl {
  padding: 3px 6px !important;
  font-size: .73rem !important;
  border-radius: 5px !important;
  min-height: unset !important;
  line-height: 1.5 !important;
  max-width: 118px !important;
  width: 118px !important;
  background: var(--surface2) !important;
  background-image: none !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

/* Per-test sampling table: compact select
   select.znc-mini-sel specificity = 0,1,1 — beats plain `select` (0,0,1) */
select.znc-mini-sel {
  padding: 2px 16px 2px 4px !important;
  font-size: .68rem !important;
  border-radius: 4px !important;
  min-height: unset !important;
  line-height: 1.4 !important;
  width: 50px !important;
  background-position: right 3px center !important;
  background-color: var(--surface2) !important;
  color: var(--text) !important;
}

/* Per-test sampling table: compact number input
   input.znc-mini-inp specificity = 0,1,1 — ties with input[type="number"],
   wins by source order (this rule is later in the file) */
input.znc-mini-inp {
  padding: 2px 2px !important;
  font-size: .68rem !important;
  border-radius: 4px !important;
  min-height: unset !important;
  line-height: 1.4 !important;
  width: 36px !important;
  text-align: center !important;
  background: var(--surface2) !important;
  color: var(--text) !important;
  background-image: none !important;
}

/* Override point override mini-inputs inside stat rows
   input.znc-pts-mini specificity = 0,1,1 — beats input[type="number"] by order */
input.znc-pts-mini {
  padding: 3px 4px !important;
  font-size: .8rem !important;
  border-radius: 5px !important;
  min-height: unset !important;
  line-height: 1.4 !important;
  width: 52px !important;
  text-align: center !important;
  background: var(--surface2) !important;
  color: var(--text) !important;
  background-image: none !important;
}

/* NDT global box fields — slightly more compact than global */
.ndt-global-fields .field input,
.ndt-global-fields .field select {
  padding: 7px 30px 7px 10px !important;
  font-size: .82rem !important;
  border-radius: 8px !important;
  background-position: right 10px center !important;
}

/* ── §36 Help-tip tooltips ─────────────────────────────────────────── */
.help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0,212,188,.12);
  color: var(--teal);
  font-size: .58rem;
  font-weight: 700;
  cursor: help;
  margin-left: 4px;
  position: relative;
  vertical-align: middle;
  flex-shrink: 0;
  border: 1px solid rgba(0,212,188,.28);
  user-select: none;
  line-height: 1;
  transition: background .15s;
}
.help-tip:hover { background: rgba(0,212,188,.22); }

.help-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  background: #1a2035;
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: .71rem;
  font-weight: 400;
  line-height: 1.55;
  white-space: normal;
  width: 230px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 9999;
}
.help-tip:hover::after,
.help-tip.tip-open::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* Caret */
.help-tip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(255,255,255,.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
  z-index: 9999;
}
.help-tip:hover::before,
.help-tip.tip-open::before { opacity: 1; }

/* Flip tooltip when near top of viewport */
.help-tip.tip-flip::after {
  bottom: auto;
  top: calc(100% + 7px);
  transform: translateX(-50%) translateY(-3px);
}
.help-tip.tip-flip:hover::after,
.help-tip.tip-flip.tip-open::after { transform: translateX(-50%) translateY(0); }
.help-tip.tip-flip::before {
  bottom: auto;
  top: calc(100% + 2px);
  border-top-color: transparent;
  border-bottom-color: rgba(255,255,255,.12);
}
