@charset "UTF-8";

/* GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@700&family=Open+Sans:wght@300&display=swap');

/* RESET E SAFE AREA */
html, body {
  margin: 0;
  padding: 0;
  padding-top: 8px; /* fallback generale */
  padding-top: constant(safe-area-inset-top); /* Safari legacy */
  padding-top: env(safe-area-inset-top); /* browser moderni */
  height: 100%;
  font-size: clamp(0.9rem, 2vmin, 1.04rem);
  background-color: #660000;
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  color: #FCDE98;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: hidden !important;
}

/* APPLICAZIONE FLEX PER LAYOUT */
.app {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.main {
  flex: 0 0 auto;
}

/*
@media screen and (orientation: portrait) {
  html, body {
    overflow-y: hidden !important;
    overscroll-behavior-y: none;
    height: 100vh;
  }
}

@media screen and (orientation: landscape) {
  html, body {
    overflow-y: auto;
  }
}
*/

/* LOGO E SHARE */
#logo {
  background: url(../images/sfondo-player.png) no-repeat;
  height: 80px;
  padding-top: 8px;
}
#share {
  margin-top: -26px;
  position: relative;
  right: 19px;
}

/* INFO BOX */
#info {
  background-color: #510200;
  padding: 6px 6px 0 0;
  margin: 12px 9px 0 9px;
  display: flex;
  align-items: flex-start;
}
.thumb {
  width: 100px;
  height: 100px;
  margin: 8px 10px 8px 8px;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
}
#scritte {
  flex-grow: 1;
  padding: 8px 0;
}
.titolo, .titoloCell {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
}
.titolo {
  font-size: clamp(0.86rem, 2vmin, 1.04rem) !important;
  line-height: 1.2;
}
.titoloCell {
  font-size: clamp(0.83rem, 2vmin, 1.04rem);
  padding: 6px 0 0 20px;
}
.abstract, .abstractCell,
#extraTags, #extraTags p {
  font-size: clamp(0.9rem, 2vmin, 1.04rem);
  line-height: 1.4;
}
.abstract {
  padding-top: 3px;
  line-height: 1.4;
}
.abstractCell {
  padding: 3px 0 6px 20px;
}
#extraTags {
  padding-top: 4px;
}
#extraTags p {
  margin: 2px 0;
  line-height: 1.3;
}

/* PLAYER */
#player {
  padding: 0 9px;
}
#vpplayer {
  width: 100%;
  transition: height 0.6s ease;
  overflow: hidden;
}

/* CONTAINER PLAYLIST */
#container {
  position: relative;
  flex: 1 1 auto;
  min-height: 0; /* importante per scroll in flex */
  overflow-y: auto;
  padding: 8px 9px 0 9px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

/* PLAYLIST TABLE */
.divTable {
  display: table;
  margin-top: 10px;
  width: 100%;
}
.divTableBody {
  display: table-row-group;
}
.divTableRow {
  display: table-row;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.divTableRow:hover {
  background-color: #520000;
}
.divTableRow.active {
  background-color: #510200 !important;
}
.divTableCell1,
.divTableCell2 {
  display: table-cell;
  vertical-align: middle;
  padding: 3px 2px;
}
.divTableCell1 .btn {
  width: 16px;
  margin-left: 14px;
}
.divTableCell2 {
  width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

/* PERFECT SCROLLBAR OVERRIDES */
.ps {
  overflow-x: hidden !important;
  overflow-y: auto   !important;
  overflow-anchor: none;
  touch-action: pan-y;
}
.ps__rail-x,
.ps__rail-y {
  display: none;
  opacity: 0;
  transition: background-color 0.2s linear, opacity 0.2s linear;
  position: absolute;
}
.ps__rail-x { height: 15px; bottom: 0; }
.ps__rail-y { width: 15px; right: 0; }
.ps--active-x > .ps__rail-x,
.ps--active-y > .ps__rail-y { display: block; background-color: transparent; }
.ps:hover > .ps__rail-x,
.ps:hover > .ps__rail-y,
.ps--focus > .ps__rail-x,
.ps--focus > .ps__rail-y,
.ps--scrolling-x > .ps__rail-x,
.ps--scrolling-y > .ps__rail-y { opacity: 0.6; }
.ps__thumb-x,
.ps__thumb-y { background-color: #aaa; border-radius: 6px; position: absolute; }
.ps__thumb-x { height: 6px; bottom: 2px; }
.ps__thumb-y { width: 6px; right: 2px; }
.ps__rail-x:hover > .ps__thumb-x { background-color: #999; height: 11px; }
.ps__rail-y:hover > .ps__thumb-y { background-color: #999; width: 11px; }

/* FALLBACK IE */
@supports (-ms-overflow-style: none) {
  .ps { overflow: auto !important; }
}
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  .ps { overflow: auto !important; }
}