/* ==========================================================================
   ระบบจองเข้าชมศูนย์การเรียนรู้ รฟม. (mrta-booking)
   ใช้ร่วมกันทุกหน้า: หน้าแรก / จองเต็ม / กิจกรรม / ตรวจสอบการจอง / เงื่อนไข
   --------------------------------------------------------------------------
   โทนสีอ้างอิง front/color/main.css (--bs-primary-900 / --bs-secondary-900)
   แต่ประกาศตัวแปรของตัวเองไว้ เพื่อให้ปรับเฉพาะหน้าจองได้โดยไม่กระทบทั้งเว็บ
   ========================================================================== */

:root {
    --bk-navy:        #16306b;   /* ปุ่มหลัก / หัวเรื่อง */
    --bk-navy-deep:   #102454;   /* ปุ่มหลักตอน hover */
    --bk-navy-soft:   #eaf0fb;   /* พื้นอ่อนของไอคอน */
    --bk-red:         #a8151c;   /* ปุ่มดำเนินการต่อ / วันที่เลือก - ขาวบนแดง 7.5:1 (เดิม #d82028 = 5:1) */
    --bk-red-deep:    #8f1218;
    --bk-red-soft:    #fde6e8;
    --bk-green:       #0b5a3a;   /* ที่นั่งว่าง - WCAG AAA 7:1 ทั้งเป็นตัวหนังสือและเป็นพื้นตัวขาว (เดิม #12873d = 4.6:1) */
    --bk-amber:       #eab308;   /* ใกล้เต็ม */
    --bk-text:        #1f2a44;
    --bk-muted:       #454f69;   /* WCAG AAA 7:1 บนพื้นขาว/พื้นหน้า (เดิม #636e88 = 5.1:1) */
    --bk-faint:       #9aa4bd;
    --bk-line:        #e4eaf5;
    --bk-line-soft:   #eef2fa;
    --bk-page:        #f4f7fc;
    --bk-card-shadow: 0 6px 28px rgba(22, 48, 107, .07);
    --bk-radius:      16px;
}

/* ── โครงหน้า ─────────────────────────────────────────────────────────── */
.bk-page {
    background: var(--bk-page);
    padding-bottom: 4rem;
    color: var(--bk-text);
}

.bk-container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4.5vw, 5.5rem);
}

.bk-stack > * + * {
    margin-top: clamp(1.25rem, 2vw, 1.75rem);
}

/* กริด 2 คอลัมน์เท่ากัน (จองเร็ว|กิจกรรม และ ตรวจสอบ|เงื่อนไข) */
.bk-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.25rem, 2vw, 1.75rem);
    align-items: start;
}

/* ── การ์ดมาตรฐาน ─────────────────────────────────────────────────────── */
.bk-card {
    background: #fff;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    box-shadow: var(--bk-card-shadow);
    padding: clamp(1.25rem, 2vw, 1.9rem);
}

.bk-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.bk-card-title {
    color: var(--bk-navy);
    font-weight: 700;
    font-size: clamp(1.15rem, 1.5vw, 1.5rem);
    line-height: 1.35;
    margin: 0;
}

.bk-card-subtitle {
    color: var(--bk-muted);
    font-size: .875rem;
    margin: .35rem 0 0;
}

.bk-link-all {
    color: var(--bk-navy);
    font-weight: 600;
    font-size: .92rem;
    text-decoration: none;
    white-space: nowrap;
    flex: none;
}
.bk-link-all:hover { color: var(--bk-red); }

/* ── ปุ่ม ─────────────────────────────────────────────────────────────── */
.bk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .72rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s, color .18s, border-color .18s, box-shadow .18s;
}

.bk-btn-navy        { background: var(--bk-navy); color: #fff; }
.bk-btn-navy:hover  { background: var(--bk-navy-deep); color: #fff; }

.bk-btn-red         { background: var(--bk-red); color: #fff; }
.bk-btn-red:hover   { background: var(--bk-red-deep); color: #fff; }

.bk-btn-outline-red        { background: #fff; color: var(--bk-red); border-color: var(--bk-red); }
.bk-btn-outline-red:hover  { background: var(--bk-red); color: #fff; }

.bk-btn-outline-navy       { background: #fff; color: var(--bk-navy); border-color: var(--bk-navy); }
.bk-btn-outline-navy:hover { background: var(--bk-navy); color: #fff; }

/* ปุ่มทรงแคปซูลที่อยู่ท้ายการ์ด ("ดูรายการกิจกรรมทั้งหมด" / "ดาวน์โหลดเอกสารทั้งหมด") */
.bk-btn-pill {
    border-radius: 50rem;
    padding: .7rem 1.9rem;
    font-weight: 600;
}

.bk-btn:disabled,
.bk-btn.is-disabled {
    opacity: .5;
    pointer-events: none;
}

.bk-card-foot {
    display: flex;
    justify-content: center;
    margin-top: 1.4rem;
}

/* ══════════════════════════════════════════════════════════════════════
   1. HERO + BREADCRUMB
   ══════════════════════════════════════════════════════════════════════ */
/* ตำแหน่ง/ขนาดชุดเดียวกับ hero ของ mrta-news (.nw-hero) - แก้ที่ใดให้แก้ทุกระบบให้ตรงกัน:
   กรอบกว้างสุด 1920 / ข้อความเยื้องซ้าย 8.5vw / หัวเรื่อง 3.7vw / คำโปรย 1.1vw / จัดกลางแนวตั้ง
   ต่างกันแค่สี: รูปของระบบจองเป็นโทนสว่าง ตัวหนังสือจึงเป็นกรมท่าบนแผ่นไล่สีขาว */
.bk-hero {
    position: relative;
    background: #e8f0fd;
    min-height: clamp(220px, 23.4vw, 450px);
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* รูป hero เป็นชั้นตกแต่ง ::after (ไม่ใช่ background ของ section) - ตัวตรวจ WCAG วัดคอนทราสต์ของหัวเรื่องได้ */
.bk-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--bk-hero-image) right center / cover no-repeat;
}

/* ไล่สีทับรูปฝั่งซ้าย เพื่อให้หัวเรื่องสีน้ำเงินเข้มอ่านออกทุกรูป
   (รูป banner เปลี่ยนได้จากหลังบ้าน จึงพึ่งความเข้มของตัวรูปเองไม่ได้) */
.bk-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg,
        rgba(244, 247, 252, .97) 0%,
        rgba(244, 247, 252, .92) 28%,
        rgba(244, 247, 252, .55) 46%,
        rgba(244, 247, 252, 0) 62%);
}

.bk-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    /* หัวเรื่องในแบบเยื้องเข้ามามากกว่าเนื้อหาด้านล่าง / ระยะล่างเผื่อการ์ดทางลัดที่ซ้อนขึ้นมา 2rem */
    padding: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 8.5vw, 10.25rem) clamp(2rem, 4vw, 4.5rem);
    /* หัวเรื่องเยื้องเข้ามาจากตัวหนังสือของ breadcrumb ("หน้าหลัก" = หมุด 15px + ช่อง 8px = 23px) อีก 2vw */
    padding-left: calc(clamp(1rem, 8.5vw, 10.25rem) + 23px + 2vw);
}

/* breadcrumb เฉพาะของหน้าระบบจอง - "หน้าหลัก > จองเข้าชม"
   แถบกรมท่าเต็มความกว้างใต้ header แบบเดียวกับ e-Learning (อยู่นอก .bk-hero)
   ตั้งใจไม่กำหนดฟอนต์ (ตระกูล/ขนาด/น้ำหนัก) ให้ใช้ฟอนต์ปกติของหน้า
   ระยะซ้ายขวาเท่าเนื้อหาด้านล่าง (hero เยื้องเข้าไปมากกว่า ตามแบบของ mrta-news) */
.bk-breadcrumb {
    background: #002777;
}
.bk-breadcrumb-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 .6rem;
    min-height: 38px;
    margin: 0 auto;
}
.bk-breadcrumb-inner:not(.container) {
    max-width: 1800px;
    padding: .35rem clamp(1rem, 4.5vw, 5.5rem);
}
/* แบบ contained: ความกว้าง/ระยะขอบมาจาก .container ของ bootstrap (ชุดเดียวกับหน้ารายการของ mrta-news) */
.bk-breadcrumb-inner.container {
    min-height: 42px;
    padding-top: .35rem;
    padding-bottom: .35rem;
    font-size: 14px;
}
.bk-breadcrumb a {
    color: #8597be; /* สว่างขึ้นเล็กน้อยให้คอนทราสต์ผ่าน 4.5:1 บนพื้น #002777 */
    text-decoration: none;
}
.bk-breadcrumb a:hover { color: #fff; }
.bk-breadcrumb-home {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.bk-breadcrumb-home img { width: 15px; height: auto; }
.bk-breadcrumb i        { font-size: .7em; color: #fff; }
.bk-breadcrumb .current { color: #fff; }

.bk-hero-title {
    color: #002777;   /* กรมท่าตามแบบ - ชุดเดียวกับ hero ของ news / about-us / e-Learning */
    font-family: var(--bs-font-primary);
    font-weight: 700;
    font-size: clamp(2rem, 3.7vw, 4.5rem);
    line-height: 1.2;
    margin: 0 0 clamp(.6rem, 1.2vw, 1.4rem);
}

/* "ชม" สีแดงตามแบบ - หัวเรื่องเป็นตัวอักษรใหญ่ เกณฑ์ AAA 4.5:1 */
.bk-hero-accent { color: #c8102e; }
.bk-hero-desc {
    color: #002777;
    font-family: var(--bs-font-primary);
    font-size: clamp(.9rem, 1.1vw, 1.35rem);
    font-weight: 500;
    line-height: 1.95;
    margin: 0;
    max-width: 36em;
}

/* ══════════════════════════════════════════════════════════════════════
   2. การ์ดทางลัด 4 ช่อง
   ══════════════════════════════════════════════════════════════════════ */
.bk-quicknav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #fff;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    box-shadow: var(--bk-card-shadow);
    overflow: hidden;
    /* การ์ดลอยคร่อมรอยต่อ hero กับเนื้อหาเล็กน้อย ตามแบบดีไซน์
       ใช้ค่าคงที่ ไม่ใช่ vw เพราะจอกว้างมากจะดูดการ์ดขึ้นไปทับหัวเรื่องในรูป */
    margin-top: -2rem;
    position: relative;
    z-index: 2;
}

.bk-quicknav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: clamp(1.4rem, 2vw, 2.1rem) clamp(1rem, 1.6vw, 1.75rem);
    position: relative;
}

/* เส้นแบ่งสั้นกลางช่อง - เส้นเดียวบาง ๆ ตามแบบ */
.bk-quicknav-item + .bk-quicknav-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12%;
    height: 76%;
    width: 1px;
    background: var(--bk-line);
}

.bk-quicknav-icon {
    color: var(--bk-navy);
    font-size: 2.1rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.bk-quicknav-title {
    color: var(--bk-navy);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.5;
    margin: 0 0 .5rem;
}

.bk-quicknav-desc {
    color: var(--bk-muted);
    font-size: .86rem;
    line-height: 1.75;
    margin: 0 0 1.35rem;
}

/* ปุ่มทุกช่องต้องอยู่ระดับเดียวกัน แม้คำอธิบายยาวไม่เท่ากัน */
.bk-quicknav-item .bk-btn { margin-top: auto; }

/* ══════════════════════════════════════════════════════════════════════
   3. ขั้นตอนการจอง (1 → 2 → 3)
   ══════════════════════════════════════════════════════════════════════ */
.bk-steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--bk-line);
    margin-bottom: 1.5rem;
}

.bk-step {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.bk-step-no {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bk-navy);
    color: #fff;
    font-size: .92rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* ขั้นที่กำลังทำอยู่เป็นวงแดง ตามแบบ */
.bk-step.is-active .bk-step-no { background: var(--bk-red); }

.bk-step-label {
    color: var(--bk-navy);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.4;
}

.bk-step-arrow {
    color: var(--bk-faint);
    font-size: .8rem;
}

/* ══════════════════════════════════════════════════════════════════════
   4. ปฏิทิน + รอบเวลา
   ══════════════════════════════════════════════════════════════════════ */
.bk-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1rem, 2vw, 1.75rem);
    align-items: start;
}

.bk-field-label {
    color: var(--bk-navy);
    font-weight: 700;
    font-size: 1.02rem;
    margin: 0 0 .9rem;
}

/* ---- ปฏิทิน ---- */
.bk-calendar {
    border: 1px solid var(--bk-line);
    border-radius: 12px;
    padding: .9rem 1rem 1.1rem;
    /* ปฏิทินไม่ควรยืดตามความกว้างของคอลัมน์ - ในหน้าจองเต็มคอลัมน์กว้างเกือบ 800px
       ถ้าปล่อยให้ยืด ช่องวันจะบานจนปฏิทินสูงกว่าครึ่งหน้าจอ */
    max-width: 400px;
}

.bk-cal-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: .6rem;
}

.bk-cal-title {
    color: var(--bk-navy);
    font-weight: 700;
    font-size: 1rem;
    min-width: 8.5em;
    text-align: center;
}

.bk-cal-nav {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    border-radius: 50%;
    color: var(--bk-navy);
    font-size: .8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .15s;
}
.bk-cal-nav:hover:not(:disabled) { background: var(--bk-navy-soft); }
.bk-cal-nav:disabled { color: var(--bk-line); cursor: default; }

.bk-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
}

.bk-cal-dow {
    text-align: center;
    color: var(--bk-muted);
    font-size: .82rem;
    font-weight: 600;
    padding: .5rem 0;
}

/* ช่องวันเป็นวงกลมขนาดคงที่ วางกึ่งกลางช่องกริด
   ห้ามใช้ aspect-ratio เพราะความสูงจะวิ่งตามความกว้างของคอลัมน์
   (และ border-radius:50% บนช่องที่กว้างกว่าสูงจะได้วงรี ไม่ใช่วงกลม) */
.bk-cal-day {
    position: relative;
    width: 36px;
    height: 36px;
    justify-self: center;
    border: 0;
    background: transparent;
    border-radius: 50%;
    color: var(--bk-text);
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .15s, color .15s;
}
.bk-cal-day:hover:not(:disabled):not(.is-selected) { background: var(--bk-navy-soft); }

/* วันของเดือนก่อน/ถัดไป และวันที่เลือกไม่ได้ - จางลง กดไม่ได้ */
.bk-cal-day.is-muted { color: var(--bk-faint); }
.bk-cal-day:disabled { color: #c3cbdd; cursor: default; }

/* วันที่เลือกอยู่ - วงกลมแดงทึบ ตัวหนังสือขาว (ตามแบบ) */
.bk-cal-day.is-selected {
    background: var(--bk-red);
    color: #fff;
    font-weight: 700;
}

/* จุดบอกสถานะที่นั่งใต้ตัวเลข ตรงกับคำอธิบายสีใต้ปฏิทิน
   วางแบบ absolute เพื่อไม่ให้ตัวเลขเลื่อนออกจากกึ่งกลางช่อง */
.bk-cal-dot {
    position: absolute;
    left: 50%;
    bottom: 3px;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
}
.bk-cal-dot-available   { background: var(--bk-green); }
.bk-cal-dot-nearly_full { background: var(--bk-amber); }
.bk-cal-dot-full        { background: var(--bk-red); }
.bk-cal-day.is-selected .bk-cal-dot { background: rgba(255, 255, 255, .85); }

.bk-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    margin-top: 1rem;
    font-size: .85rem;
    color: var(--bk-muted);
}
.bk-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.bk-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}
.bk-legend .dot-available   { background: var(--bk-green); }
.bk-legend .dot-nearly_full { background: var(--bk-amber); }
.bk-legend .dot-full        { background: var(--bk-red); }

/* ---- รอบเวลา ---- */
.bk-slots {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.bk-slot {
    display: flex;
    align-items: center;
    gap: .85rem;
    border: 1px solid var(--bk-line);
    border-radius: 10px;
    padding: .7rem 1rem;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
    margin: 0;
}
.bk-slot:hover:not(.is-disabled) { border-color: #b9c8e6; }

/* รอบที่เลือกอยู่ - ขอบน้ำเงิน + เงาจาง ๆ ตามแบบ */
.bk-slot.is-selected {
    border-color: #3f6ad8;
    box-shadow: 0 0 0 3px rgba(63, 106, 216, .12);
}

.bk-slot.is-disabled {
    opacity: .55;
    cursor: not-allowed;
    background: #fafbfe;
}

/* ปุ่มวงกลม (radio) วาดเอง เพื่อให้ขนาด/สีตรงกับแบบทุกเบราว์เซอร์ */
.bk-slot input { position: absolute; opacity: 0; pointer-events: none; }

.bk-slot-radio {
    flex: none;
    width: 18px;
    height: 18px;
    border: 2px solid #c6cfe3;
    border-radius: 50%;
    position: relative;
    transition: border-color .15s;
}
.bk-slot.is-selected .bk-slot-radio { border-color: #3f6ad8; }
.bk-slot.is-selected .bk-slot-radio::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #3f6ad8;
}

.bk-slot-body { min-width: 0; }

.bk-slot-time {
    color: var(--bk-text);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.5;
}

.bk-slot-seats {
    font-size: .84rem;
    line-height: 1.5;
    color: var(--bk-muted);
}
.bk-slot-seats .left-available   { color: var(--bk-green); font-weight: 600; }
.bk-slot-seats .left-nearly_full { color: #986d00;         font-weight: 600; }
.bk-slot-seats .left-full        { color: var(--bk-red);   font-weight: 600; }

.bk-slots-empty {
    border: 1px dashed var(--bk-line);
    border-radius: 10px;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--bk-muted);
    font-size: .9rem;
}

/* ปุ่ม "ดำเนินการต่อ" ชิดขวาใต้คอลัมน์รอบเวลา */
.bk-picker-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

/* ══════════════════════════════════════════════════════════════════════
   5. กิจกรรมพิเศษ
   ══════════════════════════════════════════════════════════════════════ */
.bk-event-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.bk-event-row {
    display: grid;
    grid-template-columns: 172px minmax(0, 1fr) auto;
    gap: 1.1rem;
    align-items: stretch;
}

.bk-event-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bk-navy-soft);
    flex: none;
}
.bk-event-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bk-event-main { min-width: 0; }

.bk-badge {
    display: inline-block;
    padding: .2rem .7rem;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.6;
}
.bk-badge-open   { background: var(--bk-red-soft); color: var(--bk-red); }
.bk-badge-closed { background: #eef1f6; color: var(--bk-muted); }

.bk-event-title {
    color: var(--bk-navy);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.55;
    margin: .55rem 0 .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
a.bk-event-title { text-decoration: none; display: block; }
a.bk-event-title:hover { color: var(--bk-red); }

.bk-event-meta {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    color: var(--bk-muted);
    font-size: .85rem;
    line-height: 1.55;
}
.bk-event-meta > span {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    min-width: 0;
}
.bk-event-meta i {
    color: var(--bk-navy);
    font-size: .8rem;
    width: 1em;
    text-align: center;
    margin-top: .25rem;
    flex: none;
}
.bk-event-meta .meta-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* บรรทัด "รับสมัครถึง ..." ใช้ไอคอนเตือนสีส้ม ตามแบบ */
.bk-event-meta .meta-deadline i { color: #e08b00; }

.bk-event-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75rem;
    text-align: right;
    flex: none;
}

.bk-event-seats {
    font-size: .88rem;
    line-height: 1.6;
    white-space: nowrap;
}
.bk-event-seats .seats-left  { color: var(--bk-green); font-weight: 600; display: block; }
.bk-event-seats .seats-full  { color: var(--bk-red);   font-weight: 600; display: block; }
.bk-event-seats .seats-total { color: var(--bk-muted); display: block; }

.bk-event-side .bk-btn {
    padding: .55rem 1.25rem;
    font-size: .9rem;
}

/* ══════════════════════════════════════════════════════════════════════
   6. ตรวจสอบ / ยกเลิกการจอง (+ ภาพโทรศัพท์)
   ══════════════════════════════════════════════════════════════════════ */
.bk-check-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: clamp(1rem, 2vw, 2rem);
    align-items: center;
}

.bk-input-group {
    position: relative;
    margin-bottom: .85rem;
}
.bk-input-group > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bk-faint);
    font-size: .9rem;
    pointer-events: none;
}
.bk-input {
    width: 100%;
    border: 1px solid var(--bk-line);
    border-radius: 9px;
    padding: .78rem 1rem .78rem 2.6rem;
    font-size: .92rem;
    color: var(--bk-text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.bk-input::placeholder { color: var(--bk-faint); }
.bk-input:focus {
    outline: 0;
    border-color: #3f6ad8;
    box-shadow: 0 0 0 3px rgba(63, 106, 216, .12);
}
.bk-input.is-invalid { border-color: var(--bk-red); }

.bk-check-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
}
.bk-check-actions .bk-btn { flex: 1 1 0; min-width: 9rem; }

/* ---- โทรศัพท์จำลองโชว์บัตรเข้าชม ---- */
.bk-phone {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    border: 7px solid #1f2a44;
    border-radius: 26px;
    background: #fff;
    padding: 1.1rem .85rem 1.25rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(22, 48, 107, .16);
    position: relative;
}
/* ลำโพงบนหัวเครื่อง */
.bk-phone::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 4px;
    border-radius: 3px;
    background: #d6dbe6;
}
.bk-phone-logo {
    height: 26px;
    margin: .35rem auto .8rem;
    display: block;
    max-width: 100%;
    object-fit: contain;
}
.bk-phone-qr {
    width: 118px;
    height: 118px;
    margin: 0 auto;
}
.bk-phone-qr svg { width: 100%; height: 100%; display: block; }
.bk-phone-caption {
    color: var(--bk-muted);
    font-size: .74rem;
    margin-top: .7rem;
    line-height: 1.5;
}
.bk-phone-code {
    color: var(--bk-navy);
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .02em;
}

/* ══════════════════════════════════════════════════════════════════════
   7. เงื่อนไขและวิธีการจอง (ดาวน์โหลดเอกสาร)
   ══════════════════════════════════════════════════════════════════════ */
.bk-doc-list {
    display: flex;
    flex-direction: column;
}

.bk-doc-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 28px;
    gap: .9rem;
    align-items: center;
    padding: .85rem 0;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--bk-line-soft);
    transition: background-color .15s;
}
.bk-doc-row:last-child { border-bottom: 0; }
.bk-doc-row:hover { background: #f8fafe; }

.bk-doc-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bk-navy-soft);
    color: var(--bk-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex: none;
}

.bk-doc-title {
    color: var(--bk-navy);
    font-weight: 700;
    font-size: .95rem;
    line-height: 1.5;
}
.bk-doc-desc {
    color: var(--bk-muted);
    font-size: .84rem;
    line-height: 1.55;
    margin-top: .12rem;
}

.bk-doc-dl {
    color: var(--bk-navy);
    font-size: 1rem;
    text-align: center;
}
.bk-doc-row:hover .bk-doc-dl { color: var(--bk-red); }

/* ══════════════════════════════════════════════════════════════════════
   8. ฟอร์มผู้จอง (หน้าจองเต็ม) + หน้ายืนยัน
   ══════════════════════════════════════════════════════════════════════ */
.bk-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}
.bk-form-grid .bk-col-full { grid-column: 1 / -1; }

.bk-label {
    display: block;
    color: var(--bk-navy);
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .4rem;
}
.bk-label .req { color: var(--bk-red); }

.bk-input-plain {
    width: 100%;
    border: 1px solid var(--bk-line);
    border-radius: 9px;
    padding: .72rem 1rem;
    font-size: .92rem;
    color: var(--bk-text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.bk-input-plain:focus {
    outline: 0;
    border-color: #3f6ad8;
    box-shadow: 0 0 0 3px rgba(63, 106, 216, .12);
}
.bk-input-plain.is-invalid { border-color: var(--bk-red); }
textarea.bk-input-plain { min-height: 96px; resize: vertical; }

.bk-error {
    color: var(--bk-red);
    font-size: .82rem;
    margin-top: .3rem;
}

.bk-hint {
    color: var(--bk-muted);
    font-size: .82rem;
    margin-top: .3rem;
}

.bk-checkline {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: .9rem;
    color: var(--bk-text);
    line-height: 1.7;
}
.bk-checkline input { margin-top: .35rem; flex: none; }
.bk-checkline a { color: var(--bk-navy); font-weight: 600; }

/* สรุปสิ่งที่เลือกไว้ก่อนกดยืนยัน */
.bk-summary {
    background: #f7f9fe;
    border: 1px solid var(--bk-line);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
}
.bk-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .42rem 0;
    font-size: .92rem;
}
.bk-summary-row + .bk-summary-row { border-top: 1px dashed var(--bk-line); }
.bk-summary-row dt { color: var(--bk-muted); font-weight: 400; margin: 0; }
.bk-summary-row dd { color: var(--bk-navy); font-weight: 600; margin: 0; text-align: right; }

/* ---- หน้ายืนยันการจองสำเร็จ / บัตรเข้าชม ---- */
.bk-ticket {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}
.bk-ticket-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #e7f7ee;
    color: var(--bk-green);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.1rem;
}
.bk-ticket-icon.is-cancelled { background: var(--bk-red-soft); color: var(--bk-red); }
.bk-ticket-code {
    display: inline-block;
    background: var(--bk-navy-soft);
    color: var(--bk-navy);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: .04em;
    padding: .5rem 1.4rem;
    border-radius: 9px;
    margin: .5rem 0 1.2rem;
}
.bk-ticket-qr {
    width: 220px;
    height: 220px;
    margin: 0 auto 1.2rem;
    padding: .75rem;
    border: 1px solid var(--bk-line);
    border-radius: 14px;
    background: #fff;
}
.bk-ticket-qr svg { width: 100%; height: 100%; display: block; }
.bk-ticket-actions {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.4rem;
}

/* ══════════════════════════════════════════════════════════════════════
   9. ส่วนประกอบย่อยอื่น ๆ
   ══════════════════════════════════════════════════════════════════════ */
.bk-alert {
    border-radius: 10px;
    padding: .85rem 1.1rem;
    font-size: .9rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    display: flex;
    gap: .6rem;
    align-items: flex-start;
}
.bk-alert i { margin-top: .2rem; }
.bk-alert-success { background: #e7f7ee; color: #14663c; }
.bk-alert-danger  { background: var(--bk-red-soft); color: #99161c; }
.bk-alert-info    { background: var(--bk-navy-soft); color: var(--bk-navy); }
.bk-alert-warning { background: #fff5e0; color: #8a5a00; }

.bk-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bk-muted);
}
.bk-empty i { font-size: 2.4rem; color: #c9d4ea; display: block; margin: 0 auto .9rem; } /* ไอคอน FA กว้างตามตัวเอง - text-align ไม่จัดให้ ต้อง margin auto */

.bk-status-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .28rem .85rem;
    border-radius: 50rem;
    font-size: .84rem;
    font-weight: 600;
}
.bk-status-success   { background: #e7f7ee; color: #14663c; }
.bk-status-danger    { background: var(--bk-red-soft); color: #99161c; }
.bk-status-info      { background: var(--bk-navy-soft); color: var(--bk-navy); }
.bk-status-warning   { background: #fff5e0; color: #8a5a00; }
.bk-status-secondary { background: #eef1f6; color: var(--bk-muted); }

/* ══════════════════════════════════════════════════════════════════════
   หน้ารายการ (กิจกรรมพิเศษทั้งหมด) - ชุดเดียวกับหน้ารายการของ mrta-news (news.css .nw-listpage)
   สเกลเดียวกับ belib: เนื้อหาอยู่ใน .container (กว้างสุด 1320px) ขนาดเป็น px คงที่ ไม่ขยายตาม vw
   การ์ดอยู่ใน event-list.css
   ══════════════════════════════════════════════════════════════════════ */
/* หัวหน้ารายการ (component sub-banner) - หัวเรื่องกลางหน้า แทนแบนเนอร์รูป ตามแบบ
   เส้นเทาบาง มีขีดแดงหนาตรงกลาง - ค่าเดียวกับ .nw-heading ของ mrta-news / หน้าเกี่ยวกับเราของ portal
   ระยะล่างของหัวเรื่องเป็นระยะถึงแถบเครื่องมือแล้ว .bk-listpage ที่ตามมาจึงไม่ต้องเว้นบนซ้ำ */
.bk-list-head { padding-top: clamp(2rem, 2.9vw, 3.5rem); }
.bk-list-head + .bk-listpage { padding-top: 0; }
.bk-heading {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto clamp(1.5rem, 2.1vw, 2.5rem);
    padding-bottom: clamp(.7rem, 1vw, 1.1rem);
    color: #002777;
    font-family: var(--bs-font-primary);
    font-weight: 700;
    font-size: clamp(1.45rem, 2.3vw, 2.75rem);
    line-height: 1.35;
    text-align: center;
}
.bk-heading::before,
.bk-heading::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.bk-heading::before {
    bottom: 1px;
    width: max(100%, min(330px, 80vw));
    border-top: 1px solid #b9c3d8;
}
.bk-heading::after {
    bottom: 0;
    width: clamp(48px, 3.9vw, 75px);
    border-top: 4px solid #a8151c;
}
.bk-listpage { padding-top: 40px; }
.bk-listpage .pagination-custom { margin-top: 40px; }

/* แบนเนอร์หัวหน้ารายการ (component sub-banner) - ภาพท้องฟ้า banner-sub.png
   หัวเรื่องขาวกลางภาพ มีขีดแดงนำหน้า */
.bk-subhero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 24px 16px;
    background: #1747c9 var(--bk-subhero-image) center / cover no-repeat;
    text-align: center;
}
.bk-subhero-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: #fff;
    font-family: var(--bs-font-primary);
    font-weight: 500;
    font-size: 36px;
    line-height: 1.3;
    text-shadow: 0 2px 14px rgba(0, 25, 90, .3);
}
.bk-subhero-title::before {
    content: "";
    flex: none;
    width: 8px;
    height: .82em;
    background: var(--bk-red);
}

/* แถบเครื่องมือ (component list-toolbar)
   ดรอปดาวน์ใช้ component select-dropdown แบบมีป้าย (.app-dd-labeled - main.css) */
.bk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 30px;
}
.bk-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
}
.bk-toolbar .app-dd {
    width: 320px;
    min-width: 0;
}
.bk-toolbar .app-dd-toggle {
    height: 40px;
    font-size: 15px;
}

/* ปุ่มสลับมุมมอง - ยกมาจาก mrta-belib (products.css .btn-show-view) ขนาดเดียวกับ mrta-news
   เป็นลิงก์ ?view= ไม่ต้องมี JS */
.bk-views {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-show-view {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background-color: #EDF1F8;
    color: #B4BDCE;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}
.btn-show-view:hover { color: var(--bk-navy); }
.btn-show-view.active { background-color: var(--bs-secondary-900); color: #fff; }
.btn-show-view:focus-visible { outline: 3px solid rgba(85, 112, 208, .55); outline-offset: 2px; }

@media (max-width: 767.98px) {
    .bk-subhero { min-height: 130px; }
    .bk-subhero-title { font-size: 28px; }

    /* ดรอปดาวน์เต็มแถว ปุ่มสลับมุมมองลงไปชิดขวาแถวถัดไป */
    .bk-toolbar-filters,
    .bk-toolbar .app-dd { width: 100%; }
    .bk-views { margin-left: auto; }
}

/* ══════════════════════════════════════════════════════════════════════
   แท็บ 3 ช่องใต้แบนเนอร์ (component booking-tabs) - จองเข้าชมศูนย์ / กิจกรรมพิเศษ / ตรวจสอบการจอง
   สเกลเดียวกับหน้ารายการ (px คงที่ ใน .container) - ช่องที่อยู่ = พื้นฟ้าอ่อน
   ══════════════════════════════════════════════════════════════════════ */
.bk-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.bk-tab {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 78px;
    padding: 14px 22px;
    border: 1px solid #d3dbe9;
    border-radius: 6px;
    background: #fff;
    color: #002777;
    text-decoration: none;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.bk-tab:hover { border-color: #8ea4d4; color: #002777; box-shadow: 0 4px 14px rgba(0, 39, 119, .08); }
.bk-tab.is-active { background: #e6edf9; border-color: #8ea4d4; }
.bk-tab:focus-visible { outline: 3px solid rgba(85, 112, 208, .55); outline-offset: 2px; }
.bk-tab-icon { flex: none; font-size: 32px; line-height: 1; }
.bk-tab-text { display: flex; flex-direction: column; min-width: 0; }
.bk-tab-title {
    font-family: var(--bs-font-primary);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.3;
}
/* แท็บที่เลือกอยู่มีพื้น #e6edf9 - เข้มกว่า --bk-muted จึงถึง 7:1 ทั้งบนพื้นขาวและพื้นแท็บ */
.bk-tab-desc { color: #3d4660; font-size: 14px; line-height: 1.4; }

@media (max-width: 767.98px) {
    .bk-tabs { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .bk-tab { min-height: 64px; padding: 10px 16px; }
    .bk-tab-icon { font-size: 26px; width: 30px; text-align: center; }
    .bk-tab-title { font-size: 18px; }
}

/* ══════════════════════════════════════════════════════════════════════
   10. จอเล็ก
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1399.98px) {
    .bk-event-row { grid-template-columns: 148px minmax(0, 1fr) auto; }
}

@media (max-width: 1199.98px) {
    .bk-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .bk-quicknav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* สองคอลัมน์แล้ว เส้นแบ่งของช่องซ้ายล่างต้องหาย ไม่งั้นมีเส้นลอยกลางแถว */
    .bk-quicknav-item:nth-child(odd)::before { display: none; }
    .bk-quicknav-item:nth-child(n + 3) { border-top: 1px solid var(--bk-line); }
}

@media (max-width: 991.98px) {
    .bk-hero::before {
        background: linear-gradient(180deg,
            rgba(244, 247, 252, .96) 0%,
            rgba(244, 247, 252, .88) 55%,
            rgba(244, 247, 252, .75) 100%);
    }
    .bk-picker { grid-template-columns: minmax(0, 1fr); }
    .bk-check-body { grid-template-columns: minmax(0, 1fr); }
    .bk-phone { margin-top: .5rem; }
    .bk-form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767.98px) {
    .bk-hero::after { background-position: 72% center; }
    .bk-hero-inner { padding-inline: clamp(1rem, 4.7vw, 5.75rem); padding-left: calc(clamp(1rem, 4.7vw, 5.75rem) + 23px); }

    .bk-quicknav {
        grid-template-columns: minmax(0, 1fr);
        margin-top: 1rem;
    }
    .bk-quicknav-item::before { display: none !important; }
    .bk-quicknav-item + .bk-quicknav-item { border-top: 1px solid var(--bk-line); }

    .bk-event-row {
        grid-template-columns: minmax(0, 1fr);
        gap: .85rem;
        padding-bottom: 1.1rem;
        border-bottom: 1px solid var(--bk-line-soft);
    }
    .bk-event-thumb { aspect-ratio: 16 / 7; }
    .bk-event-side {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        text-align: left;
    }
    .bk-event-seats .seats-left,
    .bk-event-seats .seats-full,
    .bk-event-seats .seats-total { display: inline; }

    .bk-picker-action,
    .bk-check-actions { flex-direction: column; }
    .bk-picker-action .bk-btn,
    .bk-check-actions .bk-btn { width: 100%; }

    .bk-steps { gap: .5rem .75rem; }
    .bk-step-label { font-size: .8rem; }
    .bk-step-arrow { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   11. WIZARD - จองเข้าชมทีละขั้น (หน้า /booking)
   --------------------------------------------------------------------
   หลักการ: แสดงทีละขั้น ไม่เทฟอร์มทั้งหมดใส่หน้าเดียว
   ถ้าเบราว์เซอร์ไม่รัน js จะเห็นทุกขั้นเรียงลงมาตามปกติ (ยังจองได้)
   js เป็นคนเติม data-wizard="on" ให้เท่านั้น สไตล์ซ่อนขั้นจึงผูกกับแอตทริบิวต์นั้น
   ══════════════════════════════════════════════════════════════════════ */

/* ---------- แถบความคืบหน้า ---------- */
.bk-progress {
    position: relative;
    padding: .25rem 0 1.6rem;
    margin-bottom: 1.6rem;
    border-bottom: 1px solid var(--bk-line);
}

.bk-progress-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    position: relative;
    z-index: 1;
}

/* เส้นเชื่อมระหว่างวงกลม - วางกึ่งกลางวงกลมพอดี (top = ครึ่งหนึ่งของขนาดวง) */
.bk-progress-track {
    position: absolute;
    left: 16.666%;
    right: 16.666%;
    top: calc(.25rem + 21px);
    height: 3px;
    background: var(--bk-line);
    border-radius: 3px;
    overflow: hidden;
}
.bk-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--bk-navy), var(--bk-red));
    border-radius: 3px;
    transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

.bk-pstep {
    background: none;
    border: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .55rem;
    text-align: center;
    cursor: default;
    font: inherit;
}
/* ขั้นที่ผ่านมาแล้วกดย้อนกลับได้ */
.bk-pstep.is-done { cursor: pointer; }

.bk-pstep-dot {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--bk-line);
    color: var(--bk-faint);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .3s, border-color .3s, color .3s, transform .3s;
}
.bk-pstep-dot .num { transition: opacity .2s, transform .2s; }
.bk-pstep-dot i {
    position: absolute;
    opacity: 0;
    transform: scale(.4);
    font-size: .95rem;
    transition: opacity .25s, transform .25s;
}

/* ขั้นที่กำลังทำอยู่ - วงแดงพร้อมวงกระเพื่อมรอบ ๆ */
.bk-pstep.is-active .bk-pstep-dot {
    background: var(--bk-red);
    border-color: var(--bk-red);
    color: #fff;
    transform: scale(1.06);
}
.bk-pstep.is-active .bk-pstep-dot::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--bk-red);
    opacity: 0;
    animation: bk-pulse 2s ease-out infinite;
}

/* ขั้นที่ทำเสร็จแล้ว - วงน้ำเงินพร้อมเครื่องหมายถูก */
.bk-pstep.is-done .bk-pstep-dot {
    background: var(--bk-navy);
    border-color: var(--bk-navy);
    color: #fff;
}
.bk-pstep.is-done .bk-pstep-dot .num { opacity: 0; transform: scale(.5); }
.bk-pstep.is-done .bk-pstep-dot i    { opacity: 1; transform: scale(1); }
.bk-pstep.is-done:hover .bk-pstep-dot { transform: scale(1.06); }

.bk-pstep-label {
    color: var(--bk-faint);
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.45;
    transition: color .3s;
}
.bk-pstep.is-active .bk-pstep-label,
.bk-pstep.is-done   .bk-pstep-label { color: var(--bk-navy); }

@keyframes bk-pulse {
    0%   { opacity: .55; transform: scale(1); }
    70%  { opacity: 0;   transform: scale(1.35); }
    100% { opacity: 0;   transform: scale(1.35); }
}

/* ---------- ตัวขั้นตอน ---------- */
.bk-wizard-body { position: relative; }

/* ก่อน js ทำงาน (ไม่มี data-wizard) ทุกขั้นแสดงเรียงลงมาตามปกติ */
.bk-wizard-step + .bk-wizard-step { margin-top: 2rem; }

.bk-wizard[data-wizard="on"] .bk-wizard-step {
    display: none;
    margin-top: 0;
}
.bk-wizard[data-wizard="on"] .bk-wizard-step.is-active {
    display: block;
    animation: bk-step-in .4s cubic-bezier(.22, .8, .3, 1) both;
}
/* ย้อนกลับ ให้เลื่อนมาจากอีกทาง เพื่อให้รู้สึกว่าถอยหลังจริง */
.bk-wizard[data-wizard="on"][data-dir="back"] .bk-wizard-step.is-active {
    animation-name: bk-step-in-back;
}

@keyframes bk-step-in {
    from { opacity: 0; transform: translate3d(22px, 6px, 0); }
    to   { opacity: 1; transform: none; }
}
@keyframes bk-step-in-back {
    from { opacity: 0; transform: translate3d(-22px, 6px, 0); }
    to   { opacity: 1; transform: none; }
}

/* หัวข้อของแต่ละขั้น */
.bk-step-head {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    margin-bottom: 1.4rem;
}
.bk-step-head-no {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bk-navy-soft);
    color: var(--bk-navy);
    font-weight: 700;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bk-step-head h2 { margin: 0; }

/* แถบปุ่มท้ายแต่ละขั้น */
.bk-wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--bk-line);
}
.bk-wizard-nav .spacer { flex: 1 1 auto; }

/* ---------- ลูกเล่นตอนโต้ตอบ ---------- */
/* ฟอร์มกรอกไม่ครบ - สั่นเตือนแทนการเด้ง alert */
@keyframes bk-shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}
.bk-shake { animation: bk-shake .5s cubic-bezier(.36, .07, .19, .97) both; }

/* แถวสรุปในขั้นสุดท้าย - ไล่กันขึ้นมาทีละแถว */
.bk-wizard[data-wizard="on"] .bk-wizard-step.is-active .bk-summary-row {
    animation: bk-row-in .42s ease both;
}
.bk-wizard[data-wizard="on"] .bk-wizard-step.is-active .bk-summary-row:nth-child(1) { animation-delay: .06s; }
.bk-wizard[data-wizard="on"] .bk-wizard-step.is-active .bk-summary-row:nth-child(2) { animation-delay: .12s; }
.bk-wizard[data-wizard="on"] .bk-wizard-step.is-active .bk-summary-row:nth-child(3) { animation-delay: .18s; }
.bk-wizard[data-wizard="on"] .bk-wizard-step.is-active .bk-summary-row:nth-child(4) { animation-delay: .24s; }
.bk-wizard[data-wizard="on"] .bk-wizard-step.is-active .bk-summary-row:nth-child(5) { animation-delay: .30s; }
.bk-wizard[data-wizard="on"] .bk-wizard-step.is-active .bk-summary-row:nth-child(6) { animation-delay: .36s; }

@keyframes bk-row-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* วันที่เพิ่งถูกเลือกในปฏิทิน - เด้งเล็กน้อยให้รู้ว่ากดติด */
.bk-cal-day.is-selected { animation: bk-pop .32s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes bk-pop {
    0%   { transform: scale(.72); }
    60%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* รอบเวลาที่เลือก - จุดกลางวงขยายออก */
.bk-slot.is-selected .bk-slot-radio::after { animation: bk-pop .3s cubic-bezier(.34, 1.56, .64, 1); }
.bk-slot { transform: translateZ(0); }
.bk-slot:hover:not(.is-disabled) { transform: translateY(-1px); }

/* ปุ่มกดแล้วยุบเล็กน้อย */
.bk-btn:active:not(:disabled):not(.is-disabled) { transform: translateY(1px); }

/* ระหว่างรอผลจาก ajax ของปฏิทิน */
.bk-picker-root { transition: opacity .2s; }

/* ---------- ปรากฏตัวตอนเลื่อนถึง (ใช้กับการ์ดในหน้าอื่น) ---------- */
.bk-reveal {
    opacity: 0;
    transform: translateY(18px);
}
.bk-reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity .55s ease, transform .55s cubic-bezier(.22, .8, .3, 1);
}

/* ---------- เคารพการตั้งค่าลดการเคลื่อนไหวของผู้ใช้ ---------- */
@media (prefers-reduced-motion: reduce) {
    .bk-wizard[data-wizard="on"] .bk-wizard-step.is-active,
    .bk-wizard[data-wizard="on"] .bk-wizard-step.is-active .bk-summary-row,
    .bk-cal-day.is-selected,
    .bk-slot.is-selected .bk-slot-radio::after,
    .bk-shake {
        animation: none !important;
    }
    .bk-pstep.is-active .bk-pstep-dot::after { animation: none; opacity: 0; }
    .bk-reveal { opacity: 1; transform: none; }
    .bk-progress-fill { transition: none; }
    .bk-wizard-body { transition: none !important; }
}

/* ---------- จอเล็ก ---------- */
@media (max-width: 575.98px) {
    .bk-pstep-dot { width: 36px; height: 36px; font-size: .9rem; }
    .bk-progress-track { top: calc(.25rem + 18px); }
    .bk-pstep-label { font-size: .75rem; }
    .bk-wizard-nav .bk-btn { flex: 1 1 100%; }
    .bk-wizard-nav .spacer { display: none; }
}

/* หน้าจองเต็ม: การ์ด wizard กว้างกว่าการ์ดในหน้าแรกมาก ถ้าปล่อยให้ปฏิทินกับ
   รายการรอบยืดเต็มความกว้าง จะอ่านยากเพราะตาต้องกวาดไกล จำกัดไว้ให้อยู่ในระยะสายตา */
.bk-wizard .bk-picker {
    max-width: 880px;
    gap: clamp(1.25rem, 3vw, 3rem);
}

/* แถวคำอธิบายสีใต้ปฏิทิน - ให้ชิดขอบปฏิทินเดียวกัน ไม่ลอยไปสุดคอลัมน์ */
.bk-legend { max-width: 400px; }

/* ข้อความสำหรับโปรแกรมอ่านหน้าจอ - ย้ายออกนอกจอแทน position:absolute ทับในหน้า
   ตัวตรวจ WCAG ขึ้นข้อควรระวัง "absolutely positioned" กับข้อความที่ซ้อนอยู่ในหน้า - ตอนโฟกัสยังแสดงตามปกติ (ค่าเดียวกับ news / knowledge) */
.visually-hidden:not(:focus):not(:focus-within) { left: -10000px !important; }

/* เนื้อหาเอกสารในหน้าเงื่อนไข (เดิม inline style - WCAG F24) */
.bk-doc-content { line-height: 2; color: var(--bk-text); }
