/* ============================================================
   LPA Teacher Booking v2.4
   ============================================================ */

/* ── Card ──────────────────────────────────────────────────── */
.lpa-teacher-card {
            /* nền đỏ */
  border: none;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;             /* clip card gọn */
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.lpa-teacher-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
}

/* Phần cam trên cùng */
.lpa-card-top {
  background: #F47B20;
  height: 90px;                 /* đủ cao để avatar không bị cắt */
  position: relative;
  flex-shrink: 0;
  /* KHÔNG dùng clip-path — avatar tràn ra ngoài sẽ bị cắt */
}
/* Sóng cong dưới top — dùng ::after thay clip-path */
.lpa-card-top::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 24px;
  background: #C0392B;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* Avatar giáo viên */
.lpa-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 3px solid #fff;
  overflow: hidden;
  position: absolute;
  bottom: -40px;                /* nửa avatar thò xuống phần đỏ */
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  z-index: 3;                   /* trên ::after */
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.lpa-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.lpa-avatar-initials {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #F47B20;
  background: #FFF3E8;
  border-radius: 50%;
}

/* Phần body — nền đỏ */
.lpa-card-body {
  background: #C0392B;
  padding: 52px 16px 18px;      /* 52px = chỗ avatar thò xuống */
  text-align: center;
}
.lpa-teacher-name {
  font-size: 15px; font-weight: 700;
  color: #fff;                  /* trắng trên đỏ */
  margin-bottom: 5px; line-height: 1.3;
}
.lpa-cert-badge {
  display: inline-block;
  font-size: 11px;
  color: #fff;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.4);
  padding: 3px 10px; border-radius: 20px;
  margin-bottom: 10px;
}
.lpa-card-stats {
  display: flex;
  justify-content: space-around;
  font-size: 12px; color: rgba(255,255,255,.85);
  border-top: 1px solid rgba(255,255,255,.2);
  padding-top: 8px; margin-bottom: 12px;
  gap: 4px;
}
.lpa-book-btn {
  display: block; width: 100%;
  background: #fff; color: #C0392B;
  border: none; border-radius: 20px;
  padding: 9px 0; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .15s, color .15s;
  font-family: inherit;
}
.lpa-book-btn:hover { background: #F47B20; color: #fff; }

/* ── Filter bar — 1 hàng ngang cứng ──────────────────────── */
.lpa-filter-bar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;  /* căn giữa */
  gap: 12px !important;
  margin-bottom: 20px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 50 !important;              /* trên card grid */
}
.lpa-search-input {
  flex: 1 1 0 !important;         /* chiếm phần còn lại */
  min-width: 0 !important;
  padding: 9px 14px;
  border: 1px solid #ddd; border-radius: 24px;
  font-size: 14px; outline: none; background: #fff; color: #333;
  font-family: inherit; box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.lpa-search-input:focus { border-color: #F47B20; box-shadow: 0 0 0 3px rgba(244,123,32,.12); }
.lpa-filter-select {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 140px;
  max-width: 200px;
  
  border: 1px solid #ddd; border-radius: 24px;
  font-size: 13px; background: #fff; color: #333;
  cursor: pointer; outline: none; font-family: inherit;
  box-sizing: border-box;
  transition: border-color .15s;
  position: relative !important;
  z-index: 100 !important;            /* dropdown không bị card đè */
  appearance: auto;
}
.lpa-filter-select:focus { border-color: #F47B20; }
.lpa-count-badge {
  flex: 0 0 auto !important;
  font-size: 12px; color: #888;
  background: #fdf2f2;
  padding: 5px 12px; border-radius: 20px;
  white-space: nowrap;
}

/* Mobile: cho phép xuống dòng khi màn nhỏ */
@media (max-width: 600px) {
  .lpa-filter-bar { flex-wrap: wrap !important; }
  .lpa-search-input { flex: 1 1 100% !important; }
  .lpa-filter-select { max-width: calc(50% - 5px); }
	.lpa-tabs-nav{display:grid !important;}
}

/* ── Section header ─────────────────────────────────────── */
.lpa-section-header { text-align: center; margin-bottom: 1.5rem; }
.lpa-section-header h1,
.lpa-section-header h2 { font-size: 26px; font-weight: 700; color: #333; margin: 0 0 6px; }
.lpa-section-header p  { font-size: 15px; color: #888; margin: 0; }

/* ── Grid loading ───────────────────────────────────────── */
.lpa-loading { text-align: center; padding: 2rem; color: #888; }

/* ── Empty state ────────────────────────────────────────── */
.lpa-empty-state { text-align: center; padding: 3rem; color: #888; }
.lpa-empty-state p { font-size: 15px; margin: 12px 0; }
.lpa-empty-state button {
  background: #C0392B; color: #fff; border: none;
  padding: 9px 20px; border-radius: 20px; font-size: 13px;
  cursor: pointer; font-family: inherit;
}

/* ── Swiper nav ─────────────────────────────────────────── */
.lpa-swiper-btn-prev,
.lpa-swiper-btn-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  background: #F47B20; color: #fff; border-radius: 50%;
  font-size: 20px; cursor: pointer; z-index: 10;
  user-select: none; transition: background .15s;
  display: flex; align-items: center; justify-content: center;
}
.lpa-swiper-btn-prev:hover,
.lpa-swiper-btn-next:hover { background: #D4620E; }
.swiper-pagination-bullet-active { background: #F47B20 !important; }

/* ── Modal ──────────────────────────────────────────────── */
.lpa-modal-overlay {
  position: fixed !important;
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
  z-index: 9999999 !important;
  background: rgba(0,0,0,.6) !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}
.lpa-modal-overlay.lpa-open {
  display: flex !important;
}
.lpa-modal-box {
  background: #fff !important;
  border-radius: 12px !important;
  width: 100% !important; max-width: 480px !important;
  max-height: 90vh !important; overflow-y: auto !important;
  box-shadow: 0 16px 60px rgba(0,0,0,.3) !important;
  animation: lpaFadeIn .18s ease;
}
@keyframes lpaFadeIn { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:none} }
.lpa-modal-header {
  padding: 18px 20px 14px; border-bottom: 1px solid #f0f0f0;
  font-size: 16px; font-weight: 700; color: #333;
  text-align: center; position: relative;
}
.lpa-modal-close {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; font-size: 26px; cursor: pointer;
  color: #888; line-height: 1; transition: color .15s; padding: 0 4px;
}
.lpa-modal-close:hover { color: #F47B20; }
.lpa-modal-teacher-tag {
  margin: 14px 20px; background: #FFF3E8;
  border-radius: 8px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.lpa-mini-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: #F47B20; color: #fff;
  font-weight: 700; font-size: 16px; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.lpa-mini-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lpa-modal-teacher-name { font-size: 15px; font-weight: 700; color: #333; display: block; }
.lpa-modal-teacher-cert { font-size: 12px; color: #F47B20; display: block; margin-top: 2px; }
.lpa-modal-form { padding: 0 20px 20px; }
.lpa-form-group { margin-bottom: 14px; }
.lpa-form-group label { display: block; font-size: 13px; font-weight: 600; color: #888; margin-bottom: 5px; }
.lpa-req { color: #F47B20; }
.lpa-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width:560px){ .lpa-form-row { grid-template-columns: 1fr !important; } }
.lpa-form-group input,
.lpa-form-group textarea {
  display: block; width: 100%; padding: 10px 12px;
  border: 1px solid #ccc; border-radius: 7px;
  font-size: 14px; font-family: inherit; color: #333; background: #fff;
  outline: none; transition: border-color .15s; box-sizing: border-box;
  -webkit-appearance: none; appearance: none;
}
.lpa-form-group input:focus,
.lpa-form-group textarea:focus { border-color: #F47B20; box-shadow: 0 0 0 3px rgba(244,123,32,.12); }
.lpa-form-group input[readonly] { background: #f9f9f9; color: #888; cursor: default; }
.lpa-form-group textarea { height: 88px; resize: vertical; }
.lpa-form-error {
  background: #fff0f0; border: 1px solid #f5c6c6; border-radius: 6px;
  padding: 10px 12px; font-size: 13px; color: #c0392b;
  margin-bottom: 12px; display: none;
}
.lpa-submit-btn {
  display: block; width: 100%; background: #F47B20; color: #fff;
  border: none; border-radius: 8px; padding: 13px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background .15s; font-family: inherit; box-sizing: border-box;
}
.lpa-submit-btn:hover:not([disabled]) { background: #D4620E; }
.lpa-submit-btn[disabled] { background: #ccc; cursor: not-allowed; }
.lpa-success-wrap { display: none; padding: 32px 24px; text-align: center; }
.lpa-success-icon { font-size: 48px; margin-bottom: 14px; }
.lpa-success-wrap h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.lpa-success-wrap p  { font-size: 14px; color: #888; line-height: 1.7; margin-bottom: 20px; }

/* ── Flag badge (real image) ────────────────────────────── */
.lpa-flag-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.lpa-flag-badge img {
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  display: inline-block;
  vertical-align: middle;
}

/* ── Pagination ─────────────────────────────────────────── */
.lpa-page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  background: #fff; color: #333;
  border: 1px solid #ddd; border-radius: 6px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.lpa-page-btn:hover:not([disabled]) { border-color: #C0392B; color: #C0392B; }
.lpa-page-btn[disabled] { opacity: .4; cursor: default; }
.lpa-page-active {
  background: #C0392B !important;
  color: #fff !important;
  border-color: #C0392B !important;
}
