/* CSS file containing formatting used in all webpages, e.g. colors, headers, footers... */ 

/* fonts */
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz@12..96&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");

/* global variables */
:root {
  /* colors */
  --color-header: #f1ddd9;
  --color-header-text: #080a45;

  --color-footer: #080a45;
  --color-footer-text: white;

  --color-background: white; 
  ----color-section-heading-background: white;
  --color-primary-backround: #f1ddd9;
  --color-secondary-background: #f8eeec; 

  --color-button: #080a45;
  --color-hover: #222684;
  --color-border: #222684;

  --color-form-background: #f1ddd9;
  --color-form-error: #d97474;
  --color-form-empty: white;
  --color-timer: #d97474;

  --color-item-background: hsl(150, 2%, 96%);
  --color-shadows: rgba(0, 0, 0, 0.2);

  --color-border-fieldset: #ccc;

  --color-section-heading: #222684;
  --color-primary-text: hsla(150, 2%, 22%, 1);
  --color-secondary-text:  white;

  --color-arrow: #222684;

  --color-notification: #f8eeec;

  --color-icon: #080a45;
  --color-camera-icon: #202257;

  /* size of the screen */
  --size-minheight: 100vh;
  --size-minwidth: 100vw;
  --size-maincontent-minheight: calc(
    var(--size-minheight) - 2 * var(--size-header-footer)
  );

  /* 1 rem */
  --size-font-size: 16px;
  /*--size-font-size: clamp(16px, 0.7vw, 25px);*/

  /* sizing */
  --size-header-footer: 10vh;
  --size-header-footer-padding: 2rem;

  /* fonts */
  --font-heading: "Bricolage Grotesque";
  --font-primary: Inter;
  --font-secondary: Roboto;
}

/* common to all pages */
html {
  overflow: auto;
  font-size: var(--size-font-size);
}

body {
  width: 100%;
  min-width: var(--size-minwidth);
  min-height: var(--size-minheight);
  font-family: var(--font-primary);
}

.clickable-video {
  cursor: pointer;
}

.landscape-warning {
  display: none;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* header */
.header {
  background-color: var(--color-header);
  width: 100%;
  min-height: var(--size-header-footer);
  height: auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding-right: var(--size-header-footer-padding);
  padding-left: var(--size-header-footer-padding);
}

.header__right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-header-text);
  font-family: var(--font-secondary);
}
.header__right a {
  text-decoration: none;
  color: inherit;
}

.header__left {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: space-between;
  color: var(--color-header-text);
  font-family: var(--font-secondary);
}

.header__logo {
  width: 8rem;
}

.header__school-name {
  font-size: 0.5rem;
  margin-bottom: 0.5rem;
}

/* footer */
.footer {
  background-color: var(--color-footer);
  width: 100%;
  min-height: var(--size-header-footer);
  padding-right: var(--size-header-footer-padding);
  padding-left: var(--size-header-footer-padding);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.footer__text {
  color: var(--color-footer-text);
  font-family: var(--font-secondary);
  font-size: 0.625rem;
}

.footer__text a {
  color: inherit;
  text-decoration: none;
}

/* language switcher */
.language-switcher {
  position: relative;
  font-size: 1rem;
  display: inline-block;
}

.language-switcher:hover {
  box-shadow: 0 0.25rem 0.938rem var(--color-shadows);
  border-radius: 0.625rem 0.625rem 0 0;
}

.language-switcher:hover .language-dropdown {
  display: block;
  cursor: pointer;
}

.language-button {
  background-color: var(--color-header);
  border: 0.063rem solid var(--color-header);
  color: var(--color-header-text);
  padding: 0.625rem;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.313rem;
  border-radius: 0.625rem 0.625rem 0 0;
}

.language-button img {
  width: 0.75rem;
  height: 0.75rem;
  transition: transform 0.8s ease;
}

.language-button:hover img {
  transform: rotate(180deg);
}

.language-dropdown {
  display: none;
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 0;
  min-width: 100%;
  background-color: var(--color-header);
  border: 0.063rem solid var(--color-header);
  color: var(--color-header-text);
  box-shadow: 0 0.25rem 0.938rem var(--color-shadows);
  border-radius: 0 0 0.625rem 0.625rem;
}

.language-dropdown a {
  display: block;
  padding: 0.55rem;
  text-decoration: none;
  color: var(--color-header-text);
  text-align: left;
}

.language-dropdown a:hover {
  color: var(--color-hover);
}

/* navigation */

.navigation {
  font-size: 1rem;
  display: inline-block;
  background-color: var(--color-header);
  border: 0.063rem solid var(--color-header);
  align-items: center;
  cursor: pointer;
  display: flex;
  max-height: var(--size-header-footer); /* Ensures correct height */
}

.burger-menu {
  width: 1.875rem; /* adjust width */
  cursor: pointer;
  margin: calc(
    (var(--size-header-footer) - (0.188rem * 3) - (0.313rem * 4)) / 2
  );
}

.burger-menu__line {
  height: 0.188rem;
  background-color: var(--color-header-text);
  margin-top: 0.313rem;
  margin-bottom: 0.313rem;
  border-radius: 0.625rem;
  transition: all 0.3s ease;
}

.navigation:hover .burger-menu__line {
  background-color: var(--color-hover);
  transform: translateZ(0.313rem);
  box-shadow: 0 0.25rem 0.5rem var(--color-shadows);
}

.navigation-dropdown {
  display: none;
  position: absolute;
  z-index: 1;
  right: 0;
  top: var(--size-header-footer);
  background-color: var(--color-header);
  border: 0.063rem solid var(--color-header);
  color: var(--color-header-text);
  box-shadow: 0 0.25rem 0.938rem var(--color-shadows);
  border-radius: 0 0 0.625rem 0.625rem;
}

.navigation:hover .navigation-dropdown,
.navigation .navigation-dropdown:hover {
  display: block;
  cursor: pointer;
}

.navigation-dropdown a {
  display: block;
  padding: 0.3rem;
  text-decoration: none;
  color: var(--color-header-text);
  text-align: right;
}

.navigation-dropdown a:hover {
  color: var(--color-hover);
}

/* main class and sections */

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: var(--size-maincontent-minheight);
  background-color: var(--color-background);
}

.colored-section {
  background-color: var(--color-section-heading-background);
  padding: 1.875rem 0;
  width: 100%;
}

.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1rem 1.875rem 1.875rem 1.875rem;
  width: 75%;
}

.section-heading {
  color: var(--color-section-heading);
  font-family: var(--font-heading);
  font-size: 2.25rem;
  margin-top: 0.625rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.section-text, .section-text__feedback-heading, .section-text__feedback-text{
  color: var(--color-primary-text);
  font-size: 1rem;
  text-align: center;
  margin-top: 0.625rem;
}

.section-text__feedback-heading {
  font-weight: bold;
}
.section-text__feedback-text {
  width: 75%;
}

.section-text__feedback-text a:link,
.section-text__feedback-text a:visited{
  color: var(--color-primary-text);
  text-decoration: underline;
}

.section-text__feedback-text a:hover{
  text-decoration-color: var(--color-hover);
}


/* General buttons */
.buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
  margin: 0.625rem;
  flex-wrap: wrap;
}

.button {
  display: flex;
  align-items: center; 
  justify-content: center; 
  font-size: 0.875rem;
  color: var(--color-secondary-text);
  background-color: var(--color-button);
  padding: 0.625rem;
  margin: 0.313rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  
  min-height: 3rem;
  width: 9rem;
  height: auto;
  white-space: normal;
  overflow-wrap: anywhere;
}

.button.video-collapsible {
  justify-content: left;
  min-height: 3rem;
}



.button:hover, .wide-button:hover {
  background-color: var(--color-hover);
}

.button:disabled {
  background-color: var(--color-hover);
  cursor: not-allowed;
}

input[type="file"] {
  display: none;
}


/* front page and transcription button*/
.wide-button {
  display: flex;
  align-items: center; 
  justify-content: center; 
  font-size: 0.875rem;
  color: var(--color-secondary-text);
  background-color: var(--color-button);
  padding: 0.625rem;
  margin: 0.313rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  min-height: 3rem;
  width: 12rem;
  height: auto;
}

/* General forms */

.form {
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: var(--color-primary-backround);
  border-radius: 0.313rem;
  margin-bottom: 1.875rem;
  padding: 1.875rem;
}

.form__fieldset {
  border: none;
  display: flex;
  justify-content: space-between;
}

.table__label,
.form__fieldset label {
  padding: 0.5rem 1rem;
  margin: 0.25rem 0;
  font-size: 0.875rem;
}

.table__label a:link,
.table__label a:visited{
  color: var(--color-primary-text);
  text-decoration: underline;
}

.table__label a:hover{
  text-decoration-color: var(--color-hover);
}

.table__label-heading {
  font-weight: bold;
  padding: 0.5rem 1rem;
  margin: 0.25rem 0;
  font-size: 0.875rem;
}

.form__fieldset fieldset {
  width: 50%;
  border: none;
  padding: 0.5rem 1rem;
}

.table__value,
input[type="text"],
select {
  font-size: 0.75rem;
  width: 50%;
  padding: 0.5rem 1rem;
  margin: 0.25rem 0;
  border: 0.063rem solid var(--color-border-fieldset);
  border-radius: 0.25rem;
  font-family: var(--font-primary);
}

select {
  appearance: none; /* standard */
  -webkit-appearance: none; /* Safari / iOS */
  -moz-appearance: none;
}

.form__fieldset-text {
  font-size: 0.75rem;
  width: 50%;
  padding: 0.5rem 1rem;
  margin: 0.25rem 0;
  border-radius: 0.25rem;
}

.form__fieldset-text a {
  color: var(--color-primary-text);
  text-decoration: none;
}
.form__fieldset-text a:hover {
  color: var(--color-hover);
}

.form__fieldset-text img {
  width: 0.7rem; 
  height: 0.7rem; /
}

input[type="text"] {
  background-color: white;
  color: var(--color-primary-text);
}

input[type="text"]:disabled {
  background-color: var(--color-secondary-background);
  color: var(--color-primary-text);
}

input[type="text"]::placeholder {
  color: var(--color-primary-text);
  opacity: 1;
}

.form__fieldset-select {
  background-color: white;
  color: var(--color-primary-text);
}

.form__fieldset-select:disabled {
  background-color: var(--color-secondary-background) !important;
  color: var(--color-primary-text) !important;
  opacity: 1;
}

input[type="save"] {
  text-align: center;
  margin-top: 0.625rem;
}

textarea {
  font-family: var(--font-primary);
}

textarea:focus {
  outline: none; 
}

textarea::placeholder {
  font-style: italic;
  color: var(--color-shadows);
}

#radio_buttons_id {
  padding: 0;
}

#radio_buttons_id label {
  padding-left: 0.5rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  gap: 0.5rem;
}

#radio_buttons_id input[type="radio"] {
  cursor: pointer;
}


/* Search  */
.search_results {
  margin-top: 1rem;
  width: 100%;
}

.search-container__form-and-video {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  background-color: var(--color-primary-backround);
  border-radius: 0.313rem;
  padding: 1.875rem;
}

.search__form {
  display: flex;
  flex-direction: column;
  width: 90%;
}

.view__form {
  width: 50%;
  margin: 0rem;
}
.view__form label {
  width: 75%;
}

 .help__form textarea {
    width: 80%;
  }


/* video elements */

.video-wrapper {
  position: relative;
  width: 20rem;
  height: 15rem;
  border: 0.125rem solid var(--color-border);
  background-color: var(--color-item-background);
  overflow: hidden;
}

.video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#camera-icon {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  filter: drop-shadow(2px 4px 6px var(--color-shadows));
  transition: transform 0.2s ease, filter 0.2s ease;
}

/* make new video */
.section__video-form-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 75%;
}

#new-content__text {
  color: var(--color-primary-text);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 0.313rem;
}

#saved-content {
  display: none;
}

.saved-content__video {
  width: 38rem;
  border: 0.125rem solid var(--color-border);
  background-color: var(--color-item-background);
}

/* my videos */

.video-collapsible {
  cursor: pointer;
  padding: 1.125rem;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 0.875rem;
}

.form__my-videos {
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: var(--color-primary-backround);
  border-radius: 0.313rem;
  padding: 1.875rem;
}

.buttons__my-videos {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}


.thesis-container {
  display: none;
  flex-direction: column;
  width: 100%;
}


.thesis-container__form-and-video {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.thesis-container__form-and-video > form {
  width: 75%;
}

.thesis-container__video-and-ppt {
  display: flex;
  flex-direction: column;
  width: 50%;
  align-items: center;
  justify-content: space-between;
  /*margin-bottom: 1.875rem;*/
  padding-left: 0.75rem;
  font-family: var(--font-primary);
}

.thesis-container__video-and-ppt-item {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 49%;
  border: 0.125rem solid var(--color-border);
  background-color: var(--color-item-background);
  overflow: hidden;
}

.thesis-container__video-and-ppt-item img,
video {
  width: 100%;
  height: 100%;
}

button[id^="delete_ppt_"], #delete_thesis {
  padding: 0;
  margin: 0;
  position: absolute;
  bottom: 0.2rem;
  right: 0.2rem;
  border: none;
}

#delete-icon {
  position: absolute;
  bottom: 0.2rem;
  right: 0.2rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  fill: var(--color-icon);
  cursor: pointer;
  background-color: white;
  border-radius: 50%;
}

#delete-icon:hover {
  transform: scale(1.1);
  fill: var(--color-hover)
}


/* slider on the edit own view page */

.slider-container {
  display: flex;
  flex-direction: column;
  width: 45%;
  align-items: center;
}

.slider-container__item {
  display: flex;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0.125rem solid var(--color-border);
  background-color: var(--color-item-background);
  overflow: visible;
  margin-bottom: 1rem;
  position: relative;
}

.slider-container__item video,
img {
  width: 100%;
  height: 100%;
}

.slider-container__item-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-border);
  color: var(--color-arrow);
  border: none;
  width: 3.125rem;
  height: 3.125rem;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 50%;
  transition: 0.3s;
  outline: 1px solid black;
  /* CHECK OUTLINE*/
}

#arrow_left {
  left: -3.7rem;
  padding-right: 0.3rem;
}

#arrow_right {
  right: -3.7rem;
  padding-left: 0.3rem;
}

.slider-container__item-arrow_empty {
  display: none;
}

.slider-container__item-arrow:hover {
  background: var(--color-hover);
  transform: translateY(-50%) scale(1.1);
}

.radio-buttons {
  justify-content: space-between;
  display: flex;
  width: 75%;
  gap: 1rem;
  align-items: center;
  color: var(--color-primary-text);
  font-size: 1rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.radio-buttons label {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* Spaces the radio button from the text */
  cursor: pointer; /* Improves usability */
}

/* Settings page */
.section__settings {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.875rem;
  width: 60%;
}

th {
  text-align: left;
  padding: 0.188rem;
}

td {
  padding: 0.188rem;
}

.link a {
  font-size: 0.875rem;
  color: var(--color-primary-text);
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.link a:hover {
  color: var(--color-secondary-text);
}

/* different view options for slides and videos */
.section__view {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1rem 1.875rem 1.875rem 1.875rem;
  width: 90%;
}

.view-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  align-items: center;
  justify-content: space-around;
}

.view__slides-wrapper {
  position: relative; 
  display: inline-block; 
}

#fullscreenBtn {
  position: absolute;
  bottom: 0rem;
  left: 0rem;
  margin: 0.75rem;
  padding: 0.5rem; 
  border-radius: 50%;  
  transition: background 0.2s ease;
  border: none;
  background: transparent;  
  cursor:pointer;
  width: 3rem;
  height: 3rem;
}

#fullscreenBtn svg{
  width: 1.5em; 
  height: 1.5rem;
  fill: var(--color-primary-text);
  pointer-events: none;
}

#fullscreenBtn:hover {
  background: var(--color-hover);
}

#fullscreenBtn:hover svg path {
  fill: var(--color-secondary-text);
}

.view__equal_video-and-slides {
  display: flex;
  justify-content: center;
  width: 40rem;
  aspect-ratio: 16 / 9;
  border: 0.125rem solid var(--color-border);
  background-color: var(--color-item-background);
}

.view__only_video {
  display: flex;
  justify-content: center;
  /*
  CHECK: tätä pitää testata eri kameroilla kun ottaa videon, miltä näyttää
  aspect-ratio: 16 / 9;
	*/
  width: 38rem;
  border: 0.125rem solid var(--color-border);
  background-color: var(--color-item-background);
}

.view__large-item {
  display: flex;
  justify-content: center;
  width: 51rem;
  aspect-ratio: 16 / 9;
  border: 0.125rem solid var(--color-border);
  background-color: var(--color-item-background);
}

.view__small-item {
  display: flex;
  justify-content: center;
  width: 29rem;
  aspect-ratio: 16 / 9;
  border: 0.125rem solid var(--color-border);
  background-color: var(--color-item-background);
}

/* notifications for users */

#notification {
  display: none;
  z-index: 1000;
  position: fixed;
  top: 2.5rem;
  left: 30%;
  width: 40%;
  padding: 0.938rem 0.625rem 0.938rem 3.125rem;
  box-shadow: 0.25rem 0.25rem 0.25rem 0 var(--color-shadows);
  border: 0.125rem solid var(--color-border);
  color: var(--color-primary-text);
  background-color: var(--color-notification);
}

#notification::before {
  content: "";
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
}

#notification.error,
#notification.success,
#notification.warning {
  display: block;
}

#notification.error::before {
  mask-image: url("/images/error.svg");
  -webkit-mask-image: url("/images/error.svg");
  background-color: var(--color-icon);
}

#notification.success::before {
  mask-image: url("/images/.svg");
  -webkit-mask-image: url("/images/success.svg");
  background-color: var(--color-icon);
}

#notification.warning::before {
  mask-image: url("/images/warning.svg");
  -webkit-mask-image: url("/images/warning.svg");
  background-color: var(--color-icon);
}

/* CHECK THESE */

#errorMsg {
  color: var(--color-primary-text);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 0.313rem;
}

#download {
}

.landscape-warning {
  display: none;
  position: fixed; /* Ensures it stays in place while scrolling */
  top: 50%; /* Centers the div vertically */
  left: 50%; /* Centers the div horizontally */
  transform: translate(-50%, -50%); /* Adjusts position to truly center it */
  width: 80vw; /* 80% of the viewport width */
  height: 80vh; /* 80% of the viewport height */
  background-color: rgba(
    255,
    255,
    255,
    0.9
  ); /* Optional background color with transparency */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); /* Optional shadow for a floating effect */
  z-index: 9999; /* Ensures it floats above everything else */
  border: 2px solid #000; /* Optional border for visual clarity */
  display: flex; /* Optional: for centering content inside the div */
  justify-content: center; /* Optional: horizontally center content */
  align-items: center; /* Optional: vertically center content */
  border-radius: 20px; /* Optional rounded corners */
}


/* Error pages */
.error-container {
  width: 100%;
  display: flex;
  overflow: auto;
  min-height: 100vh;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

.error-container__text1 {
  font-family: var(--font-secondary);
}

.error-container__heading {
  display: flex;
  position: relative;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  color: rgb(38, 38, 38);
  font-size: 252px;
  margin-top: -20px;
  font-weight: 900;
  margin-bottom: -20px;
  letter-spacing: -30px;
  font-family: var(--font-heading);
}
.error-container__text2{
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  width: 421px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  font-weight: 400;
}

.error-container__text3{
  font-family: var(--font-secondary);
  font-size: 1rem;
  width: 421px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  font-weight: 400;
  margin-top: 3rem;

  text-decoration: none; 
  color: var(--color-primary-text);
}

/* Multiple authors */ 


/* Transcriptions */

.editable:focus,
.editable:focus-visible {
  outline: 2px solid var(--color-border);    
  box-shadow: 0 0 0 4px var((--color-shadows)); 
}

.editable:active {
  outline: 2px solid var(--color-border);
}