/* ==========================================================================
   TRANG ĐĂNG KÝ — bản tách đôi (views/ecommerce/customers/register.blade.php)
   Từ 11/09/2026: kiểu Shopee — nút Google hoặc số điện thoại → mã xác nhận → họ tên.

   File riêng, tiền tố riêng .hl-signup, KHÔNG dựa vào hl-signin.css của trang đăng nhập:
   sửa trang này không thể làm vỡ trang kia (và ngược lại). View nạp file bằng thẻ <link>
   đặt đầu nội dung, tức SAU mọi CSS trong <head>, nên thắng theo thứ tự mà không cần !important.

   Chú ý:
   - theme.css gốc + body line-height 26px lọt vào p/h1/label/li trần → khai báo lại margin,
     line-height, font ngay trong phạm vi (dùng :where() cho độ ưu tiên thấp, lớp riêng vẫn thắng).
   - hl-theme.css có `.hl-body a { color }` (0,1,1) → nút là thẻ <a> phải viết `.hl-signup a.x`.
   - Màu chữ báo lỗi dùng #B3261E (đủ tương phản cho chữ 12px); viền ô lỗi #D64545 như thiết kế.
   ========================================================================== */

.hl-signup {
    width: 100%; max-width: 1180px; min-width: 0; margin: 0 auto;
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
    font-size: 14px; line-height: 1.5; color: var(--hl-ink);
}

/* display:flex/grid ở các lớp bên dưới mạnh hơn luật [hidden] mặc định của trình duyệt. */
.hl-signup [hidden] { display: none !important; }

.hl-signup :where(p, h1, label, ol, ul, li) {
    margin: 0; padding: 0; font-family: inherit; line-height: 1.5; letter-spacing: normal;
}
.hl-signup :where(ol, ul) { list-style: none; }
.hl-signup :where(button, input) { font-family: inherit; }

/* Viền nét rõ khi đi bằng bàn phím (chuột bấm thì không hiện). */
.hl-signup a:focus-visible,
.hl-signup button:focus-visible {
    outline: 2px solid var(--hl-link); outline-offset: 2px;
}

.hl-signup__card {
    display: flex; flex-wrap: wrap;
    background: var(--hl-surface); border-radius: 32px; overflow: hidden;
    box-shadow: 0 20px 54px rgba(163, 124, 32, .14);
}

/* ---------- cột trái: lời mời + các bước ---------- */

.hl-signup__hero {
    flex: 1 1 380px; min-width: 0; position: relative; overflow: hidden; isolation: isolate;
    background: linear-gradient(150deg, #FFE3A0 0%, #FFC65C 48%, #F5AE2E 100%);
    padding: 44px 42px 40px; display: flex; flex-direction: column; gap: 26px;
}
.hl-signup__hero::before,
.hl-signup__hero::after {
    content: ""; position: absolute; border-radius: 999px; pointer-events: none; z-index: -1;
}
.hl-signup__hero::before {
    right: -100px; top: -130px; width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 68%);
}
.hl-signup__hero::after {
    left: -80px; bottom: -140px; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 70%);
}

.hl-signup a.hl-signup__brand,
.hl-signup a.hl-signup__brand:hover { display: flex; align-items: center; gap: 13px; color: #4A3208; text-decoration: none; }
.hl-signup__logo {
    width: 54px; height: 54px; flex: 0 0 54px; border-radius: 18px; background: #fff;
    display: grid; place-items: center; padding: 7px; box-shadow: 0 8px 20px rgba(140, 96, 10, .18);
    font-size: 17px; font-weight: 800; color: var(--hl-link);
}
.hl-signup__logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.hl-signup__name { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: #4A3208; }
.hl-signup__domain { display: block; padding-top: 2px; font-size: 12px; font-weight: 600; line-height: 1.4; color: #7A5510; }
.hl-signup__tag { display: none; }

.hl-signup__title {
    font-size: 33px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; color: #3D2C08; text-wrap: pretty;
}
.hl-signup__lead { margin-top: 10px; max-width: 330px; font-size: 14.5px; font-weight: 500; line-height: 1.6; color: #6B4405; }

.hl-signup__steps { margin-top: auto; }
.hl-signup__steps-h {
    margin-bottom: 12px; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; line-height: 1.4;
    text-transform: uppercase; color: #7A5510;
}
.hl-signup__steps ol { display: flex; flex-direction: column; gap: 14px; }
.hl-signup__steps li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 500; line-height: 1.4; color: #6B4405; }
.hl-signup__step-n {
    width: 30px; height: 30px; flex: 0 0 30px; border-radius: 11px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .45); color: #7A5510; font-size: 13px; font-weight: 800; line-height: 1;
    transition: background-color .2s ease, color .2s ease;
}
.hl-signup__steps li.is-current { font-weight: 700; color: #3D2C08; }
.hl-signup__steps li.is-current .hl-signup__step-n { background: #fff; color: #985909; box-shadow: 0 4px 12px rgba(140, 96, 10, .16); }
.hl-signup__steps li.is-done .hl-signup__step-n { background: rgba(255, 255, 255, .72); color: #2E7D5B; }

/* ---------- cột phải ---------- */

.hl-signup__main { flex: 1 1 460px; min-width: 0; padding: 42px 46px 38px; display: flex; flex-direction: column; gap: 18px; }
.hl-signup__h { font-size: 27px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; color: var(--hl-ink); }
.hl-signup__sub { margin-top: 5px; font-size: 13.5px; line-height: 1.5; color: var(--hl-muted); }

.hl-signup__start { display: flex; flex-direction: column; gap: 18px; }
.hl-signup__quick { display: flex; flex-wrap: wrap; gap: 9px; }
.hl-signup a.hl-signup__qbtn {
    flex: 1 1 190px; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 16px; border-radius: 16px; background: #fff; border: 1.5px solid #EDE4D2;
    font-size: 14.5px; font-weight: 700; line-height: 1.3; color: #3A3327; text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}
.hl-signup__quick.is-single a.hl-signup__qbtn { flex-basis: 100%; }
.hl-signup a.hl-signup__qbtn:hover { border-color: #F0C75A; background: #FFFDF8; color: #3A3327; }
.hl-signup a.hl-signup__qbtn svg { flex: 0 0 19px; }

.hl-signup__or { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; line-height: 1; color: #A79C86; }
.hl-signup__or::before,
.hl-signup__or::after { content: ""; flex: 1; height: 1px; background: #F0E7D5; }

.hl-signup__pane { display: flex; flex-direction: column; gap: 16px; }

.hl-signup__label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; line-height: 1.4; color: #3A3327; }

.hl-signup__field {
    display: flex; align-items: center; gap: 10px; padding: 0 15px;
    background: #FBF7EC; border: 1.5px solid #F0E7D5; border-radius: 16px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.hl-signup__field:focus-within { border-color: var(--hl-gold-2); background: #fff; box-shadow: 0 0 0 3px rgba(240, 162, 2, .18); }
.hl-signup__field > svg { flex: 0 0 18px; }
/* width:100% thay bề rộng mặc định (~20 ký tự) của ô nhập — độ rộng phần trăm co được, không đẩy
   cả hàng tràn ngang trên điện thoại (đã dính ở trang đăng nhập với hàng "+84 | ô số"). */
.hl-signup__field input {
    flex: 1; min-width: 0; width: 100%; height: auto; margin: 0; padding: 14px 0;
    border: 0; border-radius: 0; outline: none; box-shadow: none; background: transparent;
    font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--hl-ink);
}
.hl-signup__field input::placeholder { color: #A79C86; font-weight: 500; opacity: 1; }
.hl-signup__field input[type="tel"] { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.hl-signup__field input[readonly] { color: var(--hl-ink-3); }
/* Chrome tự điền thì tô nền vàng chanh — phủ lại bằng màu ô. */
.hl-signup__field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #FBF7EC inset; -webkit-text-fill-color: var(--hl-ink); }
.hl-signup__field:focus-within input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; }

.hl-signup__field.is-invalid { border-color: #D64545; }
.hl-signup__field.is-invalid:focus-within { box-shadow: 0 0 0 3px rgba(214, 69, 69, .16); }
.hl-signup__err { margin-top: 6px; font-size: 12px; font-weight: 500; line-height: 1.45; color: #B3261E; }

.hl-signup__cc {
    flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding-right: 11px;
    border-right: 1px solid #EDE4D2; font-size: 15px; font-weight: 700; line-height: 1; color: #5C564B;
}
.hl-signup__flag {
    width: 20px; height: 14px; border-radius: 3px; background: #DA251D; color: #FFCD00;
    display: grid; place-items: center; font-size: 9px; line-height: 1;
}

/* ---------- chọn kênh nhận mã ---------- */

.hl-signup__box { background: #FBF7EC; border-radius: 20px; padding: 16px 18px 18px; }
.hl-signup__ch-h { font-size: 13px; font-weight: 800; line-height: 1.4; color: var(--hl-ink); }
.hl-signup__ch-list { position: relative; display: flex; gap: 9px; margin-top: 11px; }

/* Radio thật: ẩn thị giác nhưng vẫn nhận Tab/mũi tên và được trình đọc màn hình đọc. */
.hl-signup__radio {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.hl-signup__ch {
    position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 11px;
    padding: 12px 14px; border-radius: 16px; border: 1.5px solid #EDE4D2; background: transparent;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.hl-signup__ch:hover { border-color: #F0C75A; }
.hl-signup__ch-ic {
    width: 40px; height: 40px; flex: 0 0 40px; border-radius: 14px; display: grid; place-items: center;
    background: #F3EEE2; opacity: .5; transition: opacity .15s ease, background-color .15s ease;
}
.hl-signup__ch-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hl-signup__ch-name { font-size: 14px; font-weight: 700; line-height: 1.3; color: #6E6455; }
.hl-signup__ch-note { font-size: 11.5px; line-height: 1.35; color: var(--hl-muted); }

.hl-signup__radio:checked + .hl-signup__ch { background: #fff; border-color: #F0A202; box-shadow: 0 6px 16px rgba(196, 145, 20, .2); }
.hl-signup__radio:checked + .hl-signup__ch .hl-signup__ch-ic { opacity: 1; }
.hl-signup__radio:checked + .hl-signup__ch--sms .hl-signup__ch-ic { background: #FFF3D6; }
.hl-signup__radio:checked + .hl-signup__ch--zalo .hl-signup__ch-ic { background: #E8F1FC; }
.hl-signup__radio:checked + .hl-signup__ch .hl-signup__ch-name { color: #2B2418; }
.hl-signup__radio:focus-visible + .hl-signup__ch { outline: 2px solid var(--hl-link); outline-offset: 2px; }

/* Kênh chưa dùng được: vẫn hiện đủ thẻ theo thiết kế, nhưng mờ, không chọn được, có nhãn "Sắp có". */
.hl-signup__ch.is-off { cursor: not-allowed; opacity: .55; }
.hl-signup__ch.is-off:hover { border-color: #EDE4D2; }
.hl-signup__ch-soon {
    position: absolute; top: -8px; right: 10px; padding: 1px 7px; border-radius: 999px;
    background: #F3EEE2; border: 1px solid #EDE4D2; color: #76684F;
    font-size: 10px; font-weight: 800; line-height: 1.4; white-space: nowrap;
}

/* ---------- nhập mã ---------- */

.hl-signup__sent {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px;
    background: #FBF7EC; font-size: 13px; line-height: 1.5; color: #5C564B;
}
.hl-signup__sent > svg { flex: 0 0 18px; color: #985909; }
.hl-signup__sent > span { flex: 1; min-width: 0; }
.hl-signup__sent b { font-weight: 800; color: var(--hl-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

.hl-signup__link {
    padding: 0; border: 0; background: none; font-size: 12.5px; font-weight: 700; line-height: 1.4;
    color: var(--hl-link); white-space: nowrap; cursor: pointer;
}
.hl-signup__link:disabled { color: var(--hl-muted-2); cursor: default; }

/* 6 ô chỉ để HIỂN THỊ; chỗ gõ thật là một ô trong suốt phủ lên (dán cả mã, tự điền từ tin nhắn). */
.hl-signup__otp { position: relative; display: flex; gap: 9px; }
.hl-signup__otp-box {
    flex: 1 1 0; min-width: 0; height: 56px; border-radius: 14px; background: #FBF7EC;
    border: 1.5px solid #F0E7D5; display: grid; place-items: center;
    font-size: 21px; font-weight: 800; line-height: 1; color: var(--hl-ink); font-variant-numeric: tabular-nums;
    transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.hl-signup__otp-box.is-filled { border-color: #F0C75A; background: #fff; }
.hl-signup__otp-box.is-active { border-color: var(--hl-gold-2); background: #fff; box-shadow: 0 0 0 3px rgba(240, 162, 2, .18); }
.hl-signup__otp.is-invalid .hl-signup__otp-box { border-color: #D64545; }
.hl-signup__otp-input {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
    opacity: 0; background: transparent; color: transparent; caret-color: transparent;
    font-size: 16px; /* dưới 16px thì iOS phóng to cả trang khi chạm vào */
    cursor: text;
}

/* Dòng trạng thái co giãn (xuống dòng khi hẹp), nút "Gửi lại mã" luôn đứng bên phải. */
.hl-signup__coderow { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-top: 10px; }
.hl-signup__status { flex: 1 1 0; min-width: 0; font-size: 12px; line-height: 1.5; color: var(--hl-ink-3); font-variant-numeric: tabular-nums; }

/* ---------- họ tên ---------- */

.hl-signup__verified {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 16px;
    background: #EAF6EF; font-size: 13px; line-height: 1.5; color: #245E45;
}
.hl-signup__verified svg { flex: 0 0 18px; margin-top: 1px; color: #2E7D5B; }
.hl-signup__verified b { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hl-signup__restart { align-self: center; }

/* Khung reCAPTCHA vô hình của Firebase (badge inline). KHÔNG ẩn bằng display:none — reCAPTCHA không
   dựng được trong phần tử bị ẩn. Để trống thì kéo ngược khoảng gap của cột lại. */
.hl-signup__fbcaptcha { display: flex; justify-content: center; }
.hl-signup__fbcaptcha:empty { margin-top: -18px; }

/* ---------- nút chính + chữ phụ ---------- */
.hl-signup__submit {
    width: 100%; margin: 0; padding: 15px; border: 0; border-radius: 17px;
    background: linear-gradient(135deg, #FFC53D, #F0A202); color: #3D2C08;
    font-size: 15.5px; font-weight: 800; line-height: 1.3; cursor: pointer;
    box-shadow: 0 10px 24px rgba(196, 145, 20, .3);
    transition: box-shadow .15s ease, transform .1s ease, opacity .15s ease;
}
.hl-signup__submit:hover { box-shadow: 0 12px 28px rgba(196, 145, 20, .38); }
.hl-signup__submit:active { transform: translateY(1px); }
.hl-signup__submit:disabled { opacity: .65; cursor: default; transform: none; }

.hl-signup__terms { margin-top: -4px; font-size: 12px; line-height: 1.55; color: var(--hl-muted); text-align: center; }
.hl-signup .hl-signup__terms a { font-weight: 700; color: #985909; }

.hl-signup__note { font-size: 12.5px; line-height: 1.55; color: #6E6455; }
.hl-signup__box .hl-signup__note { margin-top: 10px; }

.hl-signup__msg { margin-top: -6px; font-size: 13px; line-height: 1.5; color: var(--hl-green); text-align: center; }
.hl-signup__msg.is-error { color: #B3261E; }

.hl-signup__alt { padding-top: 18px; border-top: 1px solid #F0E7D5; font-size: 13.5px; line-height: 1.5; color: var(--hl-muted); text-align: center; }
.hl-signup .hl-signup__alt a { font-weight: 800; color: var(--hl-link); }

/* ---------- điện thoại: dải vàng ở đầu, tấm kem trồi lên đè mép dưới ---------- */
@media (max-width: 767px) {
    .hl-signup__card { background: transparent; box-shadow: none; border-radius: 24px; }
    .hl-signup__hero {
        flex-basis: 100%; padding: 12px 20px 24px; gap: 12px; border-radius: 24px 24px 0 0;
        background: linear-gradient(160deg, #FFD874, #F7B23B);
    }
    .hl-signup__hero::after { display: none; }
    .hl-signup__logo { width: 44px; height: 44px; flex-basis: 44px; border-radius: 15px; padding: 6px; }
    .hl-signup__name { font-size: 16px; }
    .hl-signup__domain { display: none; }
    .hl-signup__tag { display: block; padding-top: 1px; font-size: 11.5px; font-weight: 600; line-height: 1.4; color: #7A5510; }
    .hl-signup__title { font-size: 23px; letter-spacing: -.025em; line-height: 1.2; }
    .hl-signup__title br { display: none; }
    .hl-signup__lead,
    .hl-signup__steps { display: none; }

    .hl-signup__main {
        flex-basis: 100%; position: relative; margin-top: -14px; padding: 16px 14px 20px; gap: 14px;
        background: var(--hl-bg); border-radius: 24px 24px 0 0;
    }
    /* Tiêu đề h1 nằm trên dải vàng → ẩn thị giác, giữ cho trình đọc màn hình. Riêng dòng phụ vẫn hiện
       để khách biết đang ở bước nào (nhập mã / điền họ tên). */
    .hl-signup__h {
        position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
    }
    .hl-signup__sub { margin: 2px 4px 0; font-size: 13px; font-weight: 600; color: #6E6455; }
    .hl-signup__q-fast { display: none; }

    .hl-signup__start { gap: 14px; }
    .hl-signup__pane {
        background: #fff; border-radius: 22px; padding: 16px 15px 18px; gap: 14px;
        box-shadow: 0 4px 14px rgba(163, 124, 32, .08);
    }
    .hl-signup__label { margin-bottom: 6px; font-size: 12.5px; }
    .hl-signup__field { border-radius: 15px; }

    .hl-signup__box { padding: 13px 12px 14px; border-radius: 18px; }
    .hl-signup__ch-list { gap: 8px; margin-top: 10px; }
    .hl-signup__ch { padding: 11px 10px; gap: 9px; border-radius: 15px; }
    .hl-signup__ch-ic { width: 34px; height: 34px; flex-basis: 34px; border-radius: 11px; }
    .hl-signup__ch-name { font-size: 13px; }
    .hl-signup__ch-note { display: none; }
    .hl-signup__ch-soon { right: 8px; font-size: 9.5px; }
    .hl-signup__fbcaptcha:empty { margin-top: -14px; }

    .hl-signup__otp { gap: 7px; }
    .hl-signup__otp-box { height: 50px; font-size: 19px; border-radius: 13px; }

    .hl-signup__submit { font-size: 15px; border-radius: 16px; }
    .hl-signup__alt { padding-top: 14px; font-size: 12.5px; }
}

/* Dưới 16px thì iOS phóng to cả trang khi chạm vào ô. */
@media (max-width: 767px), (pointer: coarse) {
    .hl-signup__field input { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .hl-signup *,
    .hl-signup *::before,
    .hl-signup *::after { transition: none !important; }
}
