/* ==========================================================================
   CV DOST — ATS SCANNER PREVIEW & AUDIT STYLES
   Matches the Dark Stage & Split Canvas Aesthetic of Dashboard & Mock Interview
   ========================================================================== */

/* ── Sidebar Collapse, Backdrop & Open Menu Button Transitions ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 95;
  transition: opacity 0.2s ease;
}

.dark-sidebar {
  transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1), left 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.dark-sidebar.collapsed {
  margin-left: -270px !important;
}

.dark-sidebar.collapsed ~ .dark-main-stage .sidebar-expand-btn {
  display: inline-flex !important;
}

.sidebar-expand-btn {
  cursor: pointer;
  user-select: none;
  align-items: center;
  gap: 8px;
  z-index: 30;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-white, #FFFFFF);
  cursor: pointer;
}

/* ── Dynamic Morphing Headline Accent ── */
.accent-stylish-wrap {
  display: inline-flex;
  align-items: baseline;
  position: relative;
}

.accent-stylish-text {
  display: inline-block;
  min-width: 1.2ch;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

/* ── SCANNER MODAL CARD ── */
.scanner-modal-card {
  background: #14171F;
  border: 1px solid #232734;
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  position: relative;
  animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.scanner-modal-header {
  padding: 24px 28px 18px 28px;
  border-bottom: 1px solid #1E232E;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.scanner-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(29, 100, 242, 0.12);
  border: 1px solid rgba(29, 100, 242, 0.3);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #60A5FA;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scanner-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #3B82F6;
  box-shadow: 0 0 8px #3B82F6;
}

.scanner-modal-header h3 {
  margin: 0 0 4px 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #FFFFFF;
}

.scanner-modal-header p {
  margin: 0;
  font-size: 0.88rem;
  color: #94A3B8;
  line-height: 1.45;
}

/* ── UPLOAD VIEW ── */
#scanner-upload-view {
  padding: 24px 28px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.scanner-dropzone {
  border: 2px dashed #2A3040;
  border-radius: 14px;
  background: #0F1219;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scanner-dropzone:hover,
.scanner-dropzone.dragover {
  border-color: #3B82F6;
  background: rgba(29, 100, 242, 0.05);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dropzone-icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #1B2130;
  border: 1px solid #2B3346;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60A5FA;
  transition: transform 0.2s ease;
}

.scanner-dropzone:hover .dropzone-icon-circle {
  transform: translateY(-2px);
  background: #1E293B;
  color: #93C5FD;
}

.dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dropzone-main-text {
  font-size: 0.95rem;
  color: #E2E8F0;
  font-weight: 500;
}

.dropzone-browse-link {
  background: none;
  border: none;
  color: #3B82F6;
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

.dropzone-hint {
  font-size: 0.78rem;
  color: #64748B;
}

/* Chosen file bar */
.chosen-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1A2130;
  border: 1px solid #2A344C;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 14px;
}

.file-info-group {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #93C5FD;
}

.chosen-filename {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #F1F5F9;
  font-weight: 600;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chosen-filesize {
  font-size: 0.75rem;
  color: #64748B;
}

.btn-clear-file {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
}

.btn-clear-file:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #F87171;
}

/* Role input */
.scanner-role-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #94A3B8;
  margin-bottom: 6px;
}

.scanner-role-field input {
  width: 100%;
  box-sizing: border-box;
  background: #0F1219;
  border: 1px solid #242938;
  border-radius: 10px;
  padding: 12px 14px;
  color: #F8FAFC;
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s ease;
}

.scanner-role-field input:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Action button */
.btn-start-analysis {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1D64F2 0%, #1554D1 100%);
  color: #FFFFFF;
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(29, 100, 242, 0.35);
}

.btn-start-analysis:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(29, 100, 242, 0.5);
}

.btn-start-analysis:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.analysis-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── RESULTS VIEW ── */
#scanner-results-view {
  padding: 24px 28px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.results-score-banner {
  background: #0E121B;
  border: 1px solid #1E2536;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.score-radial-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.score-circle-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-circle-track {
  fill: none;
  stroke: #1E2638;
  stroke-width: 9;
}

.score-circle-meter {
  fill: none;
  stroke: #10B981;
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out, stroke 0.3s ease;
}

.score-radial-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-number-val {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
}

.score-denom {
  font-size: 0.68rem;
  color: #64748B;
  font-weight: 600;
}

.score-verdict-tag {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34D399;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.score-headline {
  margin: 0 0 4px 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
}

.score-summary-text {
  margin: 0;
  font-size: 0.84rem;
  color: #94A3B8;
  line-height: 1.45;
}

/* Metrics grid */
.scanner-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.metric-card {
  background: #0E121B;
  border: 1px solid #1E2536;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-lbl {
  font-size: 0.72rem;
  color: #64748B;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: #38BDF8;
}

.metric-val.high { color: #34D399; }
.metric-val.mid { color: #FBBF24; }
.metric-val.low { color: #F87171; }

/* Feedback recommendations */
.scanner-feedback-box {
  background: #0E121B;
  border: 1px solid #1E2536;
  border-radius: 12px;
  padding: 16px 20px;
}

.feedback-box-title {
  margin: 0 0 12px 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #F1F5F9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-box-title svg {
  color: #F59E0B;
}

.feedback-items-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-items-list li {
  font-size: 0.85rem;
  color: #CBD5E1;
  line-height: 1.5;
}

/* Results footer */
.scanner-results-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

.btn-builder-bridge {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1D64F2 0%, #1554D1 100%);
  color: #FFFFFF;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 18px;
  border-radius: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(29, 100, 242, 0.35);
}

.btn-builder-bridge:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(29, 100, 242, 0.45);
}

.btn-audit-another {
  background: #1E2536;
  border: 1px solid #2B344C;
  color: #CBD5E1;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-audit-another:hover {
  background: #252E44;
  color: #FFFFFF;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dark-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -270px !important;
    height: 100vh !important;
    z-index: 100 !important;
    margin: 0 !important;
    margin-left: 0 !important;
  }

  .dark-sidebar.collapsed {
    margin-left: 0 !important;
  }

  .dark-sidebar.mobile-open {
    left: 0 !important;
    margin-left: 0 !important;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.8) !important;
  }

  .sidebar-backdrop {
    z-index: 90;
  }

  .sidebar-expand-btn {
    display: none !important;
  }

  .mobile-menu-btn {
    display: block !important;
  }

  .hero-split-canvas {
    grid-template-columns: 1fr !important;
    padding: 24px 0 0 !important;
  }

  .hero-copy-column {
    padding: 10px 20px !important;
  }

  .hero-visual-column {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .dark-sidebar.mobile-open ~ .dark-main-stage .sidebar-expand-btn {
    display: none !important;
  }

  .scanner-modal-card {
    max-width: 95%;
  }
  .results-score-banner {
    flex-direction: column;
    text-align: center;
  }
  .scanner-results-footer {
    flex-direction: column;
  }
  .btn-builder-bridge,
  .btn-audit-another {
    width: 100%;
  }
}
