/* ================================================================
   Mobile Workflow Landing v2 Styles
   Only active on mobile (max-width: 767px)
   ================================================================ */

/* Hide mobile workflow on desktop/tablet */
.mobile-workflow-home {
  display: none;
}

/* ================================================================
   MOBILE ONLY (max-width: 767px)
   ================================================================ */
@media (max-width: 767px) {

  /* Show mobile workflow, hide desktop hero CTA */
  .mobile-workflow-home {
    display: block;
    width: 100%;
    padding: 0 16px 24px;
    position: relative;
    z-index: 5;
  }

  /* Hide desktop hero content and CTA on mobile */
  #homeView .hero-content {
    display: none !important;
  }

  #homeView .cta-row {
    display: none !important;
  }

  #homeView .hero {
    min-height: auto !important;
    height: auto !important;
    padding-top: 0 !important;
  }

  /* ── Mobile Hero ── */
  .mw-hero {
    text-align: left;
    padding: 8px 0 16px;
    position: relative;
    z-index: 5;
  }

  .mw-hero-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(216, 180, 90, 0.85);
    background: rgba(216, 180, 90, 0.08);
    border: 1px solid rgba(216, 180, 90, 0.22);
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 12px;
  }

  .mw-hero-title {
    font-size: 28px;
    line-height: 1.18;
    letter-spacing: -0.03em;
    font-weight: 900;
    margin: 0 0 10px;
    background: linear-gradient(90deg, #ffffff 0%, #fff0b8 40%, #d8b45a 70%, #80b8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .mw-hero-desc {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(242, 247, 255, 0.72);
    margin: 0;
    max-width: 100%;
  }

  /* ── Mobile Cards ── */
  .mw-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
  }

  .mw-card {
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 18px 18px 16px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
  }

  .mw-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 240, 184, 0.35), rgba(23, 105, 255, 0.12), rgba(216, 180, 90, 0.25));
    -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
  }

  .mw-card:active {
    transform: scale(0.98);
  }

  .mw-card.highlight {
    border-color: rgba(216, 180, 90, 0.55);
    box-shadow: 0 0 20px rgba(216, 180, 90, 0.12);
    animation: mw-pulse 1.2s ease-in-out 2;
  }

  @keyframes mw-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(216, 180, 90, 0.12); }
    50% { box-shadow: 0 0 30px rgba(216, 180, 90, 0.25); }
  }

  .mw-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }

  .mw-card-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(216, 180, 90, 0.25), rgba(23, 105, 255, 0.18));
    border: 1px solid rgba(216, 180, 90, 0.35);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--gold-light);
    flex-shrink: 0;
  }

  .mw-card-icon {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(216, 180, 90, 0.25));
  }

  .mw-card-title {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
  }

  .mw-card-desc {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(242, 247, 255, 0.62);
    margin-bottom: 12px;
  }

  .mw-card-status {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
  }

  .mw-status-text {
    font-size: 13px;
    font-weight: 600;
    color: rgba(132, 185, 255, 0.85);
  }

  .mw-status-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(242, 247, 255, 0.72);
  }

  .mw-status-loading::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(132, 185, 255, 0.2);
    border-top-color: rgba(132, 185, 255, 0.85);
    border-radius: 50%;
    animation: mw-spin 0.8s linear infinite;
  }

  @keyframes mw-spin {
    to { transform: rotate(360deg); }
  }

  .mw-status-success {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #41d98c;
  }

  .mw-status-success::before {
    content: "";
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #41d98c;
    display: grid;
    place-items: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.5 11.5L3 8l1-1 2.5 2.5L12 4l1 1z'/%3E%3C/svg%3E");
    background-size: 14px 14px;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
  }

  .mw-status-error {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #ff7a7a;
  }

  .mw-status-error::before {
    content: "\26A0";
    font-size: 14px;
  }

  .mw-status-summary {
    font-size: 12px;
    color: rgba(242, 247, 255, 0.55);
    margin-top: 6px;
    line-height: 1.5;
  }

  /* ── Results Area ── */
  .mw-results {
    margin-top: 16px;
  }

  /* Job recommendation result cards */
  .mw-job-result {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 10px;
  }

  .mw-job-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }

  .mw-job-result-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(216, 180, 90, 0.2), rgba(23, 105, 255, 0.15));
    border: 1px solid rgba(216, 180, 90, 0.3);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--gold-light);
    flex-shrink: 0;
  }

  .mw-job-result-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    flex: 1;
  }

  .mw-job-result-score {
    font-size: 18px;
    font-weight: 800;
    color: var(--gold-light);
  }

  .mw-job-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
  }

  .mw-job-result-tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(132, 185, 255, 0.1);
    border: 1px solid rgba(132, 185, 255, 0.18);
    color: rgba(242, 247, 255, 0.72);
  }

  .mw-job-result-section {
    margin-bottom: 10px;
  }

  .mw-job-result-section-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .mw-job-result-section-title.pros { color: #41d98c; }
  .mw-job-result-section-title.cons { color: #ff9f7a; }
  .mw-job-result-section-title.gaps { color: #80b8ff; }

  .mw-job-result-section-title::before {
    content: "";
    width: 3px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
  }

  .mw-job-result-section-title.pros::before { background: #41d98c; }
  .mw-job-result-section-title.cons::before { background: #ff9f7a; }
  .mw-job-result-section-title.gaps::before { background: #80b8ff; }

  .mw-job-result-text {
    font-size: 12px;
    line-height: 1.6;
    color: rgba(242, 247, 255, 0.68);
    padding-left: 8px;
  }

  .mw-job-result-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
  }

  .mw-job-result-btn {
    flex: 1;
    height: 40px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
  }

  .mw-job-result-btn:active {
    transform: scale(0.97);
  }

  .mw-job-result-btn.primary {
    background: linear-gradient(135deg, rgba(216, 180, 90, 0.2), rgba(216, 180, 90, 0.08));
    border: 1px solid rgba(216, 180, 90, 0.45);
    color: var(--gold-light);
  }

  .mw-job-result-btn.secondary {
    background: rgba(132, 185, 255, 0.08);
    border: 1px solid rgba(132, 185, 255, 0.25);
    color: rgba(242, 247, 255, 0.8);
  }

  /* ── Gap Analysis Result ── */
  .mw-gap-result {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
  }

  .mw-gap-result-score {
    text-align: center;
    margin-bottom: 16px;
  }

  .mw-gap-result-score-value {
    font-size: 36px;
    font-weight: 900;
    color: var(--gold-light);
  }

  .mw-gap-result-score-label {
    font-size: 12px;
    color: rgba(242, 247, 255, 0.55);
  }

  .mw-gap-section {
    margin-bottom: 12px;
  }

  .mw-gap-section-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: rgba(255, 240, 184, 0.85);
  }

  .mw-gap-section-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mw-gap-section-list li {
    font-size: 12px;
    line-height: 1.6;
    color: rgba(242, 247, 255, 0.68);
    padding: 4px 0 4px 14px;
    position: relative;
  }

  .mw-gap-section-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: rgba(216, 180, 90, 0.55);
  }

  /* ── AI Coming Soon ── */
  .mw-ai-coming-soon {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px;
    margin-top: 14px;
    text-align: center;
  }

  .mw-ai-coming-soon-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 240, 184, 0.6);
    margin-bottom: 8px;
  }

  .mw-ai-coming-soon-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .mw-ai-coming-soon-item {
    font-size: 12px;
    color: rgba(242, 247, 255, 0.4);
  }

  /* ── 4-Step Closure ── */
  .mw-closure {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .mw-closure-title {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 240, 184, 0.7);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .mw-closure-star {
    color: rgba(216, 180, 90, 0.5);
    font-size: 12px;
  }

  .mw-closure-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .mw-closure-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    min-width: 64px;
  }

  .mw-closure-step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(216, 180, 90, 0.12);
    border: 1px solid rgba(216, 180, 90, 0.25);
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 800;
    color: var(--gold-light);
  }

  .mw-closure-step-icon {
    font-size: 20px;
    line-height: 1;
  }

  .mw-closure-step-name {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
  }

  .mw-closure-step-desc {
    font-size: 10px;
    line-height: 1.4;
    color: rgba(242, 247, 255, 0.45);
  }

  .mw-closure-arrow {
    font-size: 14px;
    color: rgba(216, 180, 90, 0.35);
    margin-top: -20px;
  }

  /* ── Toast for mobile workflow ── */
  .mw-toast {
    position: fixed;
    bottom: 24px;
    left: 16px;
    right: 16px;
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(3, 14, 38, 0.92);
    border: 1px solid rgba(216, 180, 90, 0.3);
    color: var(--gold-light);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    z-index: 9999;
    transform: translateY(80px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(10px);
  }

  .mw-toast.show {
    transform: translateY(0);
    opacity: 1;
  }

  /* ── Bottom sheet for job detail on mobile ── */
  .mw-bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 85vh;
    background: rgba(3, 14, 38, 0.96);
    border-radius: 24px 24px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 16px 32px;
  }

  .mw-bottom-sheet.active {
    transform: translateY(0);
  }

  .mw-bottom-sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 auto 16px;
  }

  .mw-bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .mw-bottom-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* ── Hide world map more on mobile to save space ── */
  .world-map-bg {
    top: 120px !important;
    height: 18vh !important;
    max-height: 160px !important;
    opacity: 0.08 !important;
  }

  /* ── Resume file meta (mobile) ────────────────────────────────── */
  .resume-file-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
  }

  .resume-file-name {
    max-width: 100%;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
  }

  .change-resume-btn {
    min-height: 34px;
    padding: 6px 14px;
    border-radius: 12px;
    border: 1px solid rgba(243, 213, 107, 0.5);
    background: rgba(255, 255, 255, 0.06);
    color: #f3d56b;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .change-resume-btn:active {
    transform: scale(0.97);
  }

  /* ── Change target job button (mobile) ────────────────────────── */
  .gap-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
  }

  .change-target-job-btn {
    width: 100%;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid rgba(243, 213, 107, 0.5);
    background: rgba(255, 255, 255, 0.06);
    color: #f3d56b;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
  }

  .change-target-job-btn:active {
    transform: scale(0.97);
  }

  /* ── Stale notice (mobile) ────────────────────────────────────── */
  .workflow-stale-notice {
    color: rgba(243, 213, 107, 0.85);
    font-size: 13px;
    text-align: center;
    margin-top: 12px;
    padding: 8px 14px;
    background: rgba(243, 213, 107, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(243, 213, 107, 0.2);
  }

}

/* ================================================================
   EXTRA SMALL MOBILE (max-width: 390px)
   ================================================================ */
@media (max-width: 390px) {
  .mw-hero-title {
    font-size: 26px;
  }

  .mw-card {
    padding: 16px 14px 14px;
    border-radius: 18px;
  }

  .mw-card-title {
    font-size: 16px;
  }

  .mw-card-desc {
    font-size: 12px;
  }

  .mw-closure-step {
    min-width: 56px;
  }

  .mw-closure-step-name {
    font-size: 10px;
  }

  .mw-closure-step-desc {
    font-size: 9px;
  }
}

/* ================================================================
   TABLET (768px - 1023px) — hide mobile workflow
   ================================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
  .mobile-workflow-home {
    display: none !important;
  }
}
