/* A global file that will be included in all pages:
   - To reset browser default stylesheet  
   - To set base styling for HTML elements.  
   - To set base styling for footer and header layout.
  */

/* ############## 1. Reset ############# */
/* Note: reset browser default stylesheet */
html {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  font-size: 14px;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  -webkit-box-sizing: inherit;
  -moz-box-sizing: inherit;
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

::-webkit-scrollbar {
  width: 0.5rem;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888888;
}

::-webkit-scrollbar-thumb:hover {
  background: #555555;
}

/* ############## 2. Base  ############# */
/* Note: set base styling for basic HTML elements. */

/* --------- [Variables] ---------- */
:root {
  /* Theme colors */
  --clr-primary: #0066ff;
  --clr-secondary: #ec6f25;
  --clr-shadow-grey: rgba(0, 0, 0, 0.25);
  --clr-font-grey: #7a7a7a;
  --clr-link: #2893f6;
  --clr-delete-red: #fa2230;
  /* Theme font-family */
  --ff-montserrat-title: "montserrat-bold";
  --ff-montserrat-text: "montserrat-medium";
  --ff-montserrat-light: "montserrat-light";
  /* Custom size */
  --layout-header-height: 60px;
}

/* --------- [Fonts] ---------- */
@font-face {
  font-family: "montserrat-bold";
  src: url(../fonts/Montserrat-Bold.ttf);
}

@font-face {
  font-family: "montserrat-medium";
  src: url(../fonts/Montserrat-Medium.ttf);
}

@font-face {
  font-family: "montserrat-light";
  src: url(../fonts/Montserrat-Light.ttf);
}

/* ---------- [Typography] ----------- */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--ff-montserrat-title);
}

span,
a,
p {
  font-family: var(--ff-montserrat-text);
}

a {
  text-decoration: none;
  color: #000000;
}

li {
  font-family: var(--ff-montserrat-text);
  list-style: none;
}

/* ---------- [layout] ----------- */
main,
aside {
  min-height: 90vh;
}

main {
  margin: var(--layout-header-height) auto 0;
}

section {
  padding: 1em;
}

/* ---------- [Table] ----------- */
table {
  border-collapse: collapse;
}

table,
th {
  padding: 1em;
}

th,
tr {
  font-family: var(--ff-montserrat-text);
}

/* ---------- [Form] ----------- */
label,
input,
textarea,
select,
button {
  font-family: var(--ff-montserrat-text);
}

input,
textarea,
select,
button {
  padding: 0.5em 1em;
}

label {
  margin: 0.3rem 0 0;
}

input,
textarea {
  width: fit-content;
  outline: none;
  font-weight: 100;
}

textarea {
  width: 100%;
  padding: 1.5em;
  font-size: 1rem;
  background-color: #f5f5f5;
  border: none;
  border-radius: 0.5em;
  resize: none;
}

select,
button {
  outline: none;
  background-color: #ffffff;
  cursor: pointer;
}

input:-webkit-autofill {
  box-shadow: 0 0 0 2rem #ffffff inset;
}

/* ---------- [Button] ----------- */
button {
  display: block;
  padding: 0.5em 2em;
  border: none;
  border-radius: 0.5em;
  font-weight: 100;
  background-color: var(--clr-primary);
}

button,
button > a {
  color: #ffffff;
}

.btn--red {
  color: var(--clr-delete-red);
  background-color: #ffffff;
  border: 1px solid var(--clr-delete-red);
}

.btn--red:hover {
  color: #ffffff;
  border: 1px solid var(--clr-delete-red);
  background-color: var(--clr-delete-red);
  transition: 0.3s ease-in-out;
}

/* ---------- [Invalid Input] ----------- */
.invalid-input {
  margin-bottom: 0.2rem;
  font-size: 0.88rem;
  color: #f8606a;
}

/* ---------- [Main] ----------- */
.main-sidebar-wrapper {
  display: flex;
  width: 100%;
}

.main-content {
  position: relative;
  top: var(--layout-header-height);
  left: 0;
  width: 100vw;
  margin: 0;
  padding: 3rem 2rem;
  padding-bottom: calc(2rem + 60px);
}

.main-title {
  margin: 0 0 2rem;
}

/* ---------- [Dialog] ----------- */
.dialog {
  width: fit-content;
  padding: 2em 2.5em;
  box-shadow: 0.15rem 0.3rem 0.8rem var(--clr-shadow-grey);
  border-radius: 0.5rem;
  background-color: #ffffff;
}

/* ---------- [Modal] ----------- */
.modal {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  width: fit-content;
  max-width: 90%;
  height: fit-content;
  max-height: 80vh;
  padding: 2em;
  background-color: #ffffff;
  border-radius: 0.5rem;
  border: 2px solid var(--clr-shadow-grey);
  overflow: auto;
}

.modal-overlay {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.363);
  z-index: 2;
}

.modal__close-btn {
  margin-left: auto;
  padding: 0;
  font-size: 1.5rem;
  color: #000000;
  background-color: #ffffff;
}

/* ---------- [Profile image - icon size] ----------- */
.profile-icon {
  max-width: 2rem;
  border-radius: 50%;
}

/* ---------- [Up & Down vote] ----------- */
.fa-arrow-up,
.fa-arrow-down {
  color: var(--clr-font-grey);
  cursor: pointer;
}

/* ############## 3. Media Queries  ############# */
/* Note: Font-size grow as the screen size grow. */

@media (min-width: 520px) {
  html {
    font-size: 15.5px;
  }
}

@media (min-width: 1245px) {
  .main-content {
    left: 14vw;
    width: 85vw;
    padding: 3rem 5rem;
  }
}

.disclaimer {
    display: none;
}