/*----------------------------------------------------------------------
channel.css holds CSS3 style definition used by channel.html in the website.
Application: Public Domain Radio
Platform   : CSS3
------------------------------------------------------------------------
Copyright  : http://creativecommons.org/publicdomain/zero/1.0/
Created    : March 2023, Hartwig Thomas
----------------------------------------------------------------------*/
/*======================================================================
media-independent rules
======================================================================*/
@import "sfpd.css";

.sharebutton
{
  margin-left: auto;
}

/*----------------------------------------------------------------------
header button popups
----------------------------------------------------------------------*/
header > div
{
  z-index: 1;
  position: fixed;
  top: var(--height_hf);
  right: 0;
  height: var(--height_hf);
  --download_width: 12rem;
  width: var(--download_width);
  display: none;
}

header > div > a
{
  height: 100%;
  background-color: var(--color_darkgray);
  color: var(--color_light);
  text-decoration: none;
  padding-left: 1rem;
  padding-right: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: left;
  /* border-bottom: 1px solid var(--color_light); */
}

header > div > a object
{
  height: calc(0.7 * var(--size_button));
  width: auto;
  vertical-align: bottom;
}

/*----------------------------------------------------------------------
main part with two sections
----------------------------------------------------------------------*/
article
{
  background-color: var(--color_black);
  border-style: none;
  border-width: 0;
  margin: 0;
  padding: 0;
  color: var(--color_light);
  flex: 1 0 auto;
  height: auto;
  display: inline-flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: flex-start;
  align-content: flex-start; /* cross direction! */
  flex-wrap: wrap;
  --article_width: 100vw;
  --article_height: calc(100vh - 2 * var(--height_hf));
  height: var(--article_height);
  width: var(--article_width);
}

article a:link { color: var(--color_light); }
article a:visited { color: var(--color_lightgray); }
article a:hover { color: var(--color_lightgray); }
article a:active { color: var(--color_lightgray); }

section
{
  display: block;
  border-style: none;
  border-width: 0;
  margin: 0;
  padding-left: var(--hpadding);
  padding-right: var(--hpadding);
  padding-top: var(--vpadding);
  padding-bottom: var(--vpadding);
  --section_width: calc(var(--article_width) - 2 * var(--hpadding));
  --section_height: calc(var(--article_height) - 2 * var(--vpadding));
  width: var(--section_width);
}

@media (orientation: landscape)
{
  section
  {
    --section_width: calc(0.5 * var(--article_width) - 2 * var(--hpadding) - 1px);
    width: var(--section_width);
  }
}

/*----------------------------------------------------------------------
player
----------------------------------------------------------------------*/
/* modify article height */
article
{
	--article_height: calc(100vh - 4 * var(--height_hf));
  height: var(--article_height);
}

aside > div
{
  padding-left: var(--hpadding);
  padding-right: var(--hpadding);
  padding-top: calc(0.5 * var(--vpadding));
  padding-bottom: calc(0.5 * var(--vpadding));
  height: calc(var(--height_hf) - var(--vpadding));
  color: var(--color_light);
  background-color: var(--color_lightblack);
  display: flex;
  flex-direction: row;
}

@media (orientation: landscape)
{
  aside
  {
    --article_height: calc(100vh - 4 * var(--height_hf));
    --section_width: calc(50vw - 2 * var(--hpadding));
    max-width: min(var(--section_width), var(--article_height) - 2 * var(--hpadding));
	  padding-left: var(--hpadding);
	  padding-right: var(--hpadding);
	  margin-left: var(--hpadding);
  }
}

.player > p
{
	margin-left: 0.5rem;
	margin-right: 0.5rem;
	margin-top: 0.4ex;
	margin-bottom: 0.4ex;
  --size_text_font: 11pt;
  font-size: var(--size_text_font);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
	margin-right: auto;
}

.playbutton
{
  height: var(--height_hf);
  width: var(--height_hf);
  background-color: var(--color_lightblack);
  border-radius: 100%;
  outline: none;
  border: 0;
  margin: 0;
  padding: 0;
}

.playbutton object
{
  width: calc(var(--height_hf) - var(--vpadding));
  height: calc(var(--height_hf) - var(--vpadding));
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none; /* otherwise SVG "steals" the click event. */ 
}

.prevbutton
{
  height: var(--height_hf);
  width: var(--height_hf);
  background-color: var(--color_lightblack);
  border-radius: 100%;
  outline: none;
  border: 0;
  margin: 0;
  padding: 0;
}

.prevbutton object
{
  width: calc(var(--height_hf) - var(--vpadding));
  height: calc(var(--height_hf) - var(--vpadding));
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none; /* otherwise SVG "steals" the click event. */ 
}

.nextbutton
{
  height: var(--height_hf);
  width: var(--height_hf);
  background-color: var(--color_lightblack);
  border-radius: 100%;
  outline: none;
  border: 0;
  margin: 0;
  padding: 0;
}

.nextbutton object
{
  width: calc(var(--height_hf) - var(--vpadding));
  height: calc(var(--height_hf) - var(--vpadding));
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none; /* otherwise SVG "steals" the click event. */ 
}

/*----------------------------------------------------------------------
sections
----------------------------------------------------------------------*/
section
{
  --left_height: min(var(--section_width), 0.5 * var(--article_height) - 2 * var(--vpadding));
  --right_height: calc(var(--article_height) - var(--left_height) - 4 * var(--vpadding));
  --left_width: min(var(--section_width), var(--article_height) - 2 * var(--hpadding));
  --right_width: calc(var(--article_width) - var(--left_width) - 4 * var(--hpadding) - 1px);
}

section.left
{
  width: var(--left_width);
  height: var(--left_height);
  overflow-y: auto;  
}

section.left > div
{
  height: 100%;
  width: 100%;
  /*
  width: 100%;
  text-align: center;
  vertical-align: middle;
  */
  display:flex; 
  justify-content:center;
  align-items:center;
}

section.left > div > img
{
  width: 100%;
  height: auto;
}

section.right
{
  width: var(--left_width);
  height: var(--right_height);
  --size_text_font: 11pt;
  font-size: var(--size_text_font);
  overflow-y: auto;
}

section.right a
{
  display: block;
	width: var(--left_width);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;	
}

h1
{
  --size_title_font: 14pt;
  font-size: var(--size_title_font);
}

h2
{
  --size_subtitle_font: 8pt;
  font-size: var(--size_subtitle_font);
  font-style: italic;
}

section.right > pre
{
  margin-top: 0;
  margin-bottom: 0;
	white-space: break-spaces;
}

@media (orientation: landscape)
{
	section.left
	{
    width: var(--left_height);
    height: 100%);
    overflow-y: auto;
  }

  section.right
  {
    width: var(--right_width);
	  height: var(--section_height);
	  overflow-y: auto;
  }
  
}

