/* ========================================================================== 
   Relax FM dainu istorijos puslapis
   ========================================================================== */

.rfm-song-history-page-wrap {
  max-width: 1600px;
  margin: 165px auto 96px;
  padding: 0 48px;
  box-sizing: border-box;
  font-family: var(--rfm-font-main);
  color: #261C1D;
}

.rfm-song-history-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(520px, 1.05fr);
  gap: 32px;
  align-items: stretch;
  margin-bottom: 28px;
}

.rfm-song-history-header,
.rfm-song-history-station-panel,
.rfm-song-history-content {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 48px rgba(38, 28, 29, 0.055);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  box-sizing: border-box;
}

.rfm-song-history-header {
  border-radius: 28px;
  padding: 34px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 240px;
}

.rfm-song-history-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: rgba(210, 4, 43, 0.08);
  border: 1px solid rgba(210, 4, 43, 0.20);
  border-radius: 7px;
  padding: 7px 15px;
  margin-bottom: 18px;
}

.rfm-song-history-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D2042B;
  box-shadow: 0 0 0 4px rgba(210, 4, 43, 0.10);
}

.rfm-song-history-title-row h1 {
  margin: 0;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 1.25px;
  color: #D2042B;
  text-transform: uppercase;
}

.rfm-song-history-lead {
  max-width: 760px;
  margin: 0;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.65;
  letter-spacing: 0;
  font-weight: 600;
  color: #4f4546;
}

.rfm-song-history-station-panel {
  border-radius: 30px;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  min-height: 240px;
}

.rfm-song-history-station-card {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.48);
  border-radius: 26px;
  padding: 20px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(38, 28, 29, 0.045);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.rfm-song-history-station-card:hover,
.rfm-song-history-station-card.is-active {
  transform: translateY(-3px);
  border-color: rgba(210, 4, 43, 0.32);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 20px 48px rgba(210, 4, 43, 0.12);
}

.rfm-song-history-station-card.is-active .rfm-song-history-logo-frame {
  box-shadow: 0 18px 42px rgba(210, 4, 43, 0.18), 0 0 0 5px rgba(210, 4, 43, 0.08);
}

.rfm-song-history-logo-frame {
  width: min(142px, 10.2vw);
  min-width: 104px;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #FFFFFF;
  box-shadow: 0 14px 34px rgba(38, 28, 29, 0.08);
  transition: box-shadow .22s ease;
}

.rfm-song-history-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rfm-song-history-logo-fallback {
  font-size: 30px;
  font-weight: 800;
  color: #D2042B;
}

.rfm-song-history-station-name {
  font-size: 13px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .5px;
  color: #2A2021;
  text-transform: uppercase;
  text-align: center;
}

.rfm-song-history-content {
  border-radius: 30px;
  padding: 26px;
}

.rfm-song-history-content-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
  padding: 0 2px;
}

.rfm-song-history-small-label,
.rfm-song-history-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(210, 4, 43, 0.08);
  border: 1px solid rgba(210, 4, 43, 0.16);
  color: #D2042B;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
}

.rfm-song-history-content-head h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -1.4px;
  color: #211819;
}

.rfm-song-history-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rfm-song-history-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(38, 28, 29, 0.035);
}

.rfm-song-history-row-time {
  justify-self: start;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 60px;
  padding: 8px 10px;
  border-radius: 11px;
  background: #D2042B;
  color: #FFFFFF;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .2px;
}

.rfm-song-history-row-main {
  min-width: 0;
}

.rfm-song-history-row-title {
  display: block;
  font-size: 14px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.15px;
  color: #241A1B;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.rfm-song-history-row-artist {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: .2px;
  color: #74696A;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.rfm-song-history-loading,
.rfm-song-history-empty {
  grid-column: 1 / -1;
  min-height: 130px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #74696A;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .rfm-song-history-hero {
    grid-template-columns: 1fr;
  }

  .rfm-song-history-station-panel {
    min-height: 0;
  }

  .rfm-song-history-logo-frame {
    width: 124px;
  }
}

@media (max-width: 768px) {
  .rfm-song-history-page-wrap {
    margin: 118px auto 94px;
    padding: 0 14px;
  }

  .rfm-song-history-hero {
    gap: 14px;
    margin-bottom: 14px;
  }

  .rfm-song-history-header,
  .rfm-song-history-station-panel,
  .rfm-song-history-content {
    border-radius: 22px;
  }

  .rfm-song-history-header {
    min-height: 0;
    padding: 22px;
  }

  .rfm-song-history-lead {
    font-size: 16px;
    line-height: 1.58;
    letter-spacing: 0;
  }

  .rfm-song-history-station-panel {
    padding: 12px;
    gap: 10px;
  }

  .rfm-song-history-station-card {
    border-radius: 18px;
    padding: 12px 8px 10px;
    gap: 9px;
  }

  .rfm-song-history-logo-frame {
    min-width: 0;
    width: 72px;
    border-radius: 18px;
  }

  .rfm-song-history-station-name {
    font-size: 10px;
    letter-spacing: .25px;
  }

  .rfm-song-history-content {
    padding: 14px;
  }

  .rfm-song-history-content-head {
    align-items: start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
  }

  .rfm-song-history-content-head h2 {
    font-size: 30px;
    margin-top: 8px;
  }

  .rfm-song-history-list {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .rfm-song-history-row {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: 15px;
  }

  .rfm-song-history-row-time {
    min-width: 50px;
    padding: 7px 8px;
    font-size: 11px;
  }

  .rfm-song-history-row-title {
    font-size: 13px;
  }

  .rfm-song-history-row-artist {
    font-size: 11px;
  }
}


/* v1.0.365 - design foundation from experimental visual pass: /dainu-paieska light cards and 3-station grid. */
/* v1.0.371 - /dainu-paieska/ aligned with global light history style */
.rfm-song-history-page-wrap {
  max-width: 1500px;
  margin-top: 150px;
  color: #25191b;
}

.rfm-song-history-header,
.rfm-song-history-station-panel,
.rfm-song-history-content {
  background: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(255,246,247,0.64));
  border: 1px solid rgba(210, 4, 43, 0.15);
  box-shadow: 0 18px 54px rgba(210, 4, 43, 0.075), inset 0 1px 0 rgba(255,255,255,0.88);
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
}

.rfm-song-history-header {
  position: relative;
  overflow: hidden;
}

.rfm-song-history-header::after,
.rfm-song-history-content::after {
  content: "";
  position: absolute;
  inset: auto -12% -45% 35%;
  height: 180px;
  background: radial-gradient(circle, rgba(210,4,43,0.09), rgba(210,4,43,0));
  pointer-events: none;
}

.rfm-song-history-title-row,
.rfm-song-history-small-label,
.rfm-song-history-status {
  background: rgba(255, 244, 246, 0.82);
  border-color: rgba(210, 4, 43, 0.22);
  color: #d2042b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.rfm-song-history-lead {
  color: rgba(42, 30, 32, 0.74);
}

.rfm-song-history-station-panel {
  gap: 14px;
}

.rfm-song-history-station-card {
  background: rgba(255,255,255,0.58);
  border-color: rgba(210, 4, 43, 0.12);
  box-shadow: 0 12px 30px rgba(210, 4, 43, 0.045), inset 0 1px 0 rgba(255,255,255,0.82);
}

.rfm-song-history-station-card:hover,
.rfm-song-history-station-card.is-active {
  background: rgba(255,255,255,0.82);
  border-color: rgba(210, 4, 43, 0.34);
  box-shadow: 0 18px 42px rgba(210, 4, 43, 0.12), inset 0 1px 0 rgba(255,255,255,0.94);
}

/* v1.0.374 - /dainu-paieska/ station cards use square logos again. */
.rfm-song-history-logo-frame {
  aspect-ratio: 1 / 1;
  width: min(142px, 10.2vw);
  min-width: 104px;
  border-radius: 24px;
  background: rgba(255,255,255,0.90);
  border: 1px solid rgba(210, 4, 43, 0.10);
  box-shadow: 0 12px 28px rgba(210, 4, 43, 0.065);
}

.rfm-song-history-logo-frame img {
  object-fit: cover;
  padding: 0;
  box-sizing: border-box;
}

.rfm-song-history-content {
  position: relative;
  overflow: hidden;
}

.rfm-song-history-content-head {
  position: relative;
  z-index: 1;
}

.rfm-song-history-list {
  position: relative;
  z-index: 1;
  gap: 10px;
}

.rfm-song-history-row {
  min-height: 68px;
  grid-template-columns: 76px minmax(0, 1fr);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(210, 4, 43, 0.10);
  box-shadow: 0 10px 26px rgba(210, 4, 43, 0.045), inset 0 1px 0 rgba(255,255,255,0.88);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.rfm-song-history-row:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.88);
  border-color: rgba(210, 4, 43, 0.18);
  box-shadow: 0 14px 32px rgba(210, 4, 43, 0.08), inset 0 1px 0 rgba(255,255,255,0.96);
}

.rfm-song-history-row-time {
  min-width: 58px;
  background: rgba(210,4,43,0.08);
  border: 1px solid rgba(210,4,43,0.18);
  color: #d2042b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.88);
}

.rfm-song-history-row-title {
  color: #211719;
  letter-spacing: -0.05px;
}

.rfm-song-history-row-artist {
  color: rgba(42, 30, 32, 0.58);
}

.rfm-song-history-loading,
.rfm-song-history-empty {
  background: rgba(255,255,255,0.68);
  border-color: rgba(210, 4, 43, 0.12);
  color: rgba(42, 30, 32, 0.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

@media (max-width: 768px) {
  .rfm-song-history-page-wrap {
    margin-top: 110px;
  }

  .rfm-song-history-station-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .rfm-song-history-station-card {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 9px 6px 8px;
    gap: 7px;
    border-radius: 16px;
    min-width: 0;
  }

  .rfm-song-history-logo-frame {
    width: min(74px, 23vw);
    min-width: 0;
    border-radius: 15px;
  }

  .rfm-song-history-logo-frame img {
    padding: 0;
  }

  .rfm-song-history-station-name {
    max-width: 100%;
    font-size: 9px;
    line-height: 1.08;
    letter-spacing: .1px;
    white-space: normal;
  }

  .rfm-song-history-row {
    grid-template-columns: 60px minmax(0, 1fr);
    min-height: 62px;
  }
}

/* v1.0.375 - /dainu-paieska/ mobile row spacing fix.
   Keep the same rendering rules, but reserve enough space for the time badge
   so song title/artist never slide under it on narrow screens. */
@media (max-width: 768px) {
  .rfm-song-history-page-wrap {
    margin-top: 124px;
  }

  .rfm-song-history-content {
    padding: 13px 12px;
  }

  .rfm-song-history-list {
    gap: 10px;
  }

  .rfm-song-history-row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 78px;
    padding: 13px 12px;
  }

  .rfm-song-history-row-time {
    justify-self: start;
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    padding: 8px 9px;
    box-sizing: border-box;
    white-space: nowrap;
  }

  .rfm-song-history-row-main {
    min-width: 0;
    padding-left: 0;
    overflow: hidden;
  }

  .rfm-song-history-row-title,
  .rfm-song-history-row-artist {
    display: block;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .rfm-song-history-row-title {
    font-size: 14px;
    line-height: 1.16;
  }

  .rfm-song-history-row-artist {
    margin-top: 5px;
    font-size: 11.5px;
    line-height: 1.18;
  }
}

@media (max-width: 380px) {
  .rfm-song-history-row {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .rfm-song-history-row-time {
    width: 66px;
    min-width: 66px;
    max-width: 66px;
    padding-left: 7px;
    padding-right: 7px;
    font-size: 10.5px;
  }

  .rfm-song-history-row-title {
    font-size: 13px;
  }
}


/* v1.0.520: artist alias artwork/link support in full song-history rows. */
.rfm-song-history-row.has-artwork {
  grid-template-columns: 54px 74px minmax(0, 1fr);
}
.rfm-song-history-row-art {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(210,4,43,.06);
  border: 1px solid rgba(210,4,43,.12);
  box-shadow: 0 8px 18px rgba(38,28,29,.08);
}
.rfm-song-history-row-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
a.rfm-song-history-row-art:hover {
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .rfm-song-history-row.has-artwork {
    grid-template-columns: 46px 62px minmax(0, 1fr);
  }
  .rfm-song-history-row-art {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }
}

/* v1.0.521: laidos/rubrikos istorijoje rodomos kaip subtilus eterio įrašas be papildomos etiketės. */
.rfm-song-history-row.is-segment{
  background:linear-gradient(135deg,rgba(210,4,53,.07),rgba(255,255,255,.82));
  border-color:rgba(210,4,53,.10);
}
.rfm-song-history-row.is-segment .rfm-song-history-row-title{
  color:#D20435;
  font-weight:900;
}
.rfm-song-history-row.is-segment .rfm-song-history-row-time{
  color:#D20435;
  background:rgba(210,4,53,.10);
}

/* v1.0.527: pilname dainu istorijos puslapyje rubrikos/laidos skiriasi raudonu Relax FM akcentu. */
.rfm-song-history-row.is-segment{
  border:1px solid rgba(210,4,53,.22)!important;
  border-left:4px solid #D20435!important;
  background:linear-gradient(135deg,rgba(210,4,53,.10),rgba(255,255,255,.86))!important;
  box-shadow:0 10px 26px rgba(210,4,53,.07)!important;
}
.rfm-song-history-row.is-segment .rfm-song-history-row-title{
  color:#D20435!important;
  font-weight:950!important;
}
.rfm-song-history-row.is-segment .rfm-song-history-row-time{
  background:#D20435!important;
  color:#fff!important;
}
.rfm-song-history-row.is-segment .rfm-song-history-row-art{
  border-color:rgba(210,4,53,.22)!important;
  box-shadow:0 12px 26px rgba(210,4,53,.14)!important;
}


/* v1.0.536: laidos/rubrikos pilnoje istorijoje rodomos be artwork. */
.rfm-song-history-row.is-segment{
  grid-template-columns:76px minmax(0,1fr)!important;
}
.rfm-song-history-row.is-segment .rfm-song-history-row-art{
  display:none!important;
}
@media (max-width:640px){
  .rfm-song-history-row.is-segment{
    grid-template-columns:62px minmax(0,1fr)!important;
  }
}
