/* ---- Global ---- */
body {
  font-family: 'Poppins', sans-serif;
  background: transparent;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 700px;
  margin: 6px auto;
  background: white;
  border-radius: 12px;
  padding: 3px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

h1 {
  color: #458CA3;
  text-align: start;
}

label {
  display: block;
  margin-top: 15px;
  font-weight: 600;
}

input, select, textarea, button {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
}

button {
  background: #007bff;
  color: white;
  border: none;
  font-size: 16px;
  margin-top: 20px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #0056b3;
}

.success {
  background: #e7ffe7;
  color: #155724;
  padding: 10px;
  margin-top: 15px;
  border-radius: 6px;
}

.error {
  background: #ffe7e7;
  color: #721c24;
  padding: 10px;
  margin-top: 15px;
  border-radius: 6px;
}



/* --- Dashboard Button --- */
#dashboardBtn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: #458CA3;
  color: white;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  z-index: 1000;
}

#dashboardBtn:hover {
  background: #4fa6be;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

#dashboardBtn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}



.btn-secondary {
  background-color: #ddd;
  color: #333;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-secondary:hover {
  background-color: #ccc;
}


.checkbox-group {
  margin: 10px 0;
  font-size: 14px;
}

.checkbox-group input[type="checkbox"] {
  transform: scale(1.1);
  margin-right: 6px;
}


.disabled-lesson {
  opacity: 0.6;
  background: #f5f5f5;
  filter: grayscale(50%);
}

.recurring-tag {
  background-color: #458CA3;
  color: white;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.75em;
  margin-left: 6px;
}


/* ---- Tabs ---- */
.tab {
  display: inline-flex;
  align-items: center;
  background: #e9ecef;
  border: none;
  padding: 10px 20px;
  margin: 0 5px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  color: #333;
  font-size: 15px;
}

.tab:hover {
  background: #d4dae0;
}

.tab.active {
  background: #458CA3;
  color: #fff;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Tab icons */
.tab::before {
  content: attr(data-icon);
  font-size: 18px;
  margin-right: 8px;
  display: inline-block;
  transition: transform 0.2s ease;
}

/* Smooth icon animation */
.tab.active::before {
  transform: scale(1.1);
}

/* ---- Tab content ---- */
.tab-content {
  display: none;
  margin-top: 20px;
}

.tab-content.active {
  display: block;
}


/* ---- Lesson Cards ---- */
.lesson-card {
  background: #ffffff;
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.lesson-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.15);
}

.lesson-card-header {
  display: flex;
  align-items: flex-start;
}

.lesson-card img {
  width: 110px;
  height: 110px;
  border-radius: 10px;
  object-fit: cover;
  margin-right: 20px;
}

.lesson-details {
  flex: 1;
}

.lesson-details h3 {
  margin: 0 0 8px;
  color: #222;
}

.lesson-details p {
  margin: 3px 0;
  color: #555;
}

.lesson-meta {
  font-weight: bold;
  color: #007bff;
}

.book-btn {
  background: #458CA3;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  align-self: flex-start;
  transition: background 0.3s, transform 0.2s;
}

.book-btn:hover {
  background: #458CA3;
  transform: scale(1.05);
}


/* ---- Booking Form ---- */
.booking-form-container {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 20px;
  margin-top: 15px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s ease;
}

.lesson-card.open .booking-form-container {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
}

.bookingForm {
  background: #fafafa;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bookingForm label {
  font-weight: 600;
  margin-top: 6px;
}

.bookingForm input, .bookingForm select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.submit-btn, .cancel-btn {
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.25s;
}

.submit-btn {
  background: #458CA3;
  color: white;
}

.submit-btn:hover {
  background: #458CA3;
}

.cancel-btn {
  background: #eee;
  color: #333;
}

.cancel-btn:hover {
  background: #ddd;
}


/* ---- Slot Row ---- */
.recurring-slot {
  margin: 6px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #ddd;
  padding: 6px 0;
}

.slot-info {
  display: inline-block; /* or block/flex — just not inline */
  flex: 1 1 auto;        /* let it expand */
  min-width: 70%;        /* control how wide it stays */
  font-size: 14px;
  color: #333;
  padding-right: 10px;
  
}

.price-tag {
  margin-left: 8px;
  font-weight: 600;
  color: #007bff;
}

.price-free {
  color: #28a745;
  font-weight: bold;
  font-size: 14px;
  margin-left: 8px;
}


/* ---- Responsive ---- */
@media screen and (max-width: 768px) {
  .container {
    padding: 20px;
    margin: 40px auto;
  }

  .tab {
    padding: 8px 12px;
    font-size: 14px;
    margin: 5px 2px;
  }

  .lesson-card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .lesson-card img {
    margin-right: 0;
    margin-bottom: 10px;
    width: 90px;
    height: 90px;
  }

  .book-btn {
    flex: 0 0 auto;        /* keep its size */
    width: 80%;          /* reduce button width */
    white-space: nowrap;   /* prevent text wrapping */
    align-self: center;
    padding: 7px 12px;
  }

  .bookingForm input, .bookingForm select {
    font-size: 13px;
  }

  .form-buttons {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .submit-btn, .cancel-btn {
    width: 100%;
  }
}

@media screen and (max-width: 880px) {
  .container {
    padding: 15px;
    margin: 30px auto;
  }

  .tab {
    padding: 6px 10px;
    font-size: 13px;
  }

  .lesson-card {
    padding: 15px;
  }

  .lesson-card img {
    width: 80px;
    height: 80px;
  }
  
  .recurring-slot {
    flex-direction: column;   /* stack vertically */
    align-items: stretch;     /* full width for children */
  }

  .slot-info {
    min-width: 100%;          /* take full width */
    padding-right: 0;
    margin-bottom: 8px;       /* add spacing before button */
  }

  .book-btn {
    width: 100%;              /* full width button on mobile */
    align-self: stretch;      /* ensure it expands */
  }
  
}
