/* Popup Styles */

/* Popup Container */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none; /* Hidden by default */
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
  border: 2px solid #ffe5b4; /* Light brown border */
  border-radius: 15px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}


.popup-content {
  background-color: #fff8e1; /* Light brown */
  padding: 20px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.popup-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.popup-buttons button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.popup-buttons button:first-child {
  background-color: #28a745;
  color: white;
}

.popup-buttons button:last-child {
  background-color: #dc3545;
  color: white;
}


/* Popup Content */
.popup-content {
  margin-bottom: 20px;
}

/* Close Button */
.popup-close {
  background-color: #ffe5b4; /* Match border color */
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  align-self: flex-end;
}

.popup-close:hover {
  background-color: #ffd699;
}

.edit-category-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.edit-category-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.edit-category-form .form-group label {
  font-weight: bold;
}

.edit-category-form input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}

.edit-category-form button {
  margin-top: 10px;
}

/* Category Edit Row */
.category-edit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.category-actions {
  display: flex;
  gap: 10px; /* Space between action buttons */
}

.modify-button {
  background-color: #ffd966; /* Light yellow */
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 18px;
  color: black;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modify-button:hover {
  background-color: #ffaa00; /* Highlighted yellow */
}

.arrow-button,
.delete-button {
  background-color: #ffd966; /* Light yellow */
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
}

.arrow-button:hover,
.delete-button:hover {
  background-color: #ffaa00; /* Highlighted yellow */
}

.arrow-button {
  font-size: 16px;
}

.delete-button {
  font-size: 18px;
  color: #000; /* Black for contrast */
}

#edit-category-list {
  max-height: calc(100vh - 350px); /* Adjust height to fit within screen minus padding */
  overflow-y: auto; /* Enable vertical scrolling */
  padding-right: 10px; /* Add some padding to prevent overlap with the scrollbar */
  padding-bottom: 10px;
}

/* Add New Category Button */
#edit-category-list .action-button.ok {
  margin-top: 15px;
  padding: 10px 15px;
  font-size: 16px;
  background-color: #28a745; /* Green */
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#edit-category-list .action-button.ok:hover {
  background-color: #218838; /* Darker green */
}


/** checkout **/
/* Checkout Popup Styling */
#checkout-popup {
  padding: 20px;
  background-color: #fff8e1; /* Light yellow */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  position: relative;
  left: -75px; /* Shift the popup left by half the button width to visually center */
}

#checkout-popup h3 {
  text-align: center;
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
}

#checkout-bill-container {
  position: relative;
}

#checkout-popup .scrollable-section {
  max-height: calc(50vh - 50px);
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #ffa726;
  border-radius: 5px;
  background-color: #f4f4f4;
  box-shadow: 0 4px 6px rgba(255, 0, 0, 0.2);
}

#checkout-popup .checkout-bill-list {
  list-style: none; /* Remove default bullets */
  padding: 10px;
  margin: 0;
}

#checkout-popup .checkout-bill-list li {
  display: grid;
  grid-template-columns: 3fr 1fr; /* Two columns: item description | price */
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

#checkout-popup .checkout-bill-list li span:last-child {
  text-align: right;
}

#checkout-popup .checkout-bill-list li:last-child {
  border-bottom: none; /* Remove border for the last item */
}

#checkout-popup .totals {
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  padding: 10px;
}

#checkout-popup .totals li {
  display: grid;
  grid-template-columns: 3fr 1fr;
  padding: 5px;
  border-bottom: none;
}

#checkout-popup .totals .emphasized {
  background-color: #ffefc5; /* Light yellow for emphasis */
  font-weight: bold;
  border: 2px solid #ffa726;
  align-content: center;
  text-align: center;
  font-size: 14pt;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(255, 0, 0, 0.2);
}


#checkout-popup .action-button.tip {
  margin-top: 10px;
  background-color: #cc6;
}

#checkout-total {
  font-weight: bold;
}

/* Cancel Button */
#checkout-popup .action-button.cancel {
  margin-top: 20px;
  width: 100%;
  max-width: 200px;
  align-self: center;
  background-color: #dc3545;
  color: white;
}

/* Floating Buttons Section */
.floating-buttons {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: -180px; /* Place buttons outside the popup, with a 30px gap */
  display: flex;
  flex-direction: column;
  gap: 20px;
}


.square-button {
  width: 150px;
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background-color: #f8f4f0;
  border: 2px solid #e0ddd8;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.square-button button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.square-button img {
  width: 100px;
  height: 100px;
  margin-bottom: 5px;
}

.square-button .button-label {
  background-color: #0a0;
  color: white;
  width: calc(100% - 10px);
  text-align: center;
  padding: 5px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  font-size: 14px;
  font-weight: bold;

  /* Ensure consistent height for text */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Handle long text gracefully */
  white-space: normal; /* Allow text to wrap */
  overflow: hidden;
  text-overflow: ellipsis;

  /* Center-align multi-line text */
  line-height: 1.2; /* Adjust spacing between lines */
}

/** cash payment **/
/* Cash Payment Popup Styling */
/* Main Container for Popup and Keypad */
#cash-payment-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.1);
  flex-wrap: wrap; /* Allow wrapping */
  gap: 20px; /* Add spacing when wrapping */
  padding: 20px;
  min-width: 850px;
}

/* Popup Styling */
#cash-payment-popup {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background-color: #fff8e1; /* Light yellow */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 400px;
  font-family: Arial, sans-serif;
}

#cash-payment-popup h3 {
  text-align: center;
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
}

#payment-summary {
  width: 100%;
  margin-bottom: 20px;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 5px;
  background-color: #f9f9f9; /* Default background */
}

.payment-row.emphasized {
  background-color: #ffc107; /* Yellow for emphasis */
  font-weight: bold;
}

.payment-row .caption {
  font-size: 16px;
  color: #333;
}

.payment-row .value {
  font-size: 18px;
  font-weight: bold;
  color: #555;
  text-align: right;
}

#cash-payment-popup .popup-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  width: 100%;
}

#cash-payment-popup .popup-buttons .action-button {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

#cash-payment-popup .popup-buttons .action-button.ok {
  background-color: #28a745; /* Green */
  color: white;
}

#cash-payment-popup .popup-buttons .action-button.cancel {
  background-color: #dc3545; /* Red */
  color: white;
}

#cash-payment-popup .popup-buttons .action-button:hover {
  transform: scale(1.05);
}

#cash-payment-popup .popup-buttons .action-button:active {
  transform: scale(0.95);
}

/* Keypad Styling */
.floating-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 330px;
  margin-left: 20px; /* Add space between the popup and the keypad */
}

.floating-keypad button {
  width: 100px;
  height: 100px;
  border: none;
  border-radius: 10px;
  font-size: 24px;
  font-weight: bold;
  background-color: #333;
  color: white;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.floating-keypad button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
}

.floating-keypad button:nth-child(10) {
  grid-column: 2; /* Center the "0" */
}

.floating-keypad button:nth-child(11) {
  background-color: #a00; /* Red for backspace */
}

/** card payment **/
/* Card Payment Popup Styling */
#card-payment-popup {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background-color: #fff8e1; /* Light yellow */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 400px; /* Fixed width for the popup */
  font-family: Arial, sans-serif;
}

#card-payment-popup h3 {
  text-align: center;
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
}

.card-payment-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-payment-content img {
  width: 150px;
  height: auto;
  margin-bottom: 20px;
}

.card-payment-content .loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #ddd; /* Light grey border */
  border-top: 5px solid #28a745; /* Green border */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.card-payment-content p {
  font-size: 16px;
  color: #555;
  text-align: center;
}

#card-payment-popup .popup-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

#card-payment-popup .popup-buttons button {
  flex: 1;
  max-width: 150px;
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#card-payment-popup .popup-buttons button.cancel {
  background-color: #dc3545;
  color: white;
}

#card-payment-popup .popup-buttons button.cancel:hover {
  transform: scale(1.05);
}

#card-payment-popup .popup-buttons button.cancel:active {
  transform: scale(0.95);
}

/* Spinner Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}


