/* ==========================================================================
   Mobile Responsive — Shared
   Base styles are now mobile-first in base.css, layout.css, components.css.
   This file contains only extra-small overrides, error UI, and landscape.
   ========================================================================== */

/* Bottom sheet slide-up animation (referenced by page CSS) */
@keyframes slideUpSheet {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================================================
   Extra-Small Screens (<375px)
   ========================================================================== */
@media (max-width: 374px) {

    .hh-content {
        padding: 0.5rem;
        padding-top: calc(0.5rem + env(safe-area-inset-top, 0px));
        padding-left: calc(0.5rem + env(safe-area-inset-left, 0px));
        padding-right: calc(0.5rem + env(safe-area-inset-right, 0px));
        padding-bottom: calc(0.5rem + 72px + env(safe-area-inset-bottom, 0px) + var(--hh-android-mobile-nav-lift, 0px));
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .hh-radio-group,
    .hh-checkbox-group {
        grid-template-columns: 1fr;
    }

    .hh-mobile-nav-item {
        font-size: 0.6875rem;
    }
}

/* Error UI */
#blazor-error-ui {
    background: var(--hh-dark-surface);
    border-top: 2px solid var(--hh-danger);
    bottom: 0;
    box-shadow: var(--hh-shadow-lg);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 1rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: var(--hh-z-modal);
    color: var(--hh-text-primary);
    border-radius: 0;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.75rem;
}

#blazor-error-ui .reload {
    color: var(--hh-primary);
    text-decoration: underline;
    margin-left: 0.5rem;
}

/* ==========================================================================
   Landscape Mode
   ========================================================================== */
@media (orientation: landscape) and (max-height: 500px) {
    .hh-discover {
        height: calc(100svh - 48px);
        max-height: calc(100svh - 48px);
        padding: 0.25rem;
    }

    .hh-card-stack {
        flex-direction: row;
        gap: 0.5rem;
    }

    .hh-profile-card {
        flex: 2;
    }

    .hh-swipe-actions {
        flex-direction: column;
        padding: 0 0.5rem;
        gap: 0.75rem;
        justify-content: center;
        flex: 0;
    }

    .hh-profile-image-container {
        aspect-ratio: unset;
        height: 100%;
    }

    .hh-mobile-nav {
        padding: 0.25rem 0;
    }

    .hh-mobile-nav-item {
        flex-direction: row;
        gap: 0.25rem;
    }

    .hh-metadata-content {
        padding: 1.5rem 1rem;
    }
}
