/*
 * Taxi Modern — PWA banner styles
 *
 * High specificity to survive theme CSS. Banner is a position:fixed pill
 * at bottom of screen, dark surface, with primary (yellow) + secondary
 * (transparent) buttons.
 */

body .txm-pwa-banner,
html body .txm-pwa-banner {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    padding-bottom: calc( 12px + env( safe-area-inset-bottom, 0px ) ) !important;
    background: #161618 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.25 ) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    transform: translateY( 130% ) !important;
    opacity: 0 !important;
    transition: transform 0.32s cubic-bezier( 0.4, 0, 0.2, 1 ),
                opacity   0.32s cubic-bezier( 0.4, 0, 0.2, 1 ) !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box !important;
}

body .txm-pwa-banner.is-visible,
html body .txm-pwa-banner.is-visible {
    transform: translateY( 0 ) !important;
    opacity: 1 !important;
}

body .txm-pwa-banner .txm-pwa-banner-icon {
    flex-shrink: 0 !important;
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba( 255, 193, 7, 0.18 ) !important;
    color: #FFD740 !important;
    border-radius: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .txm-pwa-banner .txm-pwa-banner-icon svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
}

body .txm-pwa-banner .txm-pwa-banner-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    color: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 500 !important;
}

body .txm-pwa-banner .txm-pwa-banner-primary,
body .txm-pwa-banner .txm-pwa-banner-secondary {
    flex-shrink: 0 !important;
    padding: 8px 14px !important;
    border: 0 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
    line-height: 1.2 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
}

body .txm-pwa-banner .txm-pwa-banner-primary {
    background: #FFC107 !important;
    color: #161618 !important;
}

body .txm-pwa-banner .txm-pwa-banner-primary:hover {
    background: #FFD740 !important;
}

body .txm-pwa-banner .txm-pwa-banner-secondary {
    background: transparent !important;
    color: rgba( 255, 255, 255, 0.7 ) !important;
    padding: 8px 8px !important;
}

body .txm-pwa-banner .txm-pwa-banner-secondary:hover {
    color: #fff !important;
}

/* When the page is already in standalone mode (added to home screen) we
   don't want to keep showing the install nag */
@media all and ( display-mode: standalone ) {
    #txm-install-banner { display: none !important; }
}

/* Wider screens — banner caps at 480px and centers */
@media ( min-width: 520px ) {
    body .txm-pwa-banner,
    html body .txm-pwa-banner {
        left: 50% !important;
        right: auto !important;
        transform: translate( -50%, 130% ) !important;
        width: calc( 100% - 24px ) !important;
        max-width: 480px !important;
    }
    body .txm-pwa-banner.is-visible,
    html body .txm-pwa-banner.is-visible {
        transform: translate( -50%, 0 ) !important;
    }
}

/* Reduced motion */
@media ( prefers-reduced-motion: reduce ) {
    body .txm-pwa-banner {
        transition: opacity 0.2s linear !important;
        transform: translateY( 0 ) !important;
    }
}
