html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
}

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 Card Base */
.slot-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 70px;
  margin: 6px;
  padding: 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.slot-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background: #f9f9ff;
}

.slot-time {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.slot-price {
  font-size: 14px;
  color: #007BFF;
  margin-top: 5px;
}

/* Booked Slots */
.slot-card.booked {
  background-color: #e0e0e0;
  color: #777;
  border: 1px solid #aaa;
  box-shadow: none;
  pointer-events: none;
  cursor: not-allowed;
}

.slot-card.booked .slot-time,
.slot-card.booked .slot-price {
  color: #777;
}

/* Responsive Design Slot Card*/
@media (max-width: 768px) {
  .slot-card {
    width: 100px;
    height: 70px;
    font-size: 14px;
    margin: 5px;
  }

  .slot-time {
    font-size: 14px;
  }

  .slot-price {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .slot-card {
    width: 90px;
    height: 65px;
    margin: 4px;
  }

  .slot-time {
    font-size: 13px;
  }

  .slot-price {
    font-size: 11px;
  }
}

.section-title {
  font-weight: bold;
  text-align: center;
  margin: 10px 0;
}

.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

/* 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;
  }
}

/* Popup modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
  position: relative;
}

.modal-content h2 {
  margin-bottom: 15px;
}

.modelInput {
  width: 90%;
  padding: 8px;
  margin: 6px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.modelBtn {
  padding: 10px 15px;
  margin-top: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.confirm-btn {
  background: #28a745;
  color: white;
}

.cancel-btn {
  background: #dc3545;
  color: white;
}

.close {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 20px;
  cursor: pointer;
}