@import "./utilities.css";

/** 
##################################################
###################### BASE ######################
##################################################
*/

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html,
body {
  box-sizing: border-box;
  height: 100%;
  width: 100%;
}

body {
  margin: 0;
  font-weight: 400;
  font-family: "Inter";
  line-height: 140%;
}

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

/** 
##################################################
###################### ROOT ######################
##################################################
*/

.root-container {
  min-height: 100dvh;
  max-height: 100dvh;
  min-width: 100dvw;
  max-width: 100dvw;
  display: flex;
  justify-content: center;

  background-color: #f5f5f5;
}

.root {
  min-height: 100dvh;
  max-height: 100dvh;
  width: 480px;

  display: flex;
  flex-direction: column;

  background-color: #fff;
}

/** 
##################################################
##################### HEADER #####################
##################################################
*/

.header-container {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 60px;
  max-height: 60px;
  z-index: 20;

  display: flex;
  align-items: center;

  background-color: #fff;
  border-bottom: 1px solid #d8d8d8;
}

.header {
  padding: 8px 16px;
  width: 100%;
}

header {
  width: 100%;
  height: 100%;
}

.header-logo {
  display: flex;
  img {
    min-height: 28px;
    max-height: 28px;
  }
}

/** 
##################################################
###################### MAIN ######################
##################################################
*/

.main-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-grow: 1;
}

.articles-list-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;

  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.article {
  width: 100%;
  min-height: calc(100dvh - 60px - 80px);
  max-height: calc(100dvh - 60px - 80px);
  display: flex;
  flex-direction: column;

  scroll-snap-align: start;
}

.image {
  position: relative;
  height: fit-content;
  display: flex;
}

.image > img {
  width: 100%;
}

.image > .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  backdrop-filter: blur(4px);
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );
  opacity: 0.4;
}

.image > .heading {
  position: absolute;
  bottom: 0;
  left: 0;
}

.image > .heading > p {
  margin: 0;
  padding: 28px 24px;
  font-size: 24px;
  line-height: 140%;
  font-weight: bold;
  color: #fff;
}

.article-data-container {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;

  color: #fff;
}

.mini-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.tts-button {
  margin-top: 8px;
  height: 40px;
  width: 40px;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
}

.news-body {
  margin: 32px 0 16px 0;
  font-size: 18px;
  line-height: 140%;
}

/** 
##################################################
##################### FOOTER #####################
##################################################
*/

.footer-container {
  position: sticky;
  bottom: 0;
  left: 0;
  width: 100%;
  min-height: 80px;
  max-height: 80px;
  z-index: 20;

  display: flex;
  align-items: center;

  background-color: #fff;
  border-bottom: 1px solid #d8d8d8;
}

.footer {
  padding: 8px 16px;
  width: 100%;
}

footer {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.footer-logo {
  display: flex;
  img {
    min-height: 28px;
    max-height: 28px;
  }
}
