/*----------------------*
 *  video-player ui
 *----------------------*/

:root {
  --c-text: rgba(0, 0, 0, 0.75);
  --c-btn-bg: rgba(0, 0, 0, 0.75);
  --c-btn-bg-hover: rgba(0, 0, 0, 0.55);
  --s-btn-border: 0px;
  --c-btn-border: rgba(0, 0, 0, 0.75);
  --c-btn-text: rgba(255, 255, 255, 1.0);
  --c-focus-ring: rgba(15, 23, 42, 0.25);
  --c-accent-control: rgba(0, 0, 0, 0.75);
  --c-input-bar: rgba(0, 0, 0, 0.65);
}

.yt_wrap {
  position: relative;
  width: 100%;
  background: transparent;
  overflow: hidden;
  box-shadow: 0 0 0px rgba(0, 0, 0, 0.35);

}

.yt_box {
  aspect-ratio: 640 / 360;
  width: 100%;
  background: rgba(247, 239, 213, 1.0) center / cover no-repeat;
  overflow: hidden;
  position: relative;
  display: block;
  padding: var(--padding_vid_ext);
}

.yt_video {
  border-radius: var(--radius_yt_box) var(--radius_yt_box) 0 0;
  position: static;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
  overflow: hidden;
}

.yt_consent {
  position: absolute;
  inset: 0;
  display: flex;
  
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: Arial, sans-serif;
  background: rgba(0, 0, 0, 0);
  color: rgba(0, 0, 0, 0);
  text-align: center;
  padding: 2rem;
  line-height: 1.5;
  z-index: 2;
}

.yt_consent p,
.yt_consent ul,
.yt_consent li,
.yt_consent strong {color: rgba(255, 255, 255, 0.5);}

.yt_consent p {margin: 0;}

.yt_consent button {
  margin-top: 0.8rem;
  padding: 0.55rem 1rem;
  border: 0px solid transparent;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.30);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  box-shadow: 0px 0px 2px rgba(255, 255, 255, 0.9);
}

.yt_consent button:hover {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0px 0px 2px rgba(255, 255, 255, 0.9);}

.yt_consent button:focus-visible {
  outline: none;
  border-color: var(--c-focus-ring);
}

.yt_overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  background: transparent;
  text-align: center;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}

/*-------------------------*
 *  custom controls
 *-------------------------*/

.yt_ctrls {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: auto 90px 1fr auto 90px auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 2.8rem;
  box-sizing: border-box;
  border: 0px solid rgba(0, 0, 0, 0.25);
  border-top: none;
  border-radius: 0 0 var(--radius_yt_box) var(--radius_yt_box);
  
  background-color: rgba(247, 239, 213, 1.0);
  background-image: var(--bc_img1);
  background-repeat: repeat;
  background-size: auto;
  background-attachment: scroll;	
}


/* SVG Grundzustand */
.yt_ctrls svg {
  width: 24px;
  height: 24px;
  fill: var(--c-btn-text);
}

.yt_ctrls svg .stroke {
  fill: none;
  stroke: var(--c-btn-text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Grundzustand aller Buttons */
.yt_btn_play,
.yt_btn_mute,
.yt_btn_fsc {
  appearance: none;
  border: var(--s-btn-border) solid var(--c-btn-border);
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  background: linear-gradient(180deg, rgba(70, 70, 70, 0.9), rgba(0, 0, 0, 0.9));
  color: var(--c-btn-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Hover nur dort, wo es echte Maus gibt */
@media (hover: hover) and (pointer: fine) {
  .yt_btn_play:hover,
  .yt_btn_mute:hover,
  .yt_btn_fsc:hover {
    color: var(--fc_nav_al2);
    background: linear-gradient(180deg, rgba(70,70,70,.9), rgba(0,0,0,.8));
  }

  .yt_btn_play:hover svg,
  .yt_btn_mute:hover svg,
  .yt_btn_fsc:hover svg {
    fill: var(--fc_nav_al2);
  }

  .yt_btn_play:hover svg .stroke,
  .yt_btn_mute:hover svg .stroke,
  .yt_btn_fsc:hover svg .stroke {
    stroke: var(--fc_nav_al2);
  }
}

/* Auf Touch: falls der Browser trotzdem :hover setzt, sofort neutralisieren */
@media (hover: none) {
  .yt_btn_play:hover,
  .yt_btn_mute:hover,
  .yt_btn_fsc:hover {
    /* zurück zum Grundzustand */
    color: var(--c-btn-text);
    background: linear-gradient(180deg, rgba(70, 70, 70, 0.9), rgba(0, 0, 0, 0.9));
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.4);
  }

  .yt_btn_play:hover svg,
  .yt_btn_mute:hover svg,
  .yt_btn_fsc:hover svg {
    fill: var(--c-btn-text);
  }

  .yt_btn_play:hover svg .stroke,
  .yt_btn_mute:hover svg .stroke,
  .yt_btn_fsc:hover svg .stroke {
    stroke: var(--c-btn-text);
  }
}

/* Icon-Toggles */
.yt_btn_play .ic_play {display: block;}
.yt_btn_play .ic_pause {display: none;}
.yt_btn_mute .ic_vol_on {display: block;}
.yt_btn_mute .ic_vol_off {display: none;}
.yt_btn_fsc .ic_fsc_on {display: block;}
.yt_btn_fsc .ic_fsc_off {display: none;}

.yt_time {
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  opacity: 0.9;
  text-align: center;
  font-family: Arial, sans-serif;
  color: var(--c-text);
}

.yt_seek,
.yt_vol {
  width: 100%;
  accent-color: var(--c-accent-control);
  cursor: pointer;
  appearance: none;
  background: var(--c-input-bar);
  height: 4px;
}

/*-----------------*
 *  fullscreen
 *-----------------*/

.yt_wrap.is-fs {
  width: 100vw;
  height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}

.yt_wrap.is-fs .yt_box {
  flex: 1;
  aspect-ratio: auto;
}

.yt_wrap.is-fs .yt_ctrls {
  position: static;
  box-shadow: none;
}

/*----------------------*
 *  responsive
 *----------------------*/

@media (max-width: 600px) {
	
  .yt_ctrls {
  grid-template-columns: auto 75px 1fr auto;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  }
  
  .yt_wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius_yt_box);
  }
  
  .yt_box {box-sizing: border-box;}
  
  .yt_vol,
  .yt_btn_fsc {display: none;}
  
  .yt_btn_play,
  .yt_btn_mute,
  .yt_btn_fsc {
	  appearance: none;
	  border: var(--s-btn-border) solid var(--c-btn-border);
	  border-radius: 6px;
	  padding: 0.35rem 0.6rem;
	}

  .yt_ctrls svg {
  width: 20x;
  height: 20px;
  }

  .yt_consent,
  .yt_consent button {font-size: 0.85rem;}
  .yt_time {font-size: 0.95rem;}
  
}
