/* ── Roadmap 2026 ── */
.roadmap-module {
  --rm-ink:        #0d0d0d;
  --rm-accent:     #00aef0;
  --rm-accent-dim: #e6f7fd;
  --rm-border:     #e8eaed;
  --rm-hover:      #f0faff;
  --rm-radius:     14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  display: block;
  width: 100%;
  box-sizing: border-box;
  float: none;
  clear: both;
  position: relative;
}

/* container card */
.roadmap-scroll-wrapper {
  display: block;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 2.5px solid var(--rm-ink);
  border-radius: var(--rm-radius);
  background: #fff;
  box-sizing: border-box;
  touch-action: pan-x;
}

/* table resets */
.roadmap-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  table-layout: auto;
  border-style: unset !important;
}

/* ── header ── */
.roadmap-th {
  background: var(--rm-ink);
  color: #fff;
  padding: 13px 18px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  border: none;
  position: sticky;
  top: 0;
  z-index: 10;
}
.roadmap-th:last-child { border-right: none; }

.roadmap-product-header {
  text-align: left;
  min-width: 160px;
  position: sticky;
  left: 0;
  z-index: 20;
  background: var(--rm-ink);
  box-shadow: 2px 0 6px rgba(0,0,0,0.15);
}
.roadmap-status-header  { text-align: center; min-width: 100px; }
.roadmap-date-header    { text-align: center; min-width: 120px; }
.roadmap-order-header   { text-align: center; width: 58px; min-width: 58px; }

/* ── rows ── */
.roadmap-row { transition: background 0.1s; }
.roadmap-row:hover .roadmap-td { background: var(--rm-hover); }

.roadmap-td {
  padding: 12px 18px;
  border: none;
  border-top: 0 !important;
  border-bottom: 1.5px solid var(--rm-border);
  border-right: 1px solid var(--rm-border);
  vertical-align: middle;
  background: #fff;
  transition: background 0.1s;
}
.roadmap-td:last-child            { border-right: none; }
.roadmap-row:last-child .roadmap-td { border-bottom: none; }

/* ── product cell ── */
.roadmap-product-cell {
  text-align: left;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 5;
  background: #fff;
  box-shadow: 2px 0 6px rgba(0,0,0,0.08);
}
.roadmap-row:hover .roadmap-product-cell { background: var(--rm-hover); }

.roadmap-product-thumb {
  display: inline-block;
  vertical-align: middle;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 10px;
  border: 1.5px solid var(--rm-border);
  flex-shrink: 0;
}

.roadmap-product-name {
  display: inline-block;
  vertical-align: middle;
  font-weight: 600;
  color: var(--rm-ink);
  text-decoration: none;
  transition: color 0.12s;
}
.roadmap-product-name:hover { color: var(--rm-accent); }

/* ── status cell ── */
.roadmap-status-cell { text-align: center; }

.roadmap-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.roadmap-icon img {
  width: 28px; height: 28px;
  object-fit: contain;
  display: block;
}

/* ── date cell ── */
.roadmap-date-cell { text-align: center; white-space: nowrap; }

.roadmap-date {
  display: inline-block;
  background: var(--rm-ink);
  color: #fff;
  font-weight: 700;
  padding: 4px 13px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ── order/detail cell ── */
.roadmap-order-cell { text-align: center; white-space: nowrap; }

.roadmap-order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 50%;
  transition: transform 0.15s, filter 0.15s;
  line-height: 1;
}
.roadmap-order-btn img {
  width: 28px; height: 28px;
  object-fit: contain;
  display: block;
}
.roadmap-order-available:hover {
  transform: translate(-2px, -2px) scale(1.12);
  filter: brightness(1.08);
}
.roadmap-order-unavailable { opacity: 0.38; }

/* UPDATE badge */
.rm-update-badge {
  display: inline-block;
  margin-left: 8px;
  background: var(--rm-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
  letter-spacing: 0.03em;
  text-decoration: none;
}
.rm-update-date {
  font-weight: 400;
  font-size: 0.9em;
  margin-left: 3px;
}

/* Mobile progress dots — hidden on desktop */
.rm-cell-label { display: none; }

/* ── responsive: card layout ── */
@media (max-width: 600px) {
  /* Wrapper becomes a transparent container */
  .roadmap-scroll-wrapper {
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
  }

  /* Break table into blocks */
  .roadmap-table,
  .roadmap-table thead,
  .roadmap-table tbody,
  .roadmap-table tr,
  .roadmap-table th,
  .roadmap-table td {
    width: 100%;
    box-sizing: border-box;
  }
  .roadmap-table,
  .roadmap-table thead,
  .roadmap-table tbody,
  .roadmap-table tr,
  .roadmap-table th {
    display: block;
  }

  /* Hide desktop header off-screen */
  .roadmap-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  /* Remove desktop min-width that causes overflow */
  .roadmap-table { min-width: 0; }

  /* Each row = a card */
  .roadmap-row {
    border: 2px solid var(--rm-ink);
    border-radius: 12px;
    margin-bottom: 14px;
    overflow: hidden;
    background: #fff;
  }
  .roadmap-row:hover .roadmap-td { background: #fff; }

  /* Product cell = dark card header */
  .roadmap-product-cell {
    background: var(--rm-ink);
    padding: 12px 14px;
    position: static;
    box-shadow: none;
    white-space: normal;
    border-bottom: none;
    border-right: none;
    display: flex;
    align-items: center;
  }
  .roadmap-row:hover .roadmap-product-cell { background: var(--rm-ink); }
  .roadmap-product-cell .roadmap-product-name {
    color: #fff;
    font-size: 14px;
    white-space: normal;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.45);
    text-underline-offset: 3px;
    flex: 1;
    min-width: 0;
  }
  .roadmap-product-cell .roadmap-product-name::after {
    content: none;
  }
  .roadmap-product-cell::after {
    content: '›';
    display: block;
    flex-shrink: 0;
    align-self: center;
    margin-left: 7px;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    opacity: 0.65;
    color: #fff;
    transition: transform 0.15s, opacity 0.15s;
  }
  .roadmap-product-cell:active {
    background: #2a2a2a;
  }
  .roadmap-product-cell:active::after {
    transform: translateX(3px);
    opacity: 1;
  }
  .roadmap-product-cell .roadmap-product-thumb {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-color: rgba(255,255,255,0.3);
  }

  /* Data cells: label on left, value on right */
  .roadmap-td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-right: none;
    border-bottom: 1px solid var(--rm-border);
    min-width: 0;
  }
  .roadmap-td:last-child { border-bottom: none; }

  /* Label from data-label attribute */
  .roadmap-td[data-label]::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    margin-right: 10px;
  }

  .roadmap-status-cell,
  .roadmap-date-cell,
  .roadmap-order-cell { text-align: right; }

  .roadmap-date { font-size: 13px; }

  /* Badge in dark mobile header — white outline instead of ink fill */
  .roadmap-product-cell .rm-update-badge {
    display: block;
    width: fit-content;
    margin-left: 0;
    margin-top: 5px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
  }

  /* Hide complete and pending status cells — show only current/processing */
  .roadmap-table td.roadmap-status-complete-cell,
  .roadmap-table td.roadmap-status-pending-cell { display: none; }

  /* Current status cell: use HTML label (rm-cell-label) instead of ::before */
  .roadmap-status-current-cell[data-label]::before { display: none; }

  .rm-cell-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    margin-right: 10px;
  }
  .rm-prog {
    display: inline-flex;
    gap: 3px;
    align-items: center;
  }
  .rm-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    box-sizing: border-box;
  }
  .rm-dot.rm-filled { background: #888; }
  .rm-dot.rm-empty  { background: transparent; border: 1.5px solid #aaa; }

  /* Hide date row when date_planned is empty */
  .roadmap-table td.roadmap-date-empty { display: none; }
}
