/* ============================================================
   ls_auth.css : ป๊อปอัปของหน้าที่แชร์ได้ — โครง .ls-modal + ป๊อปอัปเข้าสู่ระบบ / สมัครฟรี (ls_auth_modal ใน ls_lib.php)
     + แถบเมนูผู้ยังไม่เข้าสู่ระบบ (ls_guest_nav : ปุ่มเข้าสู่ระบบ | สมัครฟรี ที่เปิดป๊อปอัป)
   ใช้ในหน้า STANDING ทุกหน้า (ls_head · ภาพโปรโมต PRO ใน daily.php ใช้โครง .ls-modal ด้วย) และหน้าแชร์ข้อสอบฟรีประจำวัน (free/index.php)
   ย้ายออกมาจาก lastst.css (2026-10-01) ค่าเดิมทุกบรรทัด · ต้องมี pro/pro.css ก่อน (ตัวแปรสี · .btn) · กล่องต้องอยู่ใน .pp
   ============================================================ */

/* ---------- แถบเมนูผู้ยังไม่เข้าสู่ระบบ (ls_guest_nav) : ไม่มีลิงก์เมนู ปุ่มเข้าสู่ระบบ | สมัครฟรี ชิดขวา ---------- */

.ls-guest-nav .topnav-user {
    margin-left: auto;
}

@media screen and (max-width: 480px) {
    .ls-guest-nav .topnav-user a:first-child i {
        display: none;   /* มือถือ : ปุ่มเข้าสู่ระบบ | สมัครฟรี ไม่ล้นขอบจอ */
    }
    .ls-guest-nav .topnav-brand {
        flex: 0 1 auto;   /* จอแคบ : ชื่อแบรนด์ย่อ (…) แทนการดันปุ่มเข้าสู่ระบบ | สมัครฟรี ล้นขอบ */
    }
}

/* ---------- โครงป๊อปอัป (ภาพโปรโมตสมาชิก PRO ใน daily.php + ป๊อปอัปเข้าสู่ระบบ) ---------- */

.ls-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 16, 12, 0.6);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.ls-modal.open {
    display: flex;
}

.ls-modal-box {
    position: relative;
    width: min(420px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 10px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.ls-modal-box img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.ls-modal-x {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 16, 12, 0.75);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

/* ---------- ป๊อปอัปเข้าสู่ระบบ / สมัครฟรี (ผู้ยังไม่เข้าสู่ระบบ · ls_auth_modal ใน ls_lib.php) ----------
   พื้นหลังเลื่อนได้ (ฟอร์มสมัครยาวกว่าจอมือถือ) กล่องอยู่กลางจอเมื่อสั้นกว่าจอ · หัวกล่องพื้นเข้มแบบ hero */

/* ซ่อนส่วนที่มี hidden เสมอ (หน้า STANDING ได้จาก .pp [hidden] ใน lastst.css · หน้าอื่นไม่มี) */
.pp .ls-auth [hidden] {
    display: none !important;
}

/* ป้ายหัวกล่อง : แบบเดียวกับ .ls-kicker ของ hero STANDING (หน้าอื่นไม่ได้โหลด lastst.css) */
.pp .ls-auth-top .ls-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(214, 177, 114, 0.55);
    background: rgba(255, 255, 255, 0.06);
    color: #f3e3c4;
    font-size: 14px;
    font-weight: 500;
}

.pp .ls-auth-top .ls-kicker i {
    color: var(--gold);
}

html.ls-lock,
html.ls-lock body {
    overflow: hidden;
}

.ls-modal.ls-auth {
    align-items: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 16px;
}

.ls-auth .ls-modal-box.ls-auth-box {
    width: min(440px, 100%);
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border-radius: 22px;
    outline: none;
}

.ls-auth .ls-modal-x {
    z-index: 2;
    background: rgba(255, 255, 255, 0.14);
    color: #f6e7c8;
}

.ls-auth .ls-modal-x:hover {
    background: rgba(255, 255, 255, 0.26);
}

.pp .ls-auth-top {
    padding: 22px 56px 18px;
    background:
        radial-gradient(circle at 12% 0%, rgba(214, 177, 114, 0.38), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(214, 177, 114, 0.18), transparent 45%),
        linear-gradient(160deg, #2e241a, #17120d);
    color: #fff;
    text-align: center;
}

.pp .ls-auth-top h2 {
    margin: 10px 0 4px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    color: #f6e7c8;
}

.pp .ls-auth-top p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.68);
}

.pp .ls-auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 16px 20px 0;
    padding: 4px;
    border-radius: 999px;
    background: #f4ede1;
}

.pp .ls-auth-tabs button {
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #8a7a60;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
}

.pp .ls-auth-tabs button[aria-selected='true'] {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(120, 90, 40, 0.16);
}

.pp .ls-auth-form {
    padding: 16px 20px 20px;
}

.pp .ls-f {
    margin-bottom: 12px;
}

.pp .ls-f > label {
    display: block;
    margin-bottom: 5px;
    color: #4d4234;
    font-size: 13.5px;
    font-weight: 600;
}

.pp .ls-f > label small {
    margin-left: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.pp .ls-in {
    position: relative;
    display: flex;
    align-items: center;
    height: 46px;
    border: 1.5px solid #e6dccb;
    border-radius: 14px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.pp .ls-in:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.pp .ls-in input,
.pp .ls-in select {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 16px;   /* 16px : iPhone ไม่ซูมหน้าเมื่อแตะช่อง */
}

.pp .ls-in input::placeholder {
    color: #b9ae9b;
}

.pp .ls-in.sel select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 38px;
    text-overflow: ellipsis;
    cursor: pointer;
}

.pp .ls-in.sel > i {
    position: absolute;
    right: 14px;
    color: var(--gold-dark);
    font-size: 12px;
    pointer-events: none;
}

.pp .ls-in .eye {
    flex: none;
    width: 44px;
    height: 100%;
    border: 0;
    background: none;
    color: #a8977a;
    font-size: 15px;
    cursor: pointer;
}

.pp .ls-f.bad .ls-in {
    border-color: var(--red);
}

.pp .ls-f.bad .ls-in:focus-within {
    box-shadow: 0 0 0 3px var(--red-soft);
}

.pp .ls-f-msg {
    display: block;
    margin-top: 4px;
    color: var(--red);
    font-size: 12.5px;
    line-height: 1.5;
}

.pp .ls-f-msg:empty {
    display: none;
}

.pp .ls-f.good .ls-f-msg {
    color: var(--green);
}

.pp .ls-f-link,
.pp .ls-f-switch button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--gold-dark);
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.pp .ls-f-link {
    margin-left: 6px;
}

.pp .ls-f2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pp .ls-f-alert {
    margin-bottom: 12px;
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--red-soft);
    color: #b23b3b;
    font-size: 13px;
    line-height: 1.5;
}

.pp .ls-f-forgot {
    margin: -4px 0 14px;
    font-size: 13px;
    text-align: right;
}

.pp .ls-f-forgot a {
    color: var(--gold-dark);
    text-decoration: underline;
}

.pp .ls-f-terms {
    margin: 2px 0 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fcfaf5;
}

.pp .ls-f-terms summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--gold-dark);
    font-size: 13px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.pp .ls-f-terms summary::-webkit-details-marker {
    display: none;
}

.pp .ls-f-terms summary::after {
    content: "+";
    margin-left: auto;
    font-size: 17px;
    line-height: 1;
}

.pp .ls-f-terms[open] summary::after {
    content: "\2212";
}

.pp .ls-f-terms .tb {
    max-height: 190px;
    overflow-y: auto;
    padding: 0 14px 10px;
    color: #555;
    font-size: 12.5px;
    line-height: 1.6;
}

.pp .ls-f-terms h4 {
    margin: 8px 0 2px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.pp .ls-f-terms ul {
    margin: 0;
    padding-left: 18px;
}

.pp .ls-f-terms .upd {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 11.5px;
}

.pp .ls-f > label.ls-f-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.5;
    cursor: pointer;
}

.pp .ls-f-check input {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--gold-dark);
    cursor: pointer;
}

.pp .ls-f.bad > label.ls-f-check {
    color: var(--red);
}

.pp .btn.ls-f-go {
    height: 50px;
    margin-top: 4px;
    font-size: 16px;
}

.pp .ls-f-switch {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13.5px;
    text-align: center;
}

/* สำเร็จ : ติ๊กเขียว แล้วโหลดหน้าเกมของสมาชิก */
.pp .ls-auth-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 34px 20px 38px;
    text-align: center;
}

.pp .ls-auth-done .ok {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
    font-size: 28px;
    animation: ls-auth-pop .45s cubic-bezier(.34, 1.56, .64, 1) both;
}

.pp .ls-auth-done b {
    font-size: 19px;
}

.pp .ls-auth-done small {
    color: var(--muted);
    font-size: 13.5px;
}

@keyframes ls-auth-pop {
    from { opacity: 0; transform: scale(.4); }
    to   { opacity: 1; transform: none; }
}

@media screen and (max-width: 480px) {
    .pp .ls-auth-top .ls-kicker { padding: 4px 12px; font-size: 12px; }
    .ls-modal.ls-auth { padding: 12px 10px; }
    .pp .ls-auth-top { padding: 18px 48px 14px; }
    .pp .ls-auth-top h2 { font-size: 19px; }
    .pp .ls-auth-top p { font-size: 12px; }
    .pp .ls-auth-tabs { margin: 12px 14px 0; }
    .pp .ls-auth-form { padding: 14px 14px 16px; }
    .pp .ls-f { margin-bottom: 10px; }
    .pp .ls-in { height: 44px; }
    .pp .ls-f2 { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .pp .ls-auth-done .ok { animation: none; }
}
