/* ================================================================
   TPH PWA Install Banner & iOS Modal
   ================================================================ */

#tph-pwa-banner {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translate(-50%, 120%);
    width: calc(100% - 24px);
    max-width: 420px;
    background: linear-gradient(135deg, #1B4F5A 0%, #0D1B2A 100%);
    color: white;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    z-index: 99999;
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 14px 16px;
}

#tph-pwa-banner.show {
    transform: translate(-50%, 0);
}

.tph-pwa-banner-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tph-pwa-banner-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.tph-pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.tph-pwa-banner-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.tph-pwa-banner-desc {
    font-size: 0.72rem;
    opacity: 0.85;
    line-height: 1.35;
}

.tph-pwa-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.tph-pwa-btn {
    padding: 7px 14px;
    border-radius: 7px;
    font-size: 0.76rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    white-space: nowrap;
    font-family: inherit;
}

.tph-pwa-btn:active {
    transform: scale(0.96);
}

.tph-pwa-btn-primary {
    background: #c8a96e;
    color: #0D1B2A;
}

.tph-pwa-btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.tph-pwa-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ─── iOS Modal ───────────────────────────────── */

#tph-pwa-ios-modal .tph-pwa-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 99999;
    animation: tphPwaFadeIn 0.25s ease;
}

@keyframes tphPwaFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.tph-pwa-modal-box {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: 18px 18px 0 0;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    animation: tphPwaSlideUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes tphPwaSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.tph-pwa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #f0f0f3;
}

.tph-pwa-modal-header h3 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
}

.tph-pwa-modal-close {
    background: none;
    border: none;
    font-size: 1.15rem;
    color: #555;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
}

.tph-pwa-modal-content {
    padding: 18px 20px 8px;
    color: #1d1d1f;
}

.tph-pwa-modal-content ol {
    padding-left: 22px;
    line-height: 2;
    font-size: 0.92rem;
}

.tph-pwa-modal-content ol li {
    margin-bottom: 6px;
}

.tph-pwa-modal-content strong {
    color: #1B4F5A;
}

.tph-pwa-modal-hint {
    margin-top: 14px;
    padding: 11px 13px;
    background: #f5f5f7;
    border-radius: 9px;
    font-size: 0.82rem;
    color: #555;
    line-height: 1.5;
}

/* ─── Responsive ──────────────────────────────── */

@media (min-width: 768px) {
    .tph-pwa-modal-box {
        max-width: 440px;
        border-radius: 18px;
        margin-bottom: 40px;
    }
    #tph-pwa-ios-modal .tph-pwa-modal-overlay {
        align-items: center;
    }
}
