/*
 * ConsignNext mobile overrides
 * Loaded after the main stylesheet.
 */

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.btn,
.form-control,
.form-select {
    min-height: 44px;
}


/*
 * Phone layouts
 */
@media (max-width: 768px) {

    .container,
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    /*
     * Navigation
     */
    .navbar-nav {
        margin-top: 0.5rem;
    }

    .nav-link {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    /*
     * Forms
     */
    .form-control,
    .form-select,
    .btn {
        font-size: 16px;
    }

    /*
     * Cards and panels
     */
    .card-body {
        padding: 0.85rem;
    }

    /*
     * Tables should scroll instead of compressing
     */
    table {
        font-size: 0.9rem;
    }

    /*
     * Search box in navbar
     */
    nav form.d-flex {
        width: 100%;
        margin-top: 0.5rem;
        margin-right: 0 !important;
    }

    nav form input {
        width: 100%;
    }

}

/* CN-3033: mobile keeps normal document scrolling. */
@media (max-width: 1199.98px) {
    .pos-checkout-card {
        position: static !important;
        max-height: none;
        overflow: visible;
    }

    .pos-checkout-actions {
        position: static;
    }

    .pos-basket-count {
        min-width: 6rem;
    }
}

/* CN-3033: Find Item uses normal document flow on smaller screens. */
@media (max-width: 991.98px) {
    .pos-item-detail-card {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .pos-item-detail-panel {
        display: block;
        overflow: visible;
    }

    .pos-selected-item-actions {
        position: static;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

/* CN-3037: Consignor Portal customer-facing responsive layout. */
.portal-summary-metric {
    padding: 1.5rem;
}

.portal-summary-metric-secondary {
    border-left: 1px solid var(--bs-border-color);
}

@media (max-width: 767.98px) {
    .portal-summary-metric {
        padding: 1rem;
    }

    .portal-summary-metric-secondary {
        border-left: 0;
        border-top: 1px solid var(--bs-border-color);
    }

    .portal-primary-actions .btn {
        width: 100%;
    }

    body.bg-body-tertiary .navbar-brand {
        white-space: normal;
        line-height: 1.2;
    }

    body.bg-body-tertiary nav .container {
        align-items: flex-start;
    }
}
