/*
 * RadarČeska — Train Journey History v2.1.0
 * Mobile-first journey archive.
 */

.rc-jh{
  margin:18px 0 22px;
  border:1px solid rgba(39,66,72,.10);
  border-radius:20px;
  background:#fff;
  box-shadow:0 8px 28px rgba(35,58,64,.055);
  overflow:hidden;
}

.rc-jh *{
  box-sizing:border-box;
}

.rc-jh-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:20px 20px 17px;
  border-bottom:1px solid rgba(39,66,72,.085);
}

.rc-jh-kicker{
  display:block;
  margin:0 0 5px;
  color:#729096;
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.rc-jh-head h2{
  margin:0;
  color:#203d43;
  font-size:21px;
  line-height:1.15;
  letter-spacing:-.025em;
}

.rc-jh-head p{
  max-width:620px;
  margin:7px 0 0;
  color:#728489;
  font-size:13px;
  line-height:1.45;
}

.rc-jh-count{
  flex:0 0 auto;
  min-width:54px;
  padding:7px 10px;
  border-radius:999px;
  background:#f0f5f4;
  color:#45686c;
  font-size:12px;
  font-weight:800;
  text-align:center;
  white-space:nowrap;
}

.rc-jh-list{
  display:block;
}

.rc-jh-run{
  margin:0;
  border:0;
  border-bottom:1px solid rgba(39,66,72,.075);
  background:#fff;
}

.rc-jh-run:last-child{
  border-bottom:0;
}

.rc-jh-run>summary{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px 14px;
  padding:17px 46px 17px 20px;
  cursor:pointer;
  list-style:none;
  transition:background .14s ease;
}

.rc-jh-run>summary::-webkit-details-marker{
  display:none;
}

.rc-jh-run>summary:hover{
  background:#fafcfc;
}

.rc-jh-run[open]>summary{
  background:#f8fbfa;
  border-bottom:1px solid rgba(39,66,72,.07);
}

.rc-jh-run>summary:after{
  content:"";
  position:absolute;
  right:21px;
  top:50%;
  width:8px;
  height:8px;
  border-right:2px solid #829598;
  border-bottom:2px solid #829598;
  transform:translateY(-70%) rotate(45deg);
  transition:transform .16s ease;
}

.rc-jh-run[open]>summary:after{
  transform:translateY(-30%) rotate(225deg);
}

.rc-jh-main{
  min-width:0;
}

.rc-jh-date{
  display:flex;
  align-items:center;
  gap:7px;
  margin-bottom:6px;
  color:#71888d;
  font-size:11px;
  font-weight:800;
  letter-spacing:.035em;
  text-transform:uppercase;
}

.rc-jh-date .is-today{
  padding:3px 6px;
  border-radius:999px;
  background:#e8f6f1;
  color:#237960;
  font-size:9px;
}

.rc-jh-route{
  display:block;
  overflow:hidden;
  color:#203e44;
  font-size:15px;
  font-weight:800;
  line-height:1.28;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rc-jh-route.is-empty{
  color:#839396;
  font-weight:650;
}

.rc-jh-meta{
  display:flex;
  flex-wrap:wrap;
  gap:5px 12px;
  margin-top:7px;
  color:#829195;
  font-size:11px;
  line-height:1.35;
}

.rc-jh-meta span{
  white-space:nowrap;
}

.rc-jh-side{
  display:flex;
  align-items:flex-start;
  gap:8px;
}

.rc-jh-delay{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  padding:6px 8px;
  border-radius:9px;
  background:#eef4f3;
  color:#476a6e;
  font-size:11px;
  font-weight:850;
  white-space:nowrap;
}

.rc-jh-delay.is-good{
  background:#e8f6f0;
  color:#23785e;
}

.rc-jh-delay.is-warn{
  background:#fff3db;
  color:#8e6720;
}

.rc-jh-delay.is-bad{
  background:#fbe9e8;
  color:#a14d46;
}

.rc-jh-body{
  padding:18px 20px 21px;
  background:#fbfcfc;
}

.rc-jh-loading,
.rc-jh-empty,
.rc-jh-error{
  padding:18px;
  border-radius:13px;
  background:#f2f6f5;
  color:#718489;
  font-size:12px;
  line-height:1.5;
}

.rc-jh-error{
  background:#fbefee;
  color:#91544e;
}

.rc-jh-overview{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin-bottom:20px;
}

.rc-jh-stat{
  min-width:0;
  padding:11px 12px;
  border:1px solid rgba(39,66,72,.075);
  border-radius:12px;
  background:#fff;
}

.rc-jh-stat span{
  display:block;
  margin-bottom:4px;
  color:#8a999c;
  font-size:9px;
  font-weight:800;
  letter-spacing:.055em;
  text-transform:uppercase;
}

.rc-jh-stat strong{
  display:block;
  overflow:hidden;
  color:#304d52;
  font-size:13px;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rc-jh-section{
  margin-top:19px;
}

.rc-jh-section:first-of-type{
  margin-top:0;
}

.rc-jh-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:9px;
}

.rc-jh-section-head div{
  min-width:0;
}

.rc-jh-section-head small{
  display:block;
  margin-bottom:2px;
  color:#8b999c;
  font-size:9px;
  font-weight:800;
  letter-spacing:.075em;
  text-transform:uppercase;
}

.rc-jh-section-head h3{
  margin:0;
  color:#29474c;
  font-size:14px;
  line-height:1.25;
}

.rc-jh-section-head>span{
  color:#8a999c;
  font-size:10px;
  white-space:nowrap;
}

.rc-jh-timetable{
  overflow:hidden;
  border:1px solid rgba(39,66,72,.08);
  border-radius:13px;
  background:#fff;
}

.rc-jh-call{
  display:grid;
  grid-template-columns:54px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:7px 11px;
  border-bottom:1px solid rgba(39,66,72,.06);
}

.rc-jh-call:last-child{
  border-bottom:0;
}

.rc-jh-call-time{
  color:#385a5f;
  font-size:12px;
  font-weight:850;
  font-variant-numeric:tabular-nums;
}

.rc-jh-call-station{
  min-width:0;
}

.rc-jh-call-station strong{
  display:block;
  overflow:hidden;
  color:#345157;
  font-size:12px;
  line-height:1.3;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rc-jh-call-station small{
  display:block;
  margin-top:2px;
  color:#93a0a3;
  font-size:9px;
}

.rc-jh-call-kind{
  padding:3px 6px;
  border-radius:999px;
  background:#f1f4f4;
  color:#839397;
  font-size:9px;
  font-weight:800;
  white-space:nowrap;
}

.rc-jh-call.is-pass{
  opacity:.72;
}

.rc-jh-call.is-pass .rc-jh-call-kind{
  background:transparent;
}

.rc-jh-timeline{
  max-height:330px;
  overflow:auto;
  border:1px solid rgba(39,66,72,.08);
  border-radius:13px;
  background:#fff;
}

.rc-jh-sample{
  display:grid;
  grid-template-columns:62px 60px minmax(0,1fr);
  gap:10px;
  align-items:center;
  min-height:39px;
  padding:7px 11px;
  border-bottom:1px solid rgba(39,66,72,.06);
}

.rc-jh-sample:last-child{
  border-bottom:0;
}

.rc-jh-sample-time{
  color:#536e73;
  font-size:11px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}

.rc-jh-sample-delay{
  font-size:11px;
  font-weight:850;
}

.rc-jh-sample-delay.is-good{
  color:#27765f;
}

.rc-jh-sample-delay.is-warn{
  color:#956b20;
}

.rc-jh-sample-delay.is-bad{
  color:#a34e47;
}

.rc-jh-sample-place{
  overflow:hidden;
  color:#7b8e92;
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rc-jh-observed{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.rc-jh-observed span{
  display:inline-flex;
  padding:5px 8px;
  border:1px solid rgba(39,66,72,.075);
  border-radius:999px;
  background:#fff;
  color:#607a7f;
  font-size:10px;
}

.rc-jh-legacy-note{
  margin-top:10px;
  padding:10px 12px;
  border-radius:10px;
  background:#f1f5f4;
  color:#7f9093;
  font-size:10px;
  line-height:1.45;
}

.rc-jh-footer{
  display:flex;
  justify-content:center;
  padding:14px 18px 17px;
  border-top:1px solid rgba(39,66,72,.07);
}

.rc-jh-more{
  min-height:38px;
  padding:8px 14px;
  border:1px solid rgba(39,66,72,.12);
  border-radius:10px;
  background:#fff;
  color:#45686d;
  font:750 11px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor:pointer;
}

.rc-jh-more:hover{
  background:#f6f9f8;
}

.rc-jh-more[disabled]{
  opacity:.5;
  cursor:default;
}

.rc-jh-more[hidden]{
  display:none;
}

@media (max-width:720px){

  .rc-jh{
    margin-left:0;
    margin-right:0;
    border-radius:16px;
  }

  .rc-jh-head{
    padding:17px 15px 14px;
  }

  .rc-jh-head h2{
    font-size:18px;
  }

  .rc-jh-head p{
    font-size:11px;
  }

  .rc-jh-count{
    padding:6px 8px;
    font-size:10px;
  }

  .rc-jh-run>summary{
    grid-template-columns:minmax(0,1fr);
    gap:8px;
    padding:14px 38px 14px 15px;
  }

  .rc-jh-run>summary:after{
    right:16px;
  }

  .rc-jh-side{
    justify-content:flex-start;
  }

  .rc-jh-route{
    font-size:13px;
    white-space:normal;
  }

  .rc-jh-meta{
    font-size:10px;
  }

  .rc-jh-body{
    padding:14px 15px 17px;
  }

  .rc-jh-overview{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .rc-jh-stat{
    padding:9px 10px;
  }

  .rc-jh-call{
    grid-template-columns:48px minmax(0,1fr);
    gap:7px;
    padding:7px 9px;
  }

  .rc-jh-call-kind{
    display:none;
  }

  .rc-jh-sample{
    grid-template-columns:52px 54px minmax(0,1fr);
    gap:6px;
    padding:7px 9px;
  }
}

/* RADARCESKA JOURNEY HISTORY v2.1.1 */
[data-rc-history-slot]
.railfan-subsection[data-rc-journey-v2-legacy-hidden="1"]{
  display:none !important;
}

/*
 * If legacy History was the left column and Photos were right,
 * let the remaining subsection use the full available width.
 */
[data-rc-history-slot]
.railfan-subsection[data-rc-journey-v2-legacy-hidden="1"]
+ .railfan-subsection{
  grid-column:1 / -1;
}
