html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1 {
  margin-left: 20px;
  margin-bottom: 20px;
  color: rgba(255, 0, 0, 0.7);
  text-shadow: black 1px 1px 2px;
}

h3 {
  text-align: center;
  margin-bottom: 20px;
}

.time-section {
  margin: 20px 0;
}

.slot-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.slot {
  background-color: #ffffff;
  border: 1px solid #ccc;
  padding: 10px 15px;
  border-radius: 6px;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.slot:hover {
  background-color: #d1ffd1;
}

.section-title {
  font-weight: bold;
  text-align: center;
  margin: 10px 0;
}

.slot.booked {
  background-color: #ccc;
  color: #777;
  pointer-events: none;
  cursor: not-allowed;
  border: 1px solid #aaa;
}

.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

button.slot.booked {
  background-color: #ccc;
  cursor: not-allowed;
}

/* date button */
.custom-date-selector {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin: 20px 0;
  justify-content: center;
}

.date-btn {
  background-color: #f4f4f4;
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease-in-out;
  min-width: 90px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.date-btn:hover {
  background-color: #ffe5e5;
  border-color: rgba(255, 0, 0, 0.7);
}

.date-btn.selected {
  background-color: rgba(255, 0, 0, 0.7);
  color: white;
  border-color: rgba(255, 0, 0, 0.9);
  font-weight: bold;
}

.day-name {
  font-size: 14px;
  font-weight: 600;
}

.date-number {
  font-size: 18px;
}

.doctor-select-wrapper {
  max-width: 300px;
  margin: 20px auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.doctor-select-wrapper label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #444;
  font-size: 16px;
}

.custom-dropdown {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid rgba(255, 0, 0, 0.5);
  border-radius: 8px;
  background-color: #fff;
  font-size: 15px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='red' height='18' viewBox='0 0 24 24' width='18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: border 0.3s ease;
}

.custom-dropdown:focus {
  outline: none;
  border-color: rgba(255, 0, 0, 0.8);
}

.custom-dropdown option {
  padding: 10px;
}

.booking-container {
  width: 100%;
    background-color: white;
  overflow-x: auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  margin: 30px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0px 0;
}
thead {
  background-color: rgba(255, 0, 0, 0.5);
  color: white;
  margin: 15px;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ccc;
  white-space: nowrap;
}

.download-btn {
  background-color: #007BFF;
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {

  .table-container {
    overflow-x: auto;
  }

  table {
    width: 600px;
  }

  .download-btn {
    width: 100%;
    font-size: 13px;
    padding: 10px;
    text-align: center;
    white-space: normal;
  }
}