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

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex; /* Ensure flex display for centering */
  justify-content: center;
  align-items: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-content {
  background: rgba(0, 0, 0, 0.2); /* Changed to an even lighter background */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  padding: 1rem 0.5rem; /* Increased vertical padding */
  z-index: 1001;
  width: 90%;
  max-width: 300px; /* Made thinner */
  max-height: 200px; /* Reduced overall height */
  position: absolute; /* Use absolute positioning for centering */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: #333;
    transition: background-color 0.2s, transform 0.2s;
}

.close-modal-btn:hover {
    background-color: #e0e0e0;
    transform: scale(1.1);
}

.tip-section {
  text-align: center;
  padding-top: 1rem; /* Push content down from the top of the section */
}

.tip-section h2 {
  font-size: 1.1rem; /* Further reduced font size */
  margin-bottom: 1rem; /* Reduced gap between heading and input field */
  color: #fff; /* Solid white color */
}

.tip-input-group {
  display: flex;
  justify-content: center;
  align-items: center; /* Vertically center items */
  /* Removed margin-top */
  margin-bottom: 0.1rem; /* Further reduced margin */
}

.tip-input {
  width: 70%; /* Reduced width */
  padding: 0.2rem 0.2rem; /* Adjusted vertical padding to match button */
  border: 0.5px solid #ccc; /* Reduced border thickness */
  border-radius: 5px 0 0 5px;
  font-size: 0.9rem; /* Reverted font size */
  line-height: 1.2; /* Adjusted line height to match button */
  height: 1.8rem; /* Re-added fixed height, slightly larger */
  text-align: center; /* Align input value to center */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.tip-btn {
  padding: 0.05rem 0.3rem; /* Further reduced padding */
  border: 1px solid #007bff;
  background-color: #007bff;
  color: white;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
  font-size: 0.8rem; /* Reduced font size */
  white-space: nowrap;
  line-height: 1.2; /* Adjusted line height */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.no-tip-btn {
  background: none;
  border: none;
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.8rem; /* Reduced font size */
  padding: 0.05rem; /* Further reduced padding */
  line-height: 1.2; /* Adjusted line height */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.promo-code-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

#promo-code-input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
}

#apply-promo-btn {
    padding: 8px 15px;
    background-color: #28a745; /* Green color for apply button */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#apply-promo-btn:hover {
    background-color: #218838;
}

body.modal-open {
    overflow: hidden;
}