/* ---------------------------------------------------------------
FONT
--------------------------------------------------------------- */
@font-face {
  font-family: "Clash";
  src: url("./design/fonts/ClashDisplay-Variable.ttf") format("truetype");
  font-weight: 200 700;
  font-style: normal;
}

/* ---------------------------------------------------------------
GENERAL
--------------------------------------------------------------- */

/* General variables */
:root {
  /* Colors */
  --darkColor: black;
  --yellowColor: rgb(255, 183, 0);
  --redColor: rgb(210, 43, 65);
  --magentaColor: rgb(220, 0, 235);
  --greenColor: rgb(0, 213, 194);
  --blueColor: rgb(0, 89, 194);
  --greyColor: #cccccc;

  /*Color for event*/
  --eventColor: rgb(0, 213, 194);

  /* Stroke width */
  --borderWidth: 3px;

  /* Font weights */
  --extraLight: 200;
  --light: 300;
  --regular: 400;
  --medium: 500;
  --semiBold: 600;
  --bold: 700;

  /* Measurements */
  --sidebarWidth: 200px;
  --margin: 30px;
}

/* General styling */
* {
  /* Remove default features */
  padding: 0;
  margin: 0;
  border: 0;

  /* Disable text selection */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  /* Other styling */
  font-family: "Clash";
  box-sizing: border-box;

  /* Comment/Uncomment this to see/hide all boxes */
  /* outline: 2px red solid; */
}

/* Remove blue background when autofilling forms */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--dark-green);
  -webkit-box-shadow: 0 0 0px 1000px transparent inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* ---------------------------------------------------------------
SITE STYLING
--------------------------------------------------------------- */
body {
  padding: 40px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOP PART >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> */

header {
  height: 150px;
  display: flex;
  align-items: flex-start;
}

#title {
  min-width: var(--sidebarWidth);
  margin-right: var(--margin);
  font-size: 30px;
}

#monthAndYear {
  flex: 1 1 1000px;
  display: flex;
  margin-right: var(--margin);
  height: inherit;
  transition: 0.5s;
}

#month,
#year {
  font-size: 140px;
  /* display: inline; */
  height: fit-content;
  transform: translateY(-30px);
  transition: 0.4s;
}

#month {
  margin-right: 10px;
}

#year {
  font-weight: var(--extraLight);
}

#newEventBtn {
  font-size: 24px;
  width: 180px;
  padding: 10px 20px 10px 20px;
  background-color: transparent;
  border: var(--borderWidth) solid var(--darkColor);
  border-radius: 6px;
  transition: 0.3s;
  outline: none;
}

#newEventBtn:hover {
  color: whitesmoke;
  background-color: var(--darkColor);
}

/* MAIN PART >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> */

main {
  display: flex;
  flex-grow: 1;
}

/* Left */
#sidebar {
  min-width: var(--sidebarWidth);
  margin-right: var(--margin);
  display: flex;
  /*align-items: flex-end;*/
  flex-direction: column;
  justify-content: space-between;
}

/* Expired and reminders ---------------------------- */
#expiredEventsTitle,
#reminderTitle {
  font-size: 14px;
  color: rgb(210, 43, 65);
  margin-bottom: 6px;
}

/* Expired events ---------------------------- */
#expiredReminders {
  margin-top: 5px;
  padding: 10px 5px 5px 0;
  flex-grow: 1;
  max-width: 200px;
  max-height: 88px;
  border-top: 3px solid rgb(210, 43, 65);
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 14px;
}

#expiredEventsContainer {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-grow: 0.18;
  top: 80px;
  width: 100%;
}

#expiredEvents {
  margin-top: 5px;
  padding: 10px 5px 5px 0;
  flex-grow: 1;
  max-width: 200px;
  border-top: 3px solid rgb(210, 43, 65);
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 14px;
}

.workExpiredEvent {
  color: var(--greenColor);
}

.sportExpiredEvent {
  color: var(--magentaColor);
}

.musicExpiredEvent {
  color: var(--yellowColor);
}

.otherExpiredEvent {
  color: var(--blueColor);
}

.defaultExpiredEvent {
  color: black;
}

/* Reminder ---------------------------- */
#reminderContainer {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-grow: 0.2;
  /* top:0px; */
  visibility: hidden;
  width: 100%;
  max-width: 200px;
}

.workReminder {
  color: var(--greenColor);
}

.sportReminder {
  color: var(--magentaColor);
}

.musicReminder {
  color: var(--yellowColor);
}

.otherReminder {
  color: var(--blueColor);
}

.defaultReminder {
  color: black;
}

/* Checkboxes ---------------------------- */
#eventTypes {
  width: 100%;
}

.checkbox {
  margin-top: 5px;
  display: flex;
  align-items: center;
}

.checkboxLabel {
  font-weight: var(--regular);
  font-size: 20px;
  display: flex;
  align-items: center;
  margin-left: -20px;
}

/* Hide default radio/checkbox button */
.checkboxInput input {
  opacity: 0%;
  width: 0;
  height: 0;
}

.checkboxControl {
  display: block;
  margin-right: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/*Types of events*/
.workLabel,
.sportLabel,
.musicLabel,
.otherLabel {
  margin-left: 0;
}

/* Work */
.workLabel {
  color: var(--greenColor);
}

.workCheckbox {
  border: var(--borderWidth) solid var(--greenColor);
}

.checkboxInput input:checked + .workCheckbox {
  background-color: var(--greenColor);
}

/* Sport */
.sportLabel {
  color: var(--magentaColor);
}

.sportCheckbox {
  border: var(--borderWidth) solid var(--magentaColor);
}

.checkboxInput input:checked + .sportCheckbox {
  background-color: var(--magentaColor);
}

/* Music */
.musicLabel {
  color: var(--yellowColor);
}

.musicCheckbox {
  border: var(--borderWidth) solid var(--yellowColor);
}

.checkboxInput input:checked + .musicCheckbox {
  background-color: var(--yellowColor);
}

/* Other */
.otherLabel {
  color: var(--blueColor);
}

.otherCheckbox {
  border: var(--borderWidth) solid var(--blueColor);
}

.checkboxInput input:checked + .otherCheckbox {
  background-color: var(--blueColor);
}

/* Main right ---------------------------- */
#mainRight {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Navigation buttons */
#monthButtons {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--margin);
}

.navBtn {
  font-size: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: var(--borderWidth) var(--darkColor) solid;
  font-weight: var(--regular);
  background-color: transparent;
  outline: none;
  transition: 0.3s;
}

.navBtn:hover {
  color: whitesmoke;
  background-color: var(--darkColor);
}

/* Day name ---------------------------- */
#weekdaysContainer {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-weight: var(--semiBold);
  font-size: 14px;
  margin-bottom: 10px;
}

.weekdayAbr {
  color: var(--darkColor);
  display: none; /* Hiden abbreviations */
}

/* Calendar container ---------------------------- */
#calendarCont {
  flex-grow: 1;
  max-height: 640px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(5, 1fr);
}

.today .numberDiv {
  background-color: yellow;
  box-shadow: 0 0 20px 20px yellow;
  border-radius: 50%;
}

/* Days divs ---------------------------- */
.dayDiv {
  padding: 15px 10px 15px 0;
  border-top: var(--borderWidth) black solid;
  transition: 0.4s;
  display: flex;
  align-items: flex-start;
  min-width: 14.2857142857%;
  max-height: 100px;
}

.currentMonthDay:hover * {
  font-weight: var(--extraLight);
}

/* Today number */
.today:hover .numberDiv {
  color: var(--darkColor);
}

/* Previous & next month days */
.otherNumberDiv {
  line-height: 30px;
  font-weight: var(--extraLight);
  font-size: 40px;
  text-align: left;
  margin-right: 15px;
}

/* Numbers */
.numberDiv {
  line-height: 30px;
  color: var(--darkColor);
  font-size: 40px;
  text-align: left;
  font-weight: var(--bold);
  width: fit-content;
  margin-right: 15px;
  transition: 0.2s;
}

/* Fixed width */
.otherNumberDiv,
.numberDiv {
  min-width: 55px;
}

/* Events ---------------------------- */
/* Events container */
.eventsDiv {
  flex-grow: 1;
  margin-right: 10px;
  display: flex;
  flex-direction: column;
  overflow: auto;
  min-height: 100%;
  /* Fade out effect */
  -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 90%);
  mask-image: linear-gradient(to bottom, black 30%, transparent 90%);
}

/* All events */
.event {
  min-width: 20px;
  font-size: 14px;
  font-weight: var(--bold);
  margin-bottom: 8px;
  transition: 0.2s;
}

.event:hover {
  font-weight: var(--bold);
}

/* Expired events */
.expiredEvent,
.expiredEvent:hover {
  color: lightgray;
}

/* Type of events */
.workEvent {
  color: var(--greenColor);
}

.workEvent:hover {
  -webkit-background-clip: text;
  -webkit-text-fill-color: var(--greenColor);
}

.sportEvent {
  color: var(--magentaColor);
}

.sportEvent:hover {
  -webkit-background-clip: text;
  -webkit-text-fill-color: var(--magentaColor);
}

.musicEvent {
  color: var(--yellowColor);
}

.musicEvent:hover {
  -webkit-background-clip: text;
  -webkit-text-fill-color: var(--yellowColor);
}

.otherEvent {
  color: var(--blueColor);
}

.otherEvent:hover {
  -webkit-background-clip: text;
  -webkit-text-fill-color: var(--blueColor);
}

/* Title overflow animation  */
.titleContainer {
  width: 100%;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  max-width: 150px;
  /* Fade out effect */
  -webkit-mask-image: linear-gradient(to right, black 55%, transparent 90%);
  mask-image: linear-gradient(to right, black 30%, transparent 90%);
}

.titleContainer:not(:hover) {
  text-overflow: ellipsis;
}

.titleContainer:hover div,
.titleContainer:focus div {
  display: inline-block;
  animation: scroll-text 6s linear 0s infinite normal;
}

.titleContainer:hover {
  /* Fade out effect */
  -webkit-mask-image: linear-gradient(
    to left,
    transparent 0%,
    black 40%,
    black 60%,
    transparent 100%
  );
}

/* FOOTER >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> */
footer {
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Hide mobile checkboxes */
#eventTypesMobile {
  display: none;
}

/* Hide mobile new event button */
#newEventBtnMobile {
  display: none;
}

/* MODALS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> */
/* Background ---------------------------- */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  padding-top: 30px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(255, 255, 255, 0.714); /* Black w/ opacity */
  align-items: center;
}

/* New event modal ---------------------------- */
.modalContent {
  background-color: #fefefe;
  border-radius: 15px;
  margin: auto;
  padding: 20px 40px 60px 40px;
  border: 1px solid #888;
  min-width: 450px;
  width: 20%;
  height: fit-content;
  border: var(--darkColor) solid 4px;
}

/* Closing button */
.close {
  color: #000000;
  float: right;
  font-size: 35px;
  font-weight: normal;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

/* Title */
.eventTitle {
  width: 80%;
  height: 60px;
  font-size: 60px;
  font-weight: var(--semiBold);
  margin: 10px 0px;
  outline: none;
}

.eventTitle::placeholder {
  color: rgba(0, 0, 0, 0.2);
  border: none;
  outline: none;
}

.eventTitle:focus {
  border: none;
  outline: none;
}

.eventTitleFlow {
  width: 90%;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, black 55%, transparent 90%);
  mask-image: linear-gradient(to right, black 30%, transparent 90%);
}

.eventTitleFlow:not(:hover) {
  text-overflow: ellipsis;
}

.eventTitleFlow:hover h2,
.eventTitleFlow:focus h2 {
  display: inline-block;
  animation: scroll-text 6s linear 0s infinite normal;
}

.eventTitleFlow:hover {
  /* Fade out effect */
  -webkit-mask-image: linear-gradient(
    to left,
    transparent 0%,
    black 20%,
    black 80%,
    transparent 100%
  );
}

/* Type of event */
.eventType {
  font-size: 26px;
  font-weight: var(--light);
  margin-bottom: 80px;
  outline: none;
}

.eventTypeOption {
  font-size: 26px;
  font-weight: var(--light);
}

select option:hover {
  background-color: var(--greyColor);
}

/* Titles of subsections */
.eventLabel {
  display: inline-block;
  width: 100%;
  font-size: 26px;
  font-weight: var(--semiBold);
  border-bottom: var(--darkColor) solid var(--borderWidth);
  /* margin-bottom: 10px; */
  transition: 0.1s;
}

/* Modal checkboxes */
.endCheckbox,
.reminderCheckbox,
.descriptionCheckbox {
  border: var(--borderWidth) solid var(--greyColor);
}

.checkboxInput input:checked + .endCheckbox,
.checkboxInput input:checked + .reminderCheckbox,
.checkboxInput input:checked + .descriptionCheckbox {
  background-color: var(--darkColor);
  border: var(--borderWidth) solid var(--darkColor);
}

.checkboxLabel input {
  position: relative;
  z-index: -9999;
}

/* Calendar input date */
.eventDate {
  margin-bottom: 10px;
  font-size: 20px;
  outline: none;
  width: 100%;
}

.checkboxLabel,
.eventLabel,
.eventLabelCheck {
  margin-bottom: 5px;
}

/* End date */
#endDateLabel {
  color: var(--greyColor);
  border-bottom: var(--greyColor) solid var(--borderWidth);
}

/* Reminder */
#reminderLabel {
  color: var(--greyColor);
  border-bottom: var(--greyColor) solid var(--borderWidth);
}

/* Description */
.eventDescriptionLabel {
  margin-bottom: 10px;
}

#descriptionLabel {
  color: var(--greyColor);
  border-bottom: var(--greyColor) solid var(--borderWidth);
}

#eventDescriptionLabelId {
  margin-bottom: 5px;
}

.eventDescription {
  width: 100%;
  height: 140px;
  background-color: rgba(0, 0, 0, 0.05);
  font-size: 20px;
  font-weight: var(--light);
  margin-bottom: 30px;
}

/* Modal buttons */
.btnDiv {
  display: flex;
  justify-content: space-between;
}

.modalBtn {
  width: 49%;
  height: 40px;
  font-size: 20px;
  font-weight: var(--semiBold);
  background-color: white;
  border: var(--darkColor) solid var(--borderWidth);
  transition: 0.3s;
  border-radius: 6px;
  outline: none;
}

#saveNewEvent:hover {
  color: white;
  background-color: var(--darkColor);
}

#cancelNewEvent {
  color: var(--redColor);
  border: var(--redColor) solid var(--borderWidth);
}
#cancelNewEvent:hover {
  color: white;
  background-color: var(--redColor);
}

/* Check event modal ---------------------------- */
#checkEventModal {
  color: var(--eventColor);
}

.modalContentCheck {
  border: var(--eventColor) solid 4px;
}

/* Close button */
.closeCheck {
  color: var(--eventColor);
}

.closeCheck:hover {
  color: var(--eventColor);
}

/* Subsections titles */
.eventLabelCheck {
  border-bottom: var(--eventColor) solid var(--borderWidth);
}

/* Description */
#descriptionEvent {
  height: fit-content;
}

textarea {
  resize: none;
  outline: none;
  padding-top: 10px;
  padding-left: 10px;
}

/* Modal buttons */
#okCheckEventButton {
  color: var(--eventColor);
  border: var(--eventColor) solid var(--borderWidth);
}

#okCheckEventButton:hover {
  color: white;
  background-color: var(--eventColor);
}

#RemoveEventButton {
  color: var(--redColor);
  border: var(--redColor) solid var(--borderWidth);
}

#RemoveEventButton:hover {
  color: white;
  background-color: var(--redColor);
}

#checkEventForm {
  height: fit-content;
}
