@import url("https://fonts.googleapis.com/css2?family=Kanit&display=swap");

:root {
  --cambridge-blue: rgb(119, 202, 152);
  --celadon: rgb(21, 193, 87);
  --white: rgb(244, 243, 234);
  --night: #161616ff;
  --white-2: rgb(240, 240, 235);
  --light-grey: #392e2e;
  --dark-grey: #202020;
  --mid-grey: #2b2b2b;
  --shadow-grey: rgba(0, 0, 0, 0.1);
  --black: #000;
}

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Kanit", sans-serif;
  font-weight: 400;
  font-style: normal;
  background-color: var(--black);
  background: linear-gradient(45deg, var(--mid-grey), #000000 75%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  justify-content: space-between;
}

.row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.custom-bg-color {
  background-color: var(--mid-grey) !important;
}

.navbar {
  background-color: var(--light-grey);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.navbar .navbar-brand,
.navbar .nav-link {
  color: var(--white) !important;
  font-size: 1.5em;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--celadon) !important;
}

.dropdown-menu {
  background-color: var(--mid-grey) !important;
  border: none;
}

.dropdown-item {
  color: var(--white);
  background-color: var(--mid-grey) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--celadon);
  background-color: var(--white);
}

.navbar-toggler {
  border-color: var(--white);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgb(224,213,213)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.custom-nav-width {
  width: 100%;
}

#main-content {
  width: 35vw;
  height: 35vw;
  margin-inline: auto;
  margin-top: 200px;
}

#top-content {
  margin-top: 8%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-grow: 1;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--dark-grey);
  color: var(--white);
  border: none;
  text-align: center;
  height: 100%;
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--white);
  background: linear-gradient(45deg, var(--cambridge-blue) -20%, #202020 50%);
  color: white;
}

.card-title {
  font-size: 1.25rem;
  margin-top: 10px;
}

.card-text {
  font-size: 1rem;
  color: var(--white);
}

.card-img-top {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.review-section,
footer {
  width: 100%;
  background-color: var(--black);
  color: var(--white);
  padding: 10px 20px;
  margin-top: auto;
}

footer {
  margin: 0;
  padding: 10px 20px;
}

.hidden {
  display: none !important;
}

.modal-title {
  color: var(--black);
}

#feedbackForm {
  width: 100%;
  height: 500px;
  color: black;
}

#garage-editor,
#garage-editor-admin {
  position: relative;
  width: 90%;
  height: 800px;
  background-color: var(--mid-grey);
  border: 1px solid var(--white);
  border-radius: 13px;
  margin-bottom: 3%;
  padding: 10px;
}

#garage-editor {
  margin-top: 10%;
}

#garage-editor-admin {
  margin-top: 10%;
  margin-bottom: 10%;
  width: 50%;
  max-height: 650px;
  z-index: -1;
}

#garage-editor-container {
  margin: 0 auto;
  margin-top: 5%;
  margin-bottom: 5%;
  left: 50%;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  min-height: calc(100vh - 10%);
}

#main-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 7%;
  padding-bottom: 5%;
  height: calc(100vh - 140px);
}

#garage-list-admin {
  width: 15%;
  max-width: 800px;
  height: 75%;
  background-color: var(--mid-grey);
  color: var(--white);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var (--white);
  border-radius: 13px;
}

#garage-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 50%;
  height: 75%;
  overflow-y: auto;
  padding: 20px;
  border-radius: 13px;
  margin-bottom: 10%;
}

#garage-list-items {
  background-color: var(--night);
  height: 50px;
  border-radius: 7px;
}

#garage-container {
  width: 70%;
  order: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#control-panel {
  width: 20%;
  max-width: 600px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 15px;
  background-color: var(--mid-grey);
  color: var(--white);
  border: 1px solid var(--white);
  border-radius: 13px;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  flex: 0 1 25%;
}

#control-panel button {
  color: var(--night);
  font-size: 1.4rem;
  width: 100%;
  margin-bottom: 10px;
}

#floor-down-btn,
#floor-up-btn {
  background-color: var(--white);
}

#floor-down-btn:hover,
#floor-up-btn:hover {
  background-color: var(--night);
  color: var(--white);
}

#save-garage-btn {
  background-color: var(--cambridge-blue);
  border: none;
}

#save-garage-btn:hover {
  background-color: rgb(59, 204, 117);
  color: var(--white);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#save-garage-btn {
  border-radius: 10px;
}

#save-garage-btn {
  font-size: 1.2rem;
  padding: 10px 20px;
}

#current-floor-info {
  font-size: 1.5rem;
  color: var(--white);
  background-color: var(--dark-grey);
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 15px;
}

#paymentSuccess img {
  width: 30%;
  height: 30%;
  padding: 10px;
  background-color: var(--cambridge-blue);
  border-radius: 50%;
}

#garage-info-container {
  color: white;
  margin-bottom: 20px;
}

#garage-info-container-mobile {
  margin-bottom: 20px;
}

#garage-info-container {
  color: white;
  margin-bottom: 20px;
}

#garage-info-container-mobile {
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .card {
    height: auto;
    padding: 20px;
  }

  .card-title {
    font-size: 1rem;
  }

  .card-text {
    font-size: 0.9rem;
  }

  #garage-editor,
  #garage-editor-admin {
    width: 100%;
    height: fit-content;
    min-height: 400px;
    background-color: var(--mid-grey);
    border: 1px solid var(--white);
    border-radius: 13px;
  }

  #garage-container {
    width: 100%;
    margin-bottom: 2%;
  }

  #garage-editor-container {
    flex-direction: column;
    padding: 0 10px;
    width: 100%;
    min-height: auto;
  }

  #garage-container {
    order: 1;
    width: 100%;
    margin-bottom: 15px;
  }

  #control-panel {
    order: 2;
    width: 100%;
  }

  #control-panel button {
    font-size: 1.2rem;
    padding: 10px;
  }

  #main-container {
    flex-direction: column;
    align-items: stretch;
    height: auto;
  }

  #garage-list,
  #garage-list-admin,
  #garage-container,
  #control-panel {
    width: 100%;
    margin: 0 auto;
  }

  #garage-list-admin {
    margin-top: 20%;
  }

  #current-floor-info {
    font-size: 1.2rem;
    padding: 8px;
  }
}

@media (max-width: 576px) {
  #garage-list,
  #garage-list-admin {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .card {
    padding: 15px;
  }

  #current-floor-info {
    font-size: 1rem;
    padding: 6px;
  }
}