/* Enquiry modal + mobile action bar. Loaded on every page, including the
   older Bootstrap layouts, so everything is namespaced with .tl- and sets
   its own box model and fonts. */
.tl-modal, .tl-modal *, .tl-bar, .tl-bar * { box-sizing: border-box; }
.tl-hidden { display: none !important; }

/* ---- modal ---- */
.tl-modal { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: flex-end; justify-content: center; }
.tl-modal[hidden] { display: none; }
.tl-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 37, 48, .55); }
.tl-modal-panel {
  position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; background: #fff; color: #2b4350;
  border-radius: 18px 18px 0 0; padding: 22px 18px 18px; box-shadow: 0 20px 50px rgba(15, 37, 48, .25);
  font: 400 15px/1.5 Poppins, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (min-width: 640px) {
  .tl-modal { align-items: center; padding: 16px; }
  .tl-modal-panel { border-radius: 18px; padding: 26px 26px 22px; }
}
.tl-modal-title { margin: 0 32px 4px 0; color: #0f2530; font: 600 20px/1.3 Poppins, system-ui, sans-serif; }
.tl-modal-sub { margin: 0 0 16px; font-size: 14px; color: #5a6f7b; }
.tl-close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 10px; border: 0;
  background: #f1f5f7; color: #0f2530; font-size: 22px; line-height: 1; cursor: pointer;
}
.tl-field { display: block; margin: 0 0 12px; }
.tl-field > span { display: block; margin: 0 0 5px; font-size: 13px; font-weight: 500; color: #0f2530; }
.tl-field > span em { font-style: normal; color: #5a6f7b; font-weight: 400; }
.tl-modal input, .tl-modal select, .tl-modal textarea {
  display: block; width: 100%; min-width: 0; min-height: 46px; margin: 0; padding: 10px 12px;
  border: 1px solid #cdd8df; border-radius: 10px; background: #fff; color: #0f2530; font-size: 16px; line-height: 1.4;
  box-shadow: none; -webkit-appearance: none; appearance: none;
}
.tl-modal select { background-image: linear-gradient(45deg, transparent 50%, #5a6f7b 50%), linear-gradient(135deg, #5a6f7b 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.tl-modal textarea { min-height: 80px; resize: vertical; }
.tl-modal input:focus, .tl-modal select:focus, .tl-modal textarea:focus { outline: none; border-color: #027ea3; box-shadow: 0 0 0 3px rgba(2, 126, 163, .18); }
.tl-row { display: grid; gap: 0 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 480px) { .tl-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tl-submit {
  display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; margin-top: 4px;
  border: 0; border-radius: 999px; background: #027ea3; color: #fff; font: 600 16px/1.25 Poppins, system-ui, sans-serif;
  cursor: pointer; white-space: normal; text-align: center;
}
.tl-submit:hover { background: #036687; }
.tl-submit[disabled] { opacity: .7; cursor: wait; }
.tl-note { margin: 10px 0 0; font-size: 12px; color: #5a6f7b; }
.tl-alt { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 0; font-size: 14px; }
.tl-alt a { color: #027ea3; font-weight: 500; text-decoration: none; }
.tl-errors { background: #fdecea; color: #7a1c13; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.tl-errors ul { margin: 0; padding-left: 18px; }
.tl-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---- mobile action bar ---- */
.tl-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147482000; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e2e9ee;
  box-shadow: 0 -6px 20px rgba(15, 37, 48, .08); font: 600 14px/1.2 Poppins, system-ui, sans-serif;
}
.tl-bar a, .tl-bar button {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 6px 8px; border-radius: 12px;
  border: 1px solid #d4e2e9; background: #fff; color: #0f2530 !important; text-decoration: none !important; font: inherit; cursor: pointer;
  text-align: center; white-space: normal; min-width: 0;
}
.tl-bar svg { width: 18px; height: 18px; flex: none; }
.tl-bar .tl-wa { color: #13733b !important; }
.tl-bar .tl-quote { background: #027ea3; border-color: #027ea3; color: #fff !important; }
@media (min-width: 1024px) { .tl-bar { display: none; } }
@media (max-width: 1023px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  /* keep the older floating WhatsApp/Messenger buttons clear of the bar */
  .float_btn_main { transform: translateY(-70px); }
}
@media print { .tl-bar, .tl-modal { display: none !important; } }

/* ---- "guides for this course" block on course pages ---- */
.tl-guides { background: #f4f8fa; border-top: 1px solid #e2e9ee; padding: 40px 16px; font-family: Poppins, system-ui, sans-serif; }
.tl-guides-inner { max-width: 1140px; margin: 0 auto; }
.tl-guides h2 { margin: 0 0 16px; font-size: 24px; line-height: 1.3; color: #0f2530; font-weight: 600; }
.tl-guides ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .tl-guides ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tl-guides ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tl-guides li { min-width: 0; }
.tl-guides li a { display: block; height: 100%; padding: 14px 16px; background: #fff; border: 1px solid #e2e9ee; border-radius: 12px; color: #0f2530; text-decoration: none; font-size: 15px; line-height: 1.45; font-weight: 500; }
.tl-guides li a:hover { border-color: #01a4cd; color: #027ea3; }
.tl-guides-all { display: inline-block; margin-top: 16px; color: #027ea3; font-weight: 600; text-decoration: none; }

/* keep modal typography stable on the older Bootstrap pages */
.tl-modal p, .tl-modal label, .tl-modal span, .tl-modal a, .tl-modal li { font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.5; letter-spacing: normal; }
.tl-modal .tl-modal-sub { font-size: 14px; margin: 0 0 16px; }
.tl-modal .tl-note { font-size: 12px; margin: 10px 0 0; }
.tl-modal label { font-weight: normal; margin: 0 0 12px; }

/* On article pages the bar slides away while reading down and returns on scroll up,
   near the end of the page, or when it receives keyboard focus (site.js). */
.tl-bar { transition: transform .2s ease; }
body.tl-bar-away .tl-bar { transform: translateY(120%); }
body.tl-bar-away .tl-bar:focus-within { transform: none; }
@media (prefers-reduced-motion: reduce) { .tl-bar { transition: none; } }
