/**
 * Mobile-First Responsive Reflows & Touch-Target Extras
 *
 * Enhances complex CTI cards (Diffs, Topologies, Matrices, SLA Gauges)
 * for compact mobile viewports (<= 576px) and notch safe-areas.
 *
 * @package myDraft CMS / iShareStuff CTI
 * @version 1.0.0
 */

/* Safe-Area Padding for modern notch smartphones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-bottom-dock {
    padding-bottom: calc(env(safe-area-inset-bottom) + 4px);
  }
  .mobile-speed-dial-dock {
    bottom: calc(env(safe-area-inset-bottom) + 74px) !important;
  }
}

/* Mobile Touch Optimization (<= 576px) */
@media (max-width: 576px) {
  /* Complex Card Containers */
  .cve-topology-card,
  .cve-patch-diff-card,
  .mitre-matrix-card,
  .microsegmentation-card,
  .cve-sla-card,
  .poc-security-card {
    border-radius: 12px !important;
    margin-left: -4px;
    margin-right: -4px;
  }

  /* Unified Diff Viewer on Mobile */
  .diff-viewer {
    max-height: 220px !important;
    font-size: 0.70rem !important;
    word-break: break-all;
    white-space: pre-wrap !important;
  }

  /* MITRE Matrix Strip Mobile Smooth Wiping */
  .mitre-matrix-strip {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .mitre-matrix-strip > div {
    scroll-snap-align: start;
  }

  /* WCAG 2.5.5 Touch Targets */
  .btn-xs,
  .speed-dial-sub-btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* War-Room Dock Mobile Adaptation */
  #socWarRoomDock {
    max-width: 260px !important;
    bottom: 68px !important;
    right: 8px !important;
  }
}

/* -------------------------------------------------------------
 * Roadmap v13: Mobile-First Content Intelligence & Reading HUD
 * ------------------------------------------------------------- */

/* Sticky Top Reading Progress Bar */
.mobile-reading-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.15);
  z-index: 1099;
  pointer-events: none;
}

.mobile-reading-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 50%, #10b981 100%);
  transition: width 0.08s ease-out;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

/* Mobile Executive Threat Digest */
.mobile-executive-digest {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-executive-digest:hover {
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15) !important;
}

.article-body.executive-condensed > *:not(.lead):not(.article-intro):not(h2:first-of-type) {
  display: none !important;
}

/* Mobile Progressive Disclosure Deck (Accordion Stack) */
.mobile-dossier-accordion .accordion-deck-item {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-dossier-accordion .accordion-deck-item button:active {
  background: rgba(255, 255, 255, 0.05);
}

.transition-transform {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Touch-Swipe Threat Clusters */
@media (max-width: 768px) {
  .mobile-touch-swipe-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 12px !important;
    padding-bottom: 12px !important;
    margin-left: -8px !important;
    margin-right: -8px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .mobile-touch-swipe-row > div {
    flex: 0 0 85% !important;
    max-width: 85% !important;
    scroll-snap-align: center !important;
  }
}

/* -------------------------------------------------------------
 * Roadmap v14: Live-Data CTI & Zero-Click Threat Indicators
 * ------------------------------------------------------------- */

/* Zero-Click Glowing Danger Animation */
@keyframes zeroClickPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
    transform: scale(1.03);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    transform: scale(1);
  }
}

.badge-zero-click-pulse {
  animation: zeroClickPulse 1.8s infinite;
  background-color: #dc2626 !important;
  color: #ffffff !important;
  letter-spacing: 0.04em;
}

/* Verified Vendor Advisories Scroll Strip */
.advisory-pills-scroll {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.advisory-pills-scroll::-webkit-scrollbar {
  height: 3px;
}

.advisory-pills-scroll::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.3);
  border-radius: 4px;
}

.advisory-pills-scroll .btn-xs:hover {
  background: rgba(6, 182, 212, 0.15) !important;
  border-color: #06b6d4 !important;
}

/* -------------------------------------------------------------
 * Roadmap v15: Incident Triage Checklist & Mobile Feed Filter HUD
 * ------------------------------------------------------------- */

/* Incident Triage Card */
.incident-triage-card .triage-step-item {
  transition: background 0.2s ease, border-color 0.2s ease;
}

.incident-triage-card .triage-step-item:hover {
  background: rgba(30, 41, 59, 0.6) !important;
  border-color: rgba(6, 182, 212, 0.3) !important;
}

.bg-gradient-cyan {
  background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 100%) !important;
}

/* Mobile Feed Filter HUD */
.mobile-feed-filter-hud {
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 60px;
  z-index: 1040;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mobile-feed-filter-hud::-webkit-scrollbar {
  display: none;
}

.mobile-feed-filter-hud button {
  min-height: 34px;
}

/* -------------------------------------------------------------
 * Roadmap v16: Threat Exposure Dial & Mobile Terminal Snippets
 * ------------------------------------------------------------- */

/* Threat Exposure Simulator */
.threat-exposure-card {
  border: 1px solid rgba(226, 232, 240, 0.15) !important;
}

.exposure-dial-container {
  width: 160px;
  height: 160px;
}

.exposure-gauge-svg {
  transform: rotate(0deg);
}

.gauge-progress {
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.4s ease;
}

.exposure-btn-group .btn {
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.2s ease;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.exposure-btn-group .btn-check:checked + .btn {
  background-color: #0f172a;
  color: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  font-weight: 700;
}

@media (max-width: 576px) {
  .exposure-btn-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
  }
  .exposure-btn-group .btn {
    padding-left: 4px;
    padding-right: 4px;
    font-size: 0.70rem;
  }
}

/* Mobile Terminal Command Snippets */
.terminal-snippets-card {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 14px;
}

.terminal-snippet-item {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  transition: border-color 0.2s ease;
}

.terminal-snippet-item:hover {
  border-color: #38bdf8;
}

.terminal-code-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.80rem;
  line-height: 1.45;
  color: #38bdf8;
  word-break: break-all;
  white-space: pre-wrap;
  user-select: all;
}

.terminal-copy-btn {
  transition: all 0.2s ease;
}

.terminal-copy-btn:active {
  transform: scale(0.95);
}

/* -------------------------------------------------------------
 * Roadmap v17: Voice Incident Briefing & Defense-in-Depth Matrix
 * ------------------------------------------------------------- */

/* Voice Incident Briefing Player */
.voice-briefing-hud {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

.waveform-container {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
}

.waveform-bar {
  width: 3px;
  height: 6px;
  background-color: #38bdf8;
  border-radius: 2px;
  transition: height 0.2s ease;
}

.waveform-bar.pulsing {
  animation: waveform-bounce 1s ease-in-out infinite alternate;
}

.waveform-bar:nth-child(1) { animation-delay: 0.1s; }
.waveform-bar:nth-child(2) { animation-delay: 0.3s; }
.waveform-bar:nth-child(3) { animation-delay: 0.15s; }
.waveform-bar:nth-child(4) { animation-delay: 0.4s; }
.waveform-bar:nth-child(5) { animation-delay: 0.25s; }
.waveform-bar:nth-child(6) { animation-delay: 0.35s; }
.waveform-bar:nth-child(7) { animation-delay: 0.2s; }
.waveform-bar:nth-child(8) { animation-delay: 0.45s; }

@keyframes waveform-bounce {
  0% { height: 4px; opacity: 0.4; }
  100% { height: 22px; opacity: 1; }
}

/* Defense-in-Depth Attack Path Matrix */
.attack-path-card {
  border: 1px solid rgba(226, 232, 240, 0.15) !important;
}

.attack-path-step {
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid #1e293b;
  position: relative;
  transition: all 0.2s ease;
}

.attack-path-step.breached {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.08);
}

.attack-path-step.intercepted {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.08);
}



