.tgl-schedule-front,
.tgl-my-bookings {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.tgl-sch-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.tgl-sch-empty {
  color: #64748b;
  text-align: center;
  padding: 1.5rem;
}

.tgl-btn {
  display: inline-block;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none !important;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.tgl-btn:hover {
  filter: brightness(1.05);
}
.tgl-btn-sm {
  padding: 7px 12px;
  font-size: 0.85rem;
}
.tgl-btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #94a3b8;
}
.tgl-btn-cancel {
  background: #fff;
  color: #b91c1c !important;
  border: 1.5px solid #fecaca;
}

.tgl-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tgl-class-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.tgl-class-date {
  text-align: center;
  min-width: 64px;
  background: #f0fdf4;
  border-radius: 12px;
  padding: 10px 8px;
}
.tgl-class-date .day {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: #16a34a;
  line-height: 1.1;
}
.tgl-class-date .month {
  font-size: 12px;
  color: #64748b;
}

.tgl-class-info {
  flex: 1;
  min-width: 160px;
}
.tgl-class-info h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.tgl-class-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}
.tgl-class-info .seats {
  margin-top: 4px;
  color: #059669;
  font-weight: 600;
}

.tgl-class-action {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Overlay modal */
.tgl-modal {
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none; /* JS sẽ set display:flex khi mở */
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.tgl-modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px 20px;
  max-width: 400px;
  width: 100%;
  position: relative;
  margin: auto;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
}
.tgl-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 28px;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
  padding: 6px 10px;
  z-index: 2;
  background: transparent;
  border: none;
}
.tgl-modal-content h3 {
  margin: 0 32px 14px 0;
  font-size: 1.15rem;
}
.tgl-modal-content input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 10px;
  box-sizing: border-box;
  font-size: 16px; /* tránh zoom iOS khi focus */
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
}
.tgl-modal-content label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.85rem;
}
.tgl-modal-content .tgl-optional {
  font-weight: 400;
  color: #94a3b8;
  font-size: 0.8rem;
}
.tgl-modal-content .tgl-privacy-note {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}
.tgl-modal-content .tgl-btn {
  width: 100%;
  margin-top: 4px;
  padding: 13px 18px;
  pointer-events: auto;
}

/* Khóa cuộn nền nhẹ khi modal mở (không dùng position:fixed trên body) */
body.tgl-modal-open {
  overflow: hidden;
}

/* Mobile: bottom sheet */
@media (max-width: 600px) {
  .tgl-modal {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }
  .tgl-modal-content {
    max-width: 100%;
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    margin: 0;
  }
  .tgl-modal-content::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin: 0 auto 14px;
  }
}

.tgl-my-bookings-form {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.tgl-my-bookings-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #64748b;
}
.tgl-my-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tgl-my-row input {
  flex: 1;
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

@media (max-width: 600px) {
  .tgl-class-card {
    flex-direction: column;
    text-align: center;
  }
  .tgl-class-action {
    justify-content: center;
    width: 100%;
  }
}

.tgl-skill-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
  background: #e2e8f0;
  color: #334155;
}
.tgl-skill-badge.skill-nghe { background: #dbeafe; color: #1d4ed8; }
.tgl-skill-badge.skill-doc  { background: #fef3c7; color: #b45309; }
.tgl-skill-badge.skill-noi  { background: #dcfce7; color: #166534; }
.tgl-skill-badge.skill-viet { background: #fce7f3; color: #9d174d; }
.tgl-skill-badge.skill-dich { background: #ede9fe; color: #5b21b6; }
