/* =========================================================
   HERLEAX BMS — RESPONSIVE DESIGN
   ========================================================= */

/* TABLET */
@media (max-width: 1024px) {

    :root {
        --sidebar-width: 230px;
    }

    .app-topbar {
        padding: 0 18px;
    }

    .app-content {
        padding: 24px 18px 30px;
    }

    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar-user__info {
        display: none;
    }

}


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

    :root {
        --topbar-height: 62px;
    }

    .app-sidebar {
        width: min(280px, 86vw);

        transform: translateX(-100%);

        box-shadow: none;
    }

    .app-sidebar.open {
        transform: translateX(0);

        box-shadow: 8px 0 30px rgba(15, 23, 42, 0.12);
    }

    .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-overlay {
        display: block;
    }

    .app-topbar {
        left: 0;

        height: var(--topbar-height);

        padding: 0 14px;
    }

    .topbar-menu-button {
        display: block;

        margin-right: 8px;
    }

    .topbar-business__name {
        max-width: 190px;

        font-size: 14px;
    }

    .topbar-user__avatar {
        width: 34px;
        height: 34px;
    }

    .topbar-user__button {
        width: 26px;
        height: 30px;
    }

    .app-main {
        margin-left: 0;

        padding-top: var(--topbar-height);
    }

    .app-content {
        padding: 20px 14px 26px;
    }

    .app-footer {
        margin-left: 0;
    }

    .app-footer__inner {
        padding: 16px 14px;
    }

    .page-header {
        flex-direction: column;
        gap: 14px;

        margin-bottom: 20px;
    }

    .page-header__title {
        font-size: 21px;
    }

    .page-header__actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .card-body {
        padding: 16px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card__value {
        font-size: 22px;
    }

    .table th,
    .table td {
        padding: 11px 12px;
    }

}


/* SMALL MOBILE */
@media (max-width: 480px) {

    .app-content {
        padding: 16px 10px 22px;
    }

    .topbar-business__label {
        display: none;
    }

    .topbar-business__name {
        max-width: 145px;

        margin-top: 0;
    }

    .topbar-user__button {
        display: none;
    }

    .page-header__title {
        font-size: 19px;
    }

    .btn {
        width: 100%;
    }

    .page-header__actions .btn {
        width: auto;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-actions .btn {
        width: 100%;
    }

    .modal {
        padding: 10px;
    }

    .modal-dialog {
        max-height: calc(100vh - 20px);

        overflow-y: auto;
    }

}


/* REDUCE MOTION */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}
