/* src/styles.css */

/* Color Scheme */
:root {
  --primary: #374a53;
  --secondary: #000;
  --secondary-darker: #000;
  --on-secondary: #fff;
  --background: #fff;
  --on-background: #262626;
  --error: #dd2121;
  --on-error: #fff;
  --error-darker: #c2543b;
  --success: #5dd784;
  --warning: #ffc238;
  --black: #000000;
}

/* Ensure html and body take full height */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Apply the gradient background to body */
body {
  font-family: Arial, sans-serif;
  text-align: center;
  color: var(--foreground);
  background-color: var(--black);
  min-height: 100vh;
}

/* Main App Container */
#app {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 0;
  box-sizing: border-box;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  background-color: var(--background);
  padding-top:6vh;
}

#main-content {
  flex: 1;
}

/* Header Styles */
.header {
  padding: 15px 0;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.logo {
  width: 25vh;
  height: auto;
  /* margin-top: -40px; */
}

.app-title {
  font-size: 2em;
  margin: 0;
  line-height: 1;
}

.subtitle {
  font-size: 1.2em;
  margin-top: 10px;
}

/* Product Styles */
.product-image {
  width: 16vh;
  height: auto;
}

.product-title {
  margin-top: 1em;
  font-family: "Kurale", serif;
  font-size: 1.5em;
}

.product-price {
  font-size: 1.1em;
  margin: 20px auto;
}

/* Quantity Control */
.quantity-control {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
  margin-top: 4em;
}

.quantity-control button {
  padding: 0;
  width: 2em;
  height: 2em;
  font-size: 1.5em;
  background-color: var(--secondary);
  color: var(--on-secondary);
}

.quantity-control button:hover {
  background-color: var(--secondary-darker);
}

.quantity-control #quantity {
  margin: 0 20px;
  font-size: 1.5em;
  color: var(--on-background);
}

.order-id,
.total-price,
.success-title,
.success-subtitle {
  font-size: 1.5em;
  color: var(--on-background);
  margin-top: 20px;
  font-family: "Kurale", serif;
}

.total-price {
  margin-bottom: 30px;
}

/* Buy Now Button */
#buyButton {
  background-color: var(--secondary);
  color: var(--on-secondary);
  font-family: Kurale, serif;
  margin-top: 1em;
  padding: 0.4em 1.2em;
  font-size: 1.5em;
}

#buyButton:hover {
  background-color: var(--secondary-darker);
}

/* QR Code */
#qrCode {
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

/* Cancel Button */
#cancelButton {
  background-color: var(--error);
  color: var(--on-error);
  padding: 10px 20px;
  font-size: 1em;
  margin: 20px auto 0 auto;
  display: inline-block;
  font-family: "Kurale", serif;
}

#cancelButton:hover {
  background-color: var(--error-darker);
}

/* Success Message Container */
#successContainer {
  text-align: center;
  margin-top: 20px;
}

.checkmark-image {
  width: 25vh;
  height: auto;
  margin-bottom: 20px;
}

/* Done Button */
#doneButton {
  background-color: var(--secondary);
  color: var(--on-secondary);
  padding: 10px 20px;
  font-size: 1em;
}

#doneButton:hover {
  background-color: var(--secondary-darker);
}

/* Footer Styles */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  background-color: var(--background);
  padding: 10px 0;
}

.footer-logos {
  display: flex;
  justify-content: space-around;
  width: 100%;
}

.meridian-x-beans-logo {
  width: 250px;
  opacity: 50%;
  display: block;
  margin: 0 auto;
}

/* Common Button Styles */
button {
  font-family: inherit;
  cursor: pointer;
  border-radius: 2px;
  border: none;
}

button:focus {
  outline: none;
}

button:active {
  transform: scale(0.98);
}

.custom-divider {
  border: none;
  height: 1px;
  width: 300px;
  background: linear-gradient(to right, transparent, #666, transparent);
  margin: 0 auto;
}

.product-description {
  font-family: "Kurale", serif;
  width: 60%;
  margin: -10px auto;
  font-size: 1.15em;
}

/* Media Queries for Responsiveness */
@media (max-width: 389px) {
  .logo {
    width: 40vw;
    /* margin-bottom: 0.7em; */
  }

  .quantity-control {
    margin: 1.5rem 0;
  }

  .custom-divider {
    width: 65vw;
  }

  .product-title {
    font-size: 1.2em;
  }

  .order-id,
  .total-price,
  .success-title,
  .success-subtitle {
    font-size: 1.2em;
  }

  .product-description {
    width: 90%;
    font-size: 1em;
  }

  /* .quantity-control button {
    width: 9vw;
    height: 9vw;
    font-size: 1em;
  } */

  #buyButton {
    margin-top: 1em;
    font-size: 1.1em;
  }

  .meridian-x-beans-logo {
    width: 50vw;
  }

  #qrCode {
    width: 26vh;
    height: 26vh;
  }

  .app-title {
    font-size: 1.5em;
  }

  .subtitle {
    font-size: 1em;
  }

  .success-title {
    font-size: 1.5em;
  }

  .success-subtitle {
    font-size: 1em;
  }
}

@media (min-width: 390px) and (max-width: 767px) {
  .logo {
    width: 30vw;
    /* margin-bottom: 0.7em; */
  }

  .quantity-control {
    margin-top: 3em;
  }

  .custom-divider {
    width: 65vw;
  }

  .product-title {
    font-size: 1.5em;
  }

  .order-id,
  .total-price,
  .success-title,
  .success-subtitle {
    font-size: 1.5em;
  }

  .product-description {
    width: 80%;
    font-size: 1.2em;
  }

  /* .quantity-control button {
    width: 8vw;
    height: 8vw;
    font-size: 1.25em;
  } */

  #buyButton {
    margin-top: 1em;
    font-size: 1.25em;
  }

  .meridian-x-beans-logo {
    width: 50vw;
  }

  #qrCode {
    width: 30vh;
    height: 30vh;
  }

  .app-title {
    font-size: 1.5em;
  }

  .subtitle {
    font-size: 1em;
  }

  .success-title {
    font-size: 1.5em;
  }

  .success-subtitle {
    font-size: 1em;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .product {
    padding: 15px;
  }

  .product-description {
    width: 60%;
    font-size: 1.15em;
  }

  .app-title,
  .success-title {
    font-size: 1.5em;
  }

  .subtitle,
  .success-subtitle {
    font-size: 1em;
  }
}

@media (max-height: 576px) {
  .quantity-control {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .order-id,
  .total-price,
  .success-title,
  .success-subtitle {
    margin: 10px 0;
  }

  .total-price {
    margin: 10px 0;
  }

  .product-title {
    margin: 15px 0;
  }

  /* .quantity-control button {
    width: 1.5em;
    height: 1.5em;
  } */

  #successContainer {
    margin-top: 0;
  }

}


@media (max-height: 510px) {
  body {
    overflow: auto;
  }

  #app{
    padding-bottom: 120px;
  }
}
