/* Mobile first CSS Design */

:root {
  /* Base colors */
  --clr-white: #FFFFFF;
  --clr-black: #000000;

  /* Theme colors */
  --clr-dark: #353535;
  --clr-green: green;
  --clr-orange: #FF6B15;
  --clr-light: #ECECEC;

  /* Corners */
  --corner-10: 10px;

  /* Font config */
  --fw-regular: 300;
  --fw-medium: 500;
  --fw-bold: 700;
}

/* Setup */
*,
*::before,
*::after {
  outline: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  padding: 0;
  margin: 0;
  background-color: var(--clr-light);
  font-size: 1rem;
  color: var(--clr-dark);
}

/* loader */
#loader {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #00000055;
  place-items: center;
  z-index: 10000;
}


.pulse-spinner {
  height: 90px;
  width: 90px;
  border-radius: 50%;
  background-color: var(--clr-orange);
}
.pulse-spinner::after {
  content: "";
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: var(--clr-orange);
  z-index: 1;
  position: absolute;
  animation: pulse 1s ease infinite;
}

@keyframes pulse {
  from{
      transform: scale(1);
      opacity: 1;
  }
  to{
      transform: scale(2);
      opacity: 0;
  }
  
}
  

/* Utilities */
.wrapper {
  padding: 2rem;
}

.infoWindow {
  max-width: 25rem;
  margin: 0.2rem;
}

.content {
  background-color: var(--clr-light);
  /* height: 100vh !important; */
}

.aligner {
  display: flex;
  flex-direction: column;
  min-height: 65vh;
  align-items: center;
  justify-content: center;
}

.aligner__item {
  max-width: 100%;
}

.aligner__item--top {
  align-self: flex-start;
}

.aligner__item--bottom {
  align-self: flex-end;
}

/* Buttons */
.btn {
  font-family: 'Roboto', sans-serif;
  display: inline-block;
  background-color: var(--clr-orange);
  color: var(--clr-white);
  border: none;
  border-radius: var(--corner-10);
  padding: 1rem 2rem;
  text-align: center;
  text-decoration: none;
  margin: 1rem 0.6rem 0 0;
  transition: 0.2s;
}

.btn:hover {
  opacity: 0.75;
}

.btn--edit {
  background-color: lightblue;
  padding: 1rem;
}

.btn--delete {
  background-color: lightcoral;
  padding: 1rem;
}

.btn--add {
  background-color: var(--clr-green);
}

.cms-home-btn {
  text-decoration: none;
  color: var(--clr-dark);
}

/* Inputs */
input {
  font-family: 'Roboto', sans-serif;
  background-color: var(--clr-light);
  border: 3px solid var(--clr-light);
  border-radius: var(--corner-10);
  width: 100%;
  padding: 1rem 1rem; 
  margin: 0.6rem 0;
  transition: 0.2s;
}

input:focus {
  border: 3px solid var(--clr-orange);
}
  /* Photo's input style */
  #input-photo-field {
    display: inline-block;
    margin: 10px 10px 0 0;
    font-family: 'Roboto', sans-serif;
    background-color: #ECECEC;;
    border: 10px dashed #ECECEC;;
    border-radius: var(--corner-10);
    width: 100%;
    padding: 1rem 1rem; 
    margin: 0.6rem 0;
    transition: 0.2s;
}
.photo-preview {
    max-height: 120px;
    border-radius: var(--corner-10);
    padding: 1px;
    cursor: pointer;
    position: relative;
    left: 50%;
    transform: translate(-50%);

}
.photo-preview-wrapper {
    display: inline-block;
    margin: 10px 10px 0 0;
}
.remove-photo-preview {
    display: block;
    font-family: 'Roboto', sans-serif;
    height: 30px;
    width: 100px;
    background: var(--clr-white);
    border: 1px solid var(--clr-black);
    text-align: center;
    cursor: pointer;
    position: relative;
    border-radius: 5px;
    left: 50%;
    transform: translate(-50%);
}

/* Login */
.login {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* sidebar menu */
.sidebar {
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: var(--clr-white);
  transition: 0.2s;
  overflow: auto;
  width: 100%;
  height: auto;
  position: relative;
}

.sidebar a {
  display: block;
  color: var(--clr-dark);
  padding: 1rem 2rem;
  text-decoration: none;
  float: none;
  transition: 0.3s;
}

.sidebar a.active {
  background-color: var(--clr-orange);
  color: var(--clr-white);
  box-shadow: 0 3px 10px #ff9151;;
  border-radius: var(--corner-10);
}

.sidebar a:not(.active) {display: none;}
.sidebar a.icon {
  float: right;
  display: block;
  position: absolute;
  right: 0;
  top: 0;
}

.content * {
  margin: 1rem 0 1rem;
}

.sidebar.mobile {
  position: relative;
}

.sidebar.mobile .icon {
  position: absolute;
  right: 0;
  top: 0;
}

.sidebar.mobile a {
  float: none;
  display: block;
  text-align: left;
}


/* Tables */

.table-wrapper {
  overflow-x: auto;
  background-color: var(--clr-dark);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  border-radius: var(--corner-10);
  margin-bottom: 3rem;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

.table-center th, .table-center td {
  text-align: center;
}

th {
  background-color: var(--clr-dark);
  color: var(--clr-light);
}

th, td {
  text-align: left;
  padding: 1.2rem;
}

tr:nth-child(odd) {
  background-color: var(--clr-light);
}

tr:nth-child(even) {
  background-color: var(--clr-white);
}


/* Map */
#map {
  height: 100vh;
  width: 100%;
}

/* Submitbox */
/* The Modal (background) */
#submitbox {
  display: none;
  position: fixed;
  z-index: 1;
  padding-top: 6%;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: var(--clr-black); /* Fallback color */
  background-color: rgba(0,0,0,0.4);
}

/* Modal Content */
.submitbox__content {
  background-color: var(--clr-white);
  margin: auto;
  padding: 1.5rem;
  border-radius: var(--corner-10);
  max-width: 85%;
}

/* Close Button */
#submitbox__close {
  color: var(--clr-orange);
  float: right;
  font-size: 28px;
  font-weight: var(--fw-bold);
}

#submitbox__close:hover,
#submitbox__close:focus {
  color: var(--clr-black);
  text-decoration: none;
  cursor: pointer;
}


/* Image slider */
#carousel {
  margin-top: .5rem;
  display: flex;
  overflow-x: auto;
  flex-direction: row;
}

/* Style the Image Used to Trigger the lightbox */
.lightbox__img {
  margin-right: 0.5rem;
  max-height: 100px;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

.lightbox__img:hover {
  opacity: 0.7;
}

/* The lightbox (background) */
.lightbox__bg {
  display: none;
  position: fixed;
  z-index: 1;
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* Enable scroll if needed */
  background-color: var(--clr-black); /* Fallback color */
  background-color: rgba(0,0,0,0.9);
}

/* Modal Content (Image) */
.lightbox__content {
  margin: auto;
  display: block;
  max-height: 500px;
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {transform:scale(0)}
  to {transform:scale(1)}
}

/* The Close Button */
.lightbox__close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: var(--clr-white);
  font-size: 40px;
  font-weight: var(--fw-bold);
  transition: 0.3s;
}

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

/* ========================================================= */
/* 100% Image Width on Smaller Screens */
@media screen and (max-width: 700px){
  .lightbox__content {
    width: 100%;
  }
}

@media screen and (min-width: 1132px) {

  .wrapper {
    padding: 3rem;
  }

  .sidebar {
    width: 20%;
    background-color: var(--clr-white);
    position: fixed;
    height: 100%;
    overflow: auto;
  }

  .sidebar a {
    display: block;
    padding: 1rem 3rem;
    text-decoration: none;
  }
  
  .sidebar a:hover:not(.active) {
    opacity: 0.75 ;
    background-color: var(--clr-orange);
    color: var(--clr-white);
    border-radius: var(--corner-10);
  }

  .sidebar a:not(.active) {display: block;}
  .sidebar a:not(:nth-child(2)) {display: block;}
  .sidebar a.icon {display: none;}

  .content {
    margin-left: 20%;
    height: 100vh !important;
  }
  
  #map {
    margin-left: 20%;
    width: 80%;
  }

  .submitbox__content {
    background-color: var(--clr-white);
    margin: auto;
    padding: 1.5rem;
    border-radius: var(--corner-10);
    max-width: 40%;
  }
}

