/* ═══════════════════════════════════════════════════════════════════
   Instant Crew — PWA Install & Add-to-Home-Screen Styles
   (Android Native Prompt + iOS Safari Share Sheet & Visual Pointer)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Nav Install Button ── */
.nav-install-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 9999px;
    background: #FFFFFF;
    color: #1F2937;
    border: 1.5px solid #E5E7EB;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(18, 17, 14, 0.04);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

.nav-install-btn * {
    pointer-events: none;
}

.nav-install-btn:hover {
    background: #FEF3C7;
    border-color: #F59E0B;
    color: #92400E;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 14px rgba(28, 28, 30, 0.11);
}

.nav-install-btn:active {
    transform: translateY(0);
}

.nav-install-btn .install-btn-icon {
    width: 16px;
    height: 16px;
    color: #F59E0B;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.nav-install-btn:hover .install-btn-icon {
    transform: translateY(1px);
    color: #B45309;
}

.nav-install-btn.installed {
    background: #F0FDF4;
    border-color: #86EFAC;
    color: #166534;
    cursor: default;
}

.nav-install-btn.installed .install-btn-icon {
    color: #16A34A;
}

.nav-install-btn.installed:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(18, 17, 14, 0.04);
}

/* ── PWA Confirmation Toast ── */
.install-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    opacity: 0;
    visibility: hidden;
    background: #111827;
    color: #FFFFFF;
    padding: 12px 22px;
    border-radius: 9999px;
    font-size: 0.92rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 16px 36px -6px rgba(18, 17, 14, 0.35);
    z-index: 999999;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease, visibility 0.28s;
    pointer-events: none;
    white-space: nowrap;
}

.install-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.install-toast-icon {
    width: 20px;
    height: 20px;
    color: #10B981;
    flex-shrink: 0;
}

/* ── Install Modal Overlay & Dialog ── */
.install-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}

.install-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.install-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
}

.install-modal-dialog {
    position: relative;
    z-index: 2;
    background: #FFFFFF;
    border: 2px solid #FFCC00;
    border-radius: 26px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 440px;
    max-height: min(90vh, 680px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 26px 22px 20px;
    transform: scale(0.95) translateY(14px);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s;
    text-align: center;
    box-sizing: border-box;
}

.install-modal-overlay.open .install-modal-dialog {
    transform: scale(1) translateY(0);
}

.install-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #F3F4F6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.18s ease;
}

.install-modal-close:hover {
    background: #E5E7EB;
    color: #111827;
}

.install-modal-app-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    margin: 0 auto 12px;
    display: block;
    box-shadow: 0 8px 24px rgba(28, 28, 30, 0.14);
    border: 1.5px solid #F3F4F6;
    object-fit: contain;
}

.install-modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.install-modal-subtitle {
    font-size: 0.88rem;
    color: #6B7280;
    margin: 0 0 18px;
    line-height: 1.45;
}

.install-steps-list {
    text-align: left;
    background: #F9FAFB;
    border: 1.5px solid #E5E7EB;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 20px;
}

.install-step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.88rem;
    color: #374151;
    line-height: 1.45;
}

.install-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #FFCC00;
    color: #111827;
    font-weight: 800;
    font-size: 0.78rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.install-step-item strong {
    color: #111827;
}

.install-step-body {
    flex: 1;
    min-width: 0;
}

.install-step-title {
    font-size: 0.90rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
    line-height: 1.35;
}

.install-step-desc {
    font-size: 0.82rem;
    color: #4B5563;
    line-height: 1.45;
}

.install-step-hint {
    margin-top: 5px;
    font-size: 0.76rem;
    color: #92400E;
    background: #FEF3C7;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid #FDE68A;
}

.install-step-inline-icon {
    display: inline-flex;
    vertical-align: middle;
    margin-inline: 3px;
    padding: 2px 4px;
    background: #FFFFFF;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
    color: #D97706;
}

.btn-install-modal-action {
    width: 100%;
    padding: 13px 20px;
    border-radius: 9999px;
    background: #FFCC00;
    color: #111827;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(28, 28, 30, 0.17);
    transition: all 0.18s ease;
}

.btn-install-modal-action:hover {
    background: #E5B800;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(28, 28, 30, 0.22);
}

.btn-install-modal-action:active {
    transform: scale(0.98);
}

/* ── iOS Native Share Sheet Guide Banner ── */
.ios-share-guide-banner {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    width: min(92vw, 380px);
    background: #111827;
    color: #FFFFFF;
    padding: 14px 18px;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s;
    border: 1.5px solid rgba(255, 204, 0, 0.4);
}

.ios-share-guide-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.ios-share-guide-icon svg {
    stroke-width: 2.6;
}

.ios-share-guide-icon {
    width: 24px;
    height: 36px;
    color: #FFCC00;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: iosNudge 1.5s cubic-bezier(0.16, 1, 0.3, 1) 3;
}

@keyframes iosNudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.ios-share-guide-text {
    flex: 1;
    min-width: 0;
}

.ios-share-guide-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #FFCC00;
    margin: 0 0 2px;
}

.ios-share-guide-sub {
    font-size: 0.78rem;
    color: #D1D5DB;
    margin: 0;
    line-height: 1.35;
}

.ios-share-guide-close {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ios-share-guide-close:hover {
    color: #FFFFFF;
}

@media (max-width: 600px) {
    .nav-install-btn {
        padding: 8px 13px;
        font-size: 0.86rem;
        gap: 5px;
    }
}
