/* "Tải app" (PWA): hướng dẫn cài, dải gợi ý trên điện thoại, nút trong menu/chân trang. */

.sfapp-inline-ic {
    width: 16px;
    height: 16px;
    vertical-align: -3px;
    color: #007aff;
}

.sfapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: #ff5000;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.sfapp-btn:hover { background: #e64800; color: #fff; }

.sfapp-btn-ghost {
    background: #fff;
    color: #ff5000;
    border: 1px solid #ffc7a8;
}

.sfapp-btn-ghost:hover { background: #fff4ee; color: #e64800; }

/* ---------- hướng dẫn cài ---------- */
.sfapp-guide-open { overflow: hidden; }

.sfapp-guide-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: rgba(15, 23, 42, .5);
}

.sfapp-guide {
    position: fixed;
    z-index: 10041;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 20px 20px 16px;
    border-radius: 14px;
    background: #fff;
    color: #1f2937;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    font-size: 14px;
    line-height: 1.5;
}

.sfapp-guide-x {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 0;
    background: none;
    color: #9ca3af;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.sfapp-guide-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-right: 24px;
}

.sfapp-guide-head img { border-radius: 10px; flex: 0 0 auto; }

.sfapp-guide-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.sfapp-guide-intro { margin: 0 0 8px; }

.sfapp-url-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 8px 8px 12px;
    border-radius: 10px;
    background: #fff7f2;
    border: 1px dashed #ffb48a;
}

.sfapp-url {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    color: #ff5000;
    overflow-wrap: anywhere;
}

.sfapp-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: sfapp;
}

.sfapp-steps li {
    position: relative;
    margin: 0 0 10px;
    padding: 2px 0 0 36px;
    counter-increment: sfapp;
}

.sfapp-steps li::before {
    content: counter(sfapp);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff0e8;
    color: #ff5000;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sfapp-guide-note {
    margin: 4px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f3f6fb;
    color: #4b5563;
    font-size: 13px;
}

.sfapp-guide-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

/* ---------- dải gợi ý cài app (điện thoại) ---------- */
.sfapp-banner {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 6px 10px 10px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
    border: 1px solid #ffd9c4;
    transform: translateY(20px);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
}

.sfapp-banner.is-visible { transform: none; opacity: 1; }

.sfapp-banner img { border-radius: 9px; flex: 0 0 auto; }

.sfapp-banner-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.sfapp-banner-text strong { font-size: 14px; color: #111827; }
.sfapp-banner-text span { font-size: 12px; color: #6b7280; }

.sfapp-banner-cta { min-height: 34px; padding: 0 14px; font-size: 13px; }

.sfapp-banner-x {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 0;
    background: none;
    color: #9ca3af;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

body.page-checkout .sfapp-banner,
body.page-cart .sfapp-banner { display: none; }

@media (min-width: 769px) {
    .sfapp-banner { left: auto; right: 16px; bottom: 16px; width: 380px; }
}

/* ---------- menu tài khoản ---------- */
.header-user-menu-list .sfapp-menu-sep {
    height: 1px;
    margin: 4px 0;
    background: #f0f0f0;
}

.sfapp-standalone [data-pwa-install-hide-when-installed] { display: none !important; }

/* ---------- chân trang ---------- */
.footer-app-download {
    margin-top: 14px;
}

.footer-app-download-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: inherit;
}

.footer-app-download-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-app-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #ffc7a8;
    background: #fff;
    color: #ff5000;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.footer-app-btn:hover { background: #fff4ee; color: #e64800; text-decoration: none; }

/* ---------- trang Cài đặt thông báo ---------- */
.sfpush-box {
    margin: 4px 0 14px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.sfpush-box-head { display: flex; gap: 12px; align-items: flex-start; }

.sfpush-box-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fff0e8;
    color: #ff5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sfpush-box-info { min-width: 0; }
.sfpush-box-title { font-size: 15px; font-weight: 600; color: #111827; }
.sfpush-box-desc { margin-top: 2px; font-size: 13px; color: #6b7280; line-height: 1.45; }

.sfpush-state { font-weight: 700; }
.sfpush-state.is-on { color: #16a34a; }
.sfpush-state.is-off { color: #dc2626; }

.sfpush-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-left: 52px;
}

.sfpush-actions [hidden] { display: none !important; }

.sfpush-link-btn {
    border: 0;
    background: none;
    color: #6b7280;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    padding: 6px 4px;
}

.sfpush-link-btn:hover { color: #dc2626; }

.sfapp-btn.is-busy, .sfpush-link-btn.is-busy { opacity: .6; pointer-events: none; }

.sfpush-devices { margin-top: 10px; padding-left: 52px; font-size: 12px; color: #6b7280; }

.sfpush-app-nudge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff7f2;
    border: 1px solid #ffd9c4;
}

.sfpush-app-nudge img { border-radius: 10px; flex: 0 0 auto; }
.sfpush-app-nudge-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: #4b5563; line-height: 1.45; }
.sfpush-app-nudge-text strong { font-size: 14px; color: #111827; }
.sfpush-app-nudge-btns { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }

.sfpush-section-title { margin: 18px 0 6px; font-size: 15px; font-weight: 700; color: #111827; }

.sfpush-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
}

.sfpush-check input { width: 18px; height: 18px; margin: 0; accent-color: #ff5000; cursor: pointer; }
.sfpush-check.is-locked { color: #9ca3af; cursor: default; }
.sfpush-check.is-locked input { cursor: default; }

@media (max-width: 640px) {
    .sfpush-actions, .sfpush-devices { padding-left: 0; }
    .sfpush-app-nudge { flex-wrap: wrap; }
    .sfpush-app-nudge-btns { width: 100%; }
    .sfpush-app-nudge-btns .sfapp-btn { flex: 1 1 auto; }
    .sfpush-hide-mobile { display: none !important; }
}

.sfapp-guide b, .sfapp-guide strong { font-weight: 700; color: #111827; }

@media (max-width: 640px) {
    .sfpush-app-nudge-text { flex: 1 1 calc(100% - 60px); }
}

.sfpush-box.is-on { background: #ecf8ef; border-color: #86c79a; }

.sfpush-master {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 0 0 4px;
    padding: 12px 20px;
    border-radius: 10px;
    background: #f3f4f6;
    cursor: pointer;
    font-weight: 400;
}

.sfpush-master input { width: 18px; height: 18px; margin: 0; accent-color: #ff5000; }
.sfpush-master strong { font-size: 15px; color: #111827; }
.sfpush-master span { margin-left: auto; font-size: 13px; color: #6b7280; }
