* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  padding-top: 46px;
  font-family: "Open Sans", sans-serif;
  background-color: rgba(180, 215, 226, 0.514);
}

h2 {
  font-weight: lighter;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #0cb36d;
  color: white;
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.business-name {
  flex-grow: 1;
  text-align: center;
  font-size: 22px;
  font-weight: normal;
}

.auth-buttons {
  display: flex;
  gap: 10px;
}

.auth-buttons a {
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  background-color: #0cb36d;
  border-radius: 5px;
}

.auth-buttons a:hover {
  background-color: #0a945a;
}

.center-box-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  padding-top: 20px;
  position: relative;
  z-index: 1;
}

.center-box {
  /* try calc max height to force scroll in centerbox content only */
  max-height: calc(100vh - 120px); /* Adjust for height of stepper and header */
  width: 80vw;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  overflow: hidden; /* optional, prevents visual spill */
}

.center-box-header {
  background-color: #f0f0f0;
  padding: 5px;
  text-align: center;
  font-weight: lighter;
  border: 1px solid lightgrey;
}

.center-box-footer {
  background-color: #f0f0f0;
  padding: 20px;
  text-align: center;
  border: 1px solid lightgrey;
  font-weight: lighter;
}

.center-box-footer a {
  border-radius: 5px;
  background-color: #0cb36d;
  text-decoration: none;
  padding: 10px 20px;
  color: white;
}

.center-box-footer a:hover {
  background-color: #0a945a;
}

.center-box-footer .footer-btn {
  border-radius: 5px;
  background-color: #0cb36d;
  text-decoration: none;
  padding: 10px 20px;
  color: white;
  border: none;
  font: inherit;
  cursor: pointer;
}
.center-box-footer .footer-btn:hover {
  background-color: #0a945a;
}

.center-box-content {
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  text-align: left;
}

@media (max-width: 768px) {
  .center-box {
    width: 90%;
    height: auto;
  }
  .header-menu nav {
    flex-direction: column;
    gap: 10px;
  }
  .header-menu nav a {
    font-size: 16px;
  }
}

#services {
  display: block;
  padding: 10px;
}

.group-block {
  margin-bottom: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.5rem;
  overflow: hidden;
}

.table-wrapper {
  transition: all 0.3s ease;
  overflow: hidden;
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: bold;
}

.group-name {
  font-weight: bold;
}

.expand-arrow {
  font-size: 16px;
  margin-left: 8px;
  color: #333;
  transition: transform 0.2s ease;
}

.group-header.expanded .expand-arrow {
  transform: rotate(90deg);
}

.group-table {
  width: 100%;
  border-collapse: collapse;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 8px;
  text-align: left;
  font-size: 12px;
  font-weight: bold;
}

.table th {
  background-color: #4CAF50;
  color: white;
}

.table tr {
  border: 1px solid #ddd;
}

.table tr:hover {
  background-color: #f2f2f2;
  cursor: pointer;
}

.table th:first-child, .table td:first-child {
  border-left: none;
  border-top: none;
  border-bottom: none;
  border-right: 1px solid #ddd;
}

.select-box {
  width: 28px;
  height: 20px;
  border: 2px solid #ddd;
  text-align: center;
}

.selected .select-box {
  background-color: #4CAF50;
  color: white;
}

.table td:nth-child(3) {
  color: green;
}

.table td:last-child {
  display: flex;
  align-items: center;
}

.normal-text {
  font-weight: normal;
  margin-left: 4px;
  border: none;
}

.description-row td {
  font-weight: normal;
  font-size: 12px;
  padding: 6px;
}

.treatment-description {
  font-style: italic;
  color: #555;
}

.treatment-info {
  display: flex;
  gap: 2rem; /* space between items */
  align-items: center;
}

.product-name {
  font-weight: bold;
  flex-shrink: 0;
}

.price {
  color: #333;
  flex-shrink: 0;
}

.duration {
  color: #666;
  flex-shrink: 0;
}

.selector-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.selector-row {
  cursor: pointer;
  border-bottom: 1px solid #ddd;
}

.selector-row td {
  padding: 0.4rem 0.6rem;
  font-size: 0.95rem;
  line-height: 1.2;
}

.selector-check {
  text-align: right;
  color: #ccc;
  width: 1.5rem;
}

.selector-row.selected .selector-check {
  color: #4CAF50; /* green */
}

/* Calendar */
.calendar-wrapper {
  margin-top: 1.5rem;
  text-align: left;
}

.calendar-wrapper h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.calendar-table {
  border-collapse: collapse;
  background: #f9f9f9;
  border: 1px solid #ccc;
}

.calendar-table th,
.calendar-table td {
  width: 3rem;
  height: 2.5rem;
  text-align: center;
  border: 1px solid #ddd;
  font-size: 0.9rem;
  cursor: pointer;
}

.calendar-table td:hover {
  background-color: #e0f7fa;
}

.calendar-table td.selected {
  background-color: #4CAF50;
  color: white;
}

.calendar-table td.unavailable {
  background-color: #f9f9f9;
  text-decoration: line-through;
  color: #999;
  pointer-events: none;
}

.calendar-table td.selected-date {
  background-color: #4CAF50; /* green */
  color: white;
  border: 2px solid #388E3C;
  font-weight: bold;
}

.timeslot-button {
  padding: 8px 12px;
  margin: 4px;
  min-width: 100px;
  font-size: 14px;
  border-radius: 6px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  cursor: pointer;
  text-align: center;
}

.timeslot-button:hover {
  background-color: #e0e0e0;
}

.timeslot-button.selected-time {
  background-color: #4CAF50;
  color: white;
  border: 2px solid #388E3C;
}

/* Treatment Search Box Styles */
#treatment-search {
  width: 96%;
  max-width: 540px;
  margin: 0 auto 12px auto;
  margin-bottom: 12px;
  padding: 8px;
  font-size: 1rem;
  border-radius: 4px;
  border: 2px solid #4CAF50;
  box-sizing: border-box;
  display: block;
  background: #f8f8f8;
}
#treatment-search:focus {
  border: 2px solid #0cb36d;
  outline: none;
  box-shadow: 0 0 2px #0cb36d33;
}
/* Processing message for paypal */
#processing-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
}
#processing-overlay .processing-message {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  color: #333;
  padding: 24px 32px;
  border-radius: 8px;
  font-size: 1.2em;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
  text-align: center;
}
.payment-instructions {
  font-weight: bold;
  margin-bottom: 8px;
}

/* Washed-out background image below header, filling viewport */
.center-box-bg-wrapper {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 120px); /* Adjust for height of stepper and header */
  z-index: 0;
}

.center-box-bg-wrapper::before {
  content: "";
  position: fixed;
  top: 46px; /* Height of your header */
  left: 0;
  width: 100vw;
  height: calc(100vh - 46px);
  background: url('/images/banner.jpg') center center/cover no-repeat;
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

.center-box-container {
  position: relative;
  z-index: 1;
}

/* Try Stepper */
.booking-stepper {
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0cb36d;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1em;
}
.step:not(.active) .circle {
  background: #e0e0e0;
  color: #888;
}
.label {
  font-size: 0.7em;
  margin-top: 6px;
  text-align: center;
  min-width: 60px;
}
.line {
  width: 32px;
  height: 3px;
  background: #0cb36d;
  margin: 12px 4px 0 4px;
  border-radius: 2px;
}

/* Header button for authenticated users */
.header-link-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.6);
  color: white;
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  margin-left: 12px;
}
.header-link-btn:hover {
  background-color: rgba(255,255,255,0.15);
}

/* Appointments list */
.appt-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.appt-item {
  padding: 14px 20px;
  border-bottom: 1px solid #eee;
}
.appt-item:last-child {
  border-bottom: none;
}
.appt-datetime {
  font-weight: 600;
  font-size: 15px;
  color: #0cb36d;
  margin-bottom: 4px;
}
.appt-services {
  font-size: 15px;
  margin-bottom: 6px;
}
.appt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #666;
}
.appt-meta i {
  margin-right: 4px;
  color: #0cb36d;
}
.appt-loading, .appt-empty {
  padding: 30px 20px;
  text-align: center;
  color: #666;
}
.auth-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}
@media (max-width: 480px) {
  .auth-welcome {
    display: none;
  }
}