@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --mainColor: #f6f8fa;
  --orange: #df803e;
  --brown: #f7decb;
  --Hijau: #37864d;
  --red: #cc3f32;
}

body {
  background-image: url(/img/bg.png);
}

/* General Navbar Styling */
.custom-navbar {
  background-color: #df803e;
  height: 70px;
  margin: 20px;
  border-radius: 25px;
  padding: 0.5rem;
}

.navbar-logo {
  font-weight: 500;
  color: #ffffff;
  font-size: 24px;
  transition: 0.3s color;
}

.navbar-logo:hover {
  color: #f7decb;
}

.nav-link {
  color: #ffffff !important;
  font-weight: 500 !important;
  position: relative !important;
}

.nav-link:hover,
.nav-link.active {
  color: black;
}

/* Navigation Hover Effects */
@media (min-width: 991px) {
  .nav-link::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: brown;
    visibility: hidden;
    transition: 0.3s ease-in-out;
  }

  .nav-link:hover::before,
  .nav-link:active::before {
    width: 100%;
    visibility: visible;
  }
}

/* Contact Section Styling */
.contact-toggle-button {
  background-color: #37864d !important;
  color: white !important;
  font-size: 14px;
  padding: 8px 20px;
  border-radius: 50px;
  transition: 0.3s background-color;
}

.contact-toggle-button:hover {
  background-color: #f7decb;
  color: #37864d;
}

.contact-section {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background-color: #ffffff;
  color: #37864d;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
  padding: 20px;
  z-index: 1000;
}

#toggle-contact:checked + .contact-toggle-button + .contact-section {
  display: block;
}

.contact-close-button {
  cursor: pointer;
  font-size: 18px;
  color: #aaa;
}

.contact-form-container {
  padding: 20px;
}

.submit-button {
  background-color: #37864d;
  color: white !important;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}
.submit-button:hover {
  background-color: #f7decb;
  color: #37864d;
}

/* Popup Styling */
.popup {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  width: 300px;
}

.popup:target {
  display: block;
}

.close-popup-button {
  display: inline-block;
  text-decoration: none;
  color: #aaa;
  font-size: 20px;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
}

.close-popup-button:hover {
  color: black;
}

.navbar-toggler {
  background-color: #ffffff !important ;
  border: none;
}

.navbar-toggler-icon::before {
  top: -6px;
}

.navbar-toggler-icon::after {
  top: 6px;
}

/* Responsive Positioning for Toggler */
@media (max-width: 992px) {
  .navbar-toggler {
    position: absolute;
    right: 10px;
    top: 15px;
  }

  .contact-toggle-button {
    margin-right: 50px; /* Adjust spacing to place toggler beside contact section */
  }
}

.navbar-toggler.collapsed .navbar-toggler-icon {
  background-color: transparent;
}

.navbar-toggler.collapsed .navbar-toggler-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.navbar-toggler.collapsed .navbar-toggler-icon::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* Custom Offcanvas */
.offcanvas-header {
  border-bottom: 1px solid #ffffff !important;
}

.offcanvas-body {
  align-items: center;
  height: 100%;
  padding-top: 20px;
}

.offcanvas-body .navbar-nav {
  width: 100%;
  text-align: center;
}

.offcanvas-body .nav-item {
  margin: 10px 0;
}
.offcanvas {
  background-color: #37864d !important;
  color: white !important;
}
.offcanvas .nav-link:hover {
  background-color: #f39c12;
  transform: scale(1.05);
}

.offcanvas .nav-link:focus {
  outline: none;
  box-shadow: 0 0 0 2px #f39c12;
}

.button-container {
  display: flex;
  gap: 20px; /* Space between buttons */
  margin-top: 100px; /* Adjusted to be below navbar */
  justify-content: center;
  align-items: center;
}

.button {
  text-decoration: none;
  color: #37864d;
  font-size: 25px;
  font-weight: bold;
  position: relative;
  transition: color 0.3s;
}

.button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background-color: #df803e;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.button:hover::after {
  transform: scaleX(1); /* Underline effect on hover */
}

@media (max-width: 768px) {
  .button-container {
    margin-top: 100px; /* Adjust spacing for smaller screens */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Align buttons to the center */
  }

  .button {
    font-size: 18px; /* Reduce font size for smaller screens */
  }
}

.menu {
  display: flex;
  gap: 50px;
  margin-top: 20px;
}

.menu-container {
  background-image: url(/img/background.png) ;
  height: 100vh;
  width: 20%;
  border-radius: 20px;
  margin-left: 100px;
  overflow-y: auto;
  padding-bottom: 20px; /* Extra space to avoid cutting off content */
  position: relative;
}

/* Hide scrollbar for WebKit browsers */
.menu-container::-webkit-scrollbar {
  display: none; /* Hide scrollbar */
}

.menu-container img {
  width: 80%;
  align-items: center;
  margin-top: 10px;
  margin-left: 20px;
}

@media (max-width: 768px) {
  .menu-container {
    width: 100%; /* Adjust width to fit the screen */
    margin-left: 0; /* Remove left margin */
    padding: 10px; /* Adjust padding */
    height: 128vh;
  }

  .menu-container img {
    width: 90%; /* Adjust size for responsiveness */
    margin: 60px auto; /* Center image horizontally and add margin */
    display: block; /* Ensure block display for centering */
  }
}

.add-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0;
  max-width: 1000px;
  width: 1000px;
  height: 450px;
  padding-left: 10px;
  background-image: url(/img/background.png);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.918); /* Soft shadow */
  backdrop-filter: blur(10px); /* Blur effect for the background */
  border-radius: 20px;
  overflow: hidden; /* Hide overflow for rounded corners */
}

.text-container {
  width: 100%; /* Adjust as needed */
  font-size: large;
  text-align: right;
}

.text-container h1 {
  color: #cc3f32;
  font-family: "Bogart", sans-serif;
  font-style: bold;
}

.text-container p {
  color: #1f6834;
  font-family: "Noto Serif", sans-serif;
  line-height: 1.2; /* Adjust this value as needed */
  letter-spacing: -0.5px; /* Adjust this value as needed */
  font-family: "Noto Serif", sans-serif;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .add-container {
    flex-direction: column; /* Stack elements vertically */
    align-items: center; /* Center align content */
    height: auto; /* Allow height to adjust automatically */
    padding-left: 20px; /* Adjust padding */
  }

  .img-container {
    width: 70%; /* Reduce width for smaller screens */
    margin-bottom: 0px; /* Add space between image and other elements */
  }

  .text-container {
    font-size: small; /* Smaller font size for mobile */
    text-align: center; /* Center align for better readability */
    display: flex; /* Flexbox for centering */
    flex-direction: column; /* Ensure vertical alignment */
    justify-content: center; /* Center vertically */
    align-items: center; /* Center horizontally */
    padding: 70px; /* Add padding around text */
  }

  .text-container h1 {
    font-size: 1.7em; /* Reduce heading size */
  }

  .text-container p {
    font-size: 1.2em; /* Smaller paragraph text */
  }

  .button-price {
    margin-top: 20px; /* Add space above the button */
  }
}

.img-container {
  width: 400px;
}

.img-container img {
  width: 100%; /* This will make the image 400px wide as set by .img-container */
  height: auto;
  object-fit: contain;
  display: block;
}

.button-price {
  display: inline-block; /* Allows padding and margin to be applied properly */
  background-color: #37864d; /* Green background color */
  color: white; /* White text color */
  padding: 10px 20px; /* Padding inside the button */
  text-align: center; /* Center the text */
  text-decoration: none; /* Remove underline from link */
  border-radius: 20px; /* Rounded corners */
  transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

.button-price:hover {
  background-color: #f7decb; /* Darker green on hover */
  color: #37864d;
}

.cart-preview {
  width: 350px;
  background-color: #ffffff;
  color: #37864d;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  position: fixed; /* Fixed positioning */
  top: 100px; /* Distance from the top */
  right: 0px; /* Align to the right side */
  height: 550px; /* Occupy most of the viewport height */
  overflow-y: auto; /* Allow scrolling if content overflows */
  z-index: 1000; /* Ensure it appears above other content */
  transform: translateX(100%); /* Initially hidden */
  transition: transform 0.3s ease; /* Smooth transition */
}

/* Show cart preview when the checkbox is checked */
.toggle-cart-checkbox:checked ~ #cart-preview {
  transform: translateX(0); /* Slide in */
}

.cart-preview h1,
.cart-preview p {
  margin: 0;
}

/* Close button styling */

.close-button {
  display: inline-block;
  text-decoration: none;
  color: #aaa;
  font-size: 20px;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
}

.close-button:hover {
  color: black;
}

.button-content p {
  font-size: 16px;
  color: #333;
}

.close-preview {
  text-decoration: none;
  padding: 5px 10px;
  background-color: #df803e;
  color: white;
  border-radius: 5px;
}

.table-number {
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
}

.location-time {
  color: #37864d;
  font-size: 0.9em;
  margin-bottom: 20px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}

.item-details {
  display: flex;
  align-items: center;
}

.item-details img {
  width: 40px;
  height: 40px;
  margin-right: 10px;
}

.item-details p {
  margin: 0;
  font-weight: bold;
}

.order-item img {
  width: 60px; /* Set desired width */
  height: 60px; /* Set desired height */
  object-fit: cover; /* Ensures the image scales to fill the box without distortion */
  border-radius: 5px; /* Optional: adds rounded corners */
}

.remove {
  background: none;
  border: none;
  color: red;
  font-size: 1.2em;
  cursor: pointer;
  margin-left: 10px;
}

.item-quantity,
.item-price {
  font-weight: bold;
}

hr {
  border: none;
  border-top: 1px dashed #ccc;
  margin: 15px 0;
}

.order-totals p {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
}

/* Voucher Styling */
.voucher {
  display: flex;
  gap: 5px;
  margin: 10px 0;
}

.voucher input {
  flex: 1;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.apply-voucher {
  padding: 5px 10px;
  background-color: #37864d;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
}

.apply-voucher:hover {
  background-color: #2a6b3a;
}

.popup:target {
  display: block; /* Show popup when targeted */
}

.close-popup {
  display: inline-block;
  text-decoration: none;
  color: #aaa;
  font-size: 20px;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
}

.close-popup:hover {
  color: black;
}

.popup-content p {
  font-size: 16px;
  color: #333;
}

/* Voucher Button Styling */
.apply-voucher {
  padding: 5px 10px;
  background-color: #37864d;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease;
}

.apply-voucher:hover {
  background-color: #f7decb;
  color: #37864d;
}

.apply-voucher:active {
  background-color: #f7decb;
  color: #37864d;
}

.total {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
}

.checkout-button {
  width: 100%;
  padding: 10px;
  background-color: #37864d;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 20px;
}

.checkout-button:hover {
  background-color: #f7decb;
  color: #37864d;
}

/* Show popup when targeted */
.popup:target {
  display: block;
}

/* Footer styling */
.footer {
  background-color: #37864d;
  color: #ffffff;
  padding-top: 10px;
  font-family: Arial, sans-serif;
  text-align: center;
  position: absolute;
  width: 100%; /* Full width of the page */
  height: auto;
  bottom:-30%;
  left: 0;
  z-index: 2000 ; /* Ensures it appears above other content */
}


.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 13px;
}

.footer-section h2 {
  font-family: 'Bogart', sans-serif;
  font-size: 23px;
  color: #ffffff;
  margin-bottom: 5px;
}

.footer-section.social {
  margin-left: 2px;
  flex: 0.3; /* Reduces the section width, adjusting to available space */
  text-align: center; /* Centers icons within this section */
}

.footer-section.social a {
  font-size: 30px; /* Smaller icon size */
  color: #ffffff;
  margin-right: 20px; /* Reduced margin to save space */
  transition: color 0.3s ease; /* Smooth color transition for hover effect */
}

.footer-section.social a:hover {
  color: #df803e;
}

.footer-section {
  flex: 1;
  padding: 10px;
  min-width: 250px;
}

.footer-section p {
  margin: 5px 0; /* Reduce margin to 2px above and below each paragraph */
}

.hour-columns {
  display: flex;
  justify-content: space-around; /* Space the columns evenly */
  gap: 20px; /* Space between columns */
}

.hour-column p {
  margin: 2px 0; /* Adjust spacing between paragraphs */
  text-align: left; /* Align text to the left within each column */
}


@media (max-width: 768px) {
  .footer {
    bottom: -100%;
  }
}

/* Responsive design for 360px width */
@media (max-width: 360px) {
  .menu {
    display: flex;
    gap: 10px;
    margin-top: 20px;
  }

  /* Menu container adjustments */
  .menu-container {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: center;
      width: 100%;
  }

  .menu-container img {
      width: 95px; /* Smaller images for mobile */
      height: auto;
      margin-top: 40px;
      padding-bottom: 1px;
  }

  /* Add container adjustments */
  .add-container {
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: -0px 0px;
      margin: 0;
  }

  .text-container h1 {
      font-size: 30px;
  }

  .text-container p {
      font-size: 14px;
  }

   .img-container {
    width: 200px;
    height: auto;
   }

  .footer{
    bottom: -130vh;
  }
}
