/* stylelint-disable selector-class-pattern -- 兼容官网现有类名 */
:root {
    --passto-surface: #1e2024;
    --passto-surface-strong: #1f2125;
    --passto-text: #fff;
    --passto-text-secondary: #b0b4ba;
    --passto-text-muted: #888c94;
    --passto-accent: #dad4a9;
    --passto-accent-hover: #c5bf96;
    --passto-border: rgb(218 212 169 / 25%);
    --passto-border-subtle: rgb(255 255 255 / 8%);
    --passto-hover: rgb(255 255 255 / 8%);
    --passto-shadow: 0 20px 48px rgb(0 0 0 / 60%), 0 4px 12px rgb(0 0 0 / 30%);
}

/* PC端 Google PWA 规范下载 Snackbar & 扫码弹窗 - PassTo 黑金系统设计系统 */
.passto-pc-snackbar-container {
    position: fixed;
    right: auto;
    bottom: 28px;
    left: 28px;
    z-index: 9998;
    width: auto;
    max-width: 480px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    opacity: 0;
    transition: transform .35s cubic-bezier(.16, 1, .3, 1), opacity .3s ease;
    box-sizing: border-box;
    transform: translateY(120%);
    pointer-events: none;
}

.passto-pc-snackbar-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.passto-pc-snackbar-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--passto-text);
    background: var(--passto-surface-strong);
    border: 1px solid var(--passto-border);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgb(0 0 0 / 50%), 0 2px 8px rgb(0 0 0 / 25%);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    gap: 14px;
    cursor: pointer;
}

.passto-pc-snackbar-card:hover {
    transform: translateY(-2px);
    border-color: rgb(218 212 169 / 45%);
    box-shadow: 0 16px 36px rgb(0 0 0 / 60%), 0 4px 12px rgb(0 0 0 / 30%);
}

.passto-pc-snackbar-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    width: 42px;
    min-width: 42px;
    height: 42px;
    background-color: #000;
    border: 1px solid var(--passto-border-subtle);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgb(0 0 0 / 30%);
}

.passto-pc-snackbar-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.passto-pc-snackbar-info {
    padding-right: 4px;
    min-width: 0;
    flex: 1;
}

.passto-pc-snackbar-title {
    margin: 0;
    font-size: 14px;
    color: var(--passto-text);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .3px;
}

.passto-pc-snackbar-desc {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--passto-text-secondary);
    line-height: 1.45;
    word-break: break-word;
}

.passto-pc-snackbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 系统金色按钮，与系统右上角注册按钮一致 */
.passto-pc-snackbar-btn {
    padding: 7px 15px;
    font-size: 13px;
    white-space: nowrap;
    color: #111;
    background-color: var(--passto-accent);
    border: none;
    border-radius: 4px;
    outline: none;
    transition: background-color .2s ease, transform .15s ease;
    cursor: pointer;
    font-weight: 600;
}

.passto-pc-snackbar-btn:hover {
    background-color: var(--passto-accent-hover);
}

.passto-pc-snackbar-close {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px;
    color: var(--passto-text-muted);
    background: transparent;
    border: none;
    border-radius: 4px;
    transition: color .2s ease, background-color .2s ease;
    cursor: pointer;
}

.passto-pc-snackbar-close:hover {
    color: #fff;
    background-color: var(--passto-hover);
}

.passto-pc-snackbar-close svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* 模态弹窗 - 系统黑金暗调风格 */
.passto-pc-modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgb(0 0 0 / 75%);
    opacity: 0;
    transition: opacity .25s ease;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.passto-pc-modal-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.passto-pc-modal-dialog {
    position: relative;
    padding: 24px;
    width: 90vw;
    max-width: 360px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Helvetica, Arial, sans-serif;
    text-align: center;
    color: var(--passto-text);
    background: var(--passto-surface);
    border: 1px solid var(--passto-border);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgb(0 0 0 / 60%);
    transition: transform .25s cubic-bezier(.16, 1, .3, 1);
    box-sizing: border-box;
    transform: scale(.96);
}

.passto-pc-modal-backdrop.visible .passto-pc-modal-dialog {
    transform: scale(1);
}

.passto-pc-modal-header {
    padding: 0 20px;
    margin-bottom: 18px;
}

.passto-pc-modal-title {
    margin: 0;
    font-size: 16px;
    color: #fff;
    font-weight: 700;
    line-height: 1.35;
}

.passto-pc-modal-subtitle {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--passto-text-secondary);
    line-height: 1.45;
}

.passto-pc-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px;
    color: #888c94;
    background: transparent;
    border: none;
    border-radius: 4px;
    transition: color .2s, background-color .2s;
    cursor: pointer;
}

.passto-pc-modal-close:hover {
    color: #fff;
    background-color: rgb(255 255 255 / 8%);
}

.passto-pc-modal-close svg {
    width: 18px;
    height: 18px;
}

.passto-pc-modal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.passto-pc-modal-qr-box {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgb(0 0 0 / 40%);
}

.passto-pc-modal-qr-box img {
    display: block;
    width: 176px;
    height: 176px;
    object-fit: contain;
}

.passto-pc-modal-qr-box::after {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 38px;
    height: 38px;
    box-sizing: border-box;
    background: #fff url('/favicon/passto-app-icon-192.png?v=5') center / 28px 28px no-repeat;
    border: 3px solid #fff;
    border-radius: 9px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
    content: '';
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.passto-pc-modal-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 3px 12px;
    margin-top: 14px;
    font-size: 11px;
    color: #dad4a9;
    background: rgb(218 212 169 / 12%);
    border: 1px solid rgb(218 212 169 / 20%);
    border-radius: 9999px;
    font-weight: 500;
    letter-spacing: .04em;
}

@media only screen and (max-width: 767px) {
    .passto-pc-snackbar-container {
        display: none !important;
    }
}
