/* ═══════════════════════════════════════════════════════════════
   TLA — สมาคมห้องสมุดแห่งประเทศไทย ในพระราชูปถัมภ์ฯ
   ส่วนเสริมของหน้า สมัครสมาชิก / ตรวจสอบสถานะ / แผนที่ห้องสมุด
   ใช้ต่อยอดจาก custom.css (โครง .glg-*) โดยทุกกฎอยู่ใต้ .tla-shell
   เพื่อไม่ให้กระทบหน้าอื่นของเว็บไซต์
   ═══════════════════════════════════════════════════════════════ */

.tla-shell {
    --tla-green-900: #14301F;
    --tla-green-800: #1E5631;
    --tla-green-600: #2E7D4F;
    --tla-green-400: #4CAF6D;
    --tla-green-100: #E3F3E6;
    --tla-green-050: #F4FAF3;
    --tla-line: #E3EEE1;
    --tla-muted: #7C8A7E;

    font-family: 'Sarabun', 'Noto Sans Thai', 'Leelawadee UI', sans-serif;
    color: var(--tla-green-900);
    background:
        radial-gradient(1200px 600px at 100% -10%, #E8F5E9 0%, rgba(232, 245, 233, 0) 60%),
        radial-gradient(900px 500px at -10% 20%, #EAF6E8 0%, rgba(234, 246, 232, 0) 55%),
        #F6FBF4;
    padding-bottom: 10px;
}

/* ── HERO ────────────────────────────────────────────────────── */
.tla-shell .glg-hero { padding-top: 40px; }

.tla-shell .tla-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tla-green-600);
    background: #fff;
    border: 1px solid var(--tla-line);
    border-radius: 9999px;
    padding: 6px 14px;
    margin-bottom: 14px;
}

.tla-shell .tla-hero-eyebrow svg { width: 15px; height: 15px; }

/* ── ลิงก์ย่อยใต้ hero (สมัคร / ตรวจสอบสถานะ / แผนที่) ────────── */
.tla-subnav {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.tla-subnav a {
    font-size: 13.5px;
    font-weight: 500;
    color: #2B3D2F;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 9999px;
    border: 1px solid var(--tla-line);
    background: #fff;
    transition: background .15s, color .15s, border-color .15s;
}

.tla-subnav a:hover { border-color: #A9D5B4; background: var(--tla-green-050); }
.tla-subnav a.active { background: var(--tla-green-600); border-color: var(--tla-green-600); color: #fff; }

/* ── PLAN CARDS (ประเภทสมาชิก + ราคา) ─────────────────────────── */
.tla-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 4px;
}

@media (max-width: 640px) {
    .tla-plan-grid { grid-template-columns: 1fr; }
}

.tla-plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1.5px solid var(--tla-line);
    border-radius: 14px;
    padding: 14px 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.tla-plan-card:hover { border-color: #A9D5B4; }

.tla-plan-input { position: absolute; opacity: 0; pointer-events: none; }

.tla-plan-input:checked + .tla-plan-card {
    border-color: var(--tla-green-600);
    background: #EEF8F0;
    box-shadow: 0 0 0 3px rgba(46, 125, 79, .12);
}

.tla-plan-name { font-size: 14.5px; font-weight: 700; color: var(--tla-green-900); }
.tla-plan-note { font-size: 12px; color: var(--tla-muted); line-height: 1.5; }

.tla-plan-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--tla-green-800);
    margin-top: 4px;
}

.tla-plan-price small { font-size: 12px; font-weight: 400; color: var(--tla-muted); margin-left: 4px; }

/* ── QR พร้อมเพย์ ───────────────────────────────────────────── */
.tla-qr-mount {
    width: 190px;
    height: 190px;
    margin: 0 auto 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--tla-line);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tla-qr-mount canvas, .tla-qr-mount img, .tla-qr-mount svg { max-width: 100%; height: auto; }

.tla-qr-amount {
    font-size: 13px;
    font-weight: 700;
    color: var(--tla-green-800);
    background: var(--tla-green-100);
    border-radius: 9999px;
    padding: 4px 12px;
    display: inline-block;
    margin-bottom: 8px;
}

.tla-copy-flash {
    display: inline-block;
    font-size: 11.5px;
    color: var(--tla-green-600);
    margin-left: 6px;
    opacity: 0;
    transition: opacity .2s;
}

.tla-copy-flash.show { opacity: 1; }

/* ── กล่องบอกวิธี "ทำให้สะดวก" ───────────────────────────────── */
.tla-tips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 18px;
}

@media (max-width: 760px) {
    .tla-tips { grid-template-columns: 1fr; }
}

.tla-tip {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--tla-line);
    border-radius: 14px;
    padding: 14px;
}

.tla-tip-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--tla-green-100);
    color: var(--tla-green-600);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tla-tip-icon svg { width: 18px; height: 18px; }
.tla-tip-title { font-size: 13.5px; font-weight: 700; color: var(--tla-green-900); }
.tla-tip-text { font-size: 12px; color: var(--tla-muted); line-height: 1.55; margin-top: 2px; }

/* ── แถบสรุปยอดแบบติดขอบล่างบนมือถือ ─────────────────────────── */
/* ซ่อนด้วยคลาสแทน .hide() ของ jQuery เพราะ inline style จะชนะ media query */
.tla-hidden { display: none !important; }

.tla-mobile-bar { display: none; }

@media (max-width: 640px) {
    .tla-mobile-bar {
        position: sticky;
        bottom: 0;
        z-index: 20;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        background: #fff;
        border-top: 1px solid var(--tla-line);
        box-shadow: 0 -4px 16px rgba(20, 48, 31, .07);
        padding: 10px 14px;
        margin: 0 -18px -18px;
        border-radius: 0 0 16px 16px;
    }

    .tla-mobile-bar .k-button { flex: 1; }
    .tla-shell .glg-wizard-actions > div { display: none; }
}

/* ── หน้าตรวจสอบสถานะ ───────────────────────────────────────── */
.tla-track-card + .tla-track-card { margin-top: 16px; }

.tla-track-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.tla-track-appno { font-size: 19px; font-weight: 700; color: var(--tla-green-800); letter-spacing: .5px; }
.tla-track-meta { font-size: 12.5px; color: var(--tla-muted); }

.tla-note-box {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 14px;
}

.tla-note-box.is-warning { background: #FDF1E2; color: #A15F12; }
.tla-note-box.is-danger { background: #FBEAE8; color: #7A2E24; }
.tla-note-box.is-success { background: #E7F6ED; color: #1E5631; }

/* ── หน้าแผนที่ ─────────────────────────────────────────────── */
.tla-map-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px 16px 6px;
}

.tla-chip {
    font-size: 12.5px;
    font-weight: 500;
    color: #2B3D2F;
    background: #fff;
    border: 1px solid var(--tla-line);
    border-radius: 9999px;
    padding: 6px 13px;
    cursor: pointer;
    transition: all .15s;
    user-select: none;
}

.tla-chip:hover { border-color: #A9D5B4; }
.tla-chip.active { background: var(--tla-green-600); border-color: var(--tla-green-600); color: #fff; }

.tla-map-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

@media (max-width: 700px) {
    .tla-map-stats { grid-template-columns: repeat(2, 1fr); }
}

.tla-map-stat {
    background: #fff;
    border: 1px solid var(--tla-line);
    border-radius: 14px;
    padding: 14px 16px;
    text-align: center;
}

.tla-map-stat-value { font-size: 22px; font-weight: 700; color: var(--tla-green-800); line-height: 1.2; }
.tla-map-stat-label { font-size: 12px; color: var(--tla-muted); margin-top: 2px; }

.tla-shell #glg-map path { cursor: pointer; }

.tla-lib-link {
    display: inline-block;
    font-size: 12px;
    color: var(--tla-green-600);
    text-decoration: none;
    margin-top: 6px;
}

.tla-lib-link:hover { text-decoration: underline; }

/* ── สถานะว่าง / กำลังโหลด ───────────────────────────────────── */
.tla-empty {
    text-align: center;
    color: var(--tla-muted);
    font-size: 13.5px;
    padding: 36px 16px;
}

.tla-empty svg { width: 42px; height: 42px; color: #C7DDC0; margin-bottom: 10px; }
