/* Mobile-first responsive refinements for Forex Friend Advisor */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: clip;
    max-width: 100%;
}

main,
#sidebarContainer,
#advisoryContainer,
section,
.card-hover {
    min-width: 0;
    max-width: 100%;
}

/* Prevent wide tables or monospace values from forcing horizontal page scroll */
.overflow-x-auto {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

table {
    max-width: 100%;
}

/* Ensure Chart.js canvas stays within mobile card bounds */
canvas {
    max-width: 100% !important;
}

/* Mobile sticky CTA bar above bottom safe area */
.mobile-sticky-action {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 0.625rem 1rem calc(0.625rem + env(safe-area-inset-bottom, 0px));
    background-color: rgba(255, 255, 255, 0.92);
    border-top: 1px solid rgb(226 232 240);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html.dark .mobile-sticky-action {
    background-color: rgba(15, 23, 42, 0.92);
    border-top-color: rgb(30 41 59);
}

/* Reserve bottom space on mobile so footer/cards aren't covered by the sticky bar */
@media (max-width: 767px) {
    body {
        padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    }

    header h1 {
        font-size: 1.125rem;
        line-height: 1.4rem;
    }

    header img {
        width: 2.75rem;
        height: 2.75rem;
    }

    select,
    input[type="number"] {
        font-size: 16px; /* Prevents iOS Safari auto-zoom on input focus */
    }
}

/* Hide sticky bar once at md+ breakpoint where desktop button is visible */
@media (min-width: 768px) {
    .mobile-sticky-action {
        display: none !important;
    }

    body {
        padding-bottom: 0;
    }
}
<!-- END OF FILE: public/mobile.css -->