/* File: assets/css/responsive.css */

/* ---------------------------------------------------
   Responsive Table-to-Card Pattern (Below 768px)
--------------------------------------------------- */
@media (max-width: 767.98px) {
    .table-responsive-stack thead {
        display: none;
    }
    
    .table-responsive-stack tbody,
    .table-responsive-stack tr,
    .table-responsive-stack td {
        display: block;
        width: 100%;
    }
    
    .table-responsive-stack tr {
        margin-bottom: var(--space-4);
        background: var(--color-surface);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        padding: var(--space-2);
        border: 1px solid var(--color-border);
    }
    
    .table-responsive-stack td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid var(--color-border);
        border-top: none;
        min-height: 44px; /* Touch friendly row spacing */
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    
    .table-responsive-stack td:last-child {
        border-bottom: 0;
    }
    
    /* Before pseudo-element acts as the label column */
    .table-responsive-stack td::before {
        content: attr(data-label);
        position: absolute;
        left: var(--space-3);
        width: 45%;
        text-align: left;
        font-weight: bold;
        color: var(--color-steel);
        font-size: var(--fs-small);
    }

    /* ---------------------------------------------------
       Fixed Bottom Mobile Tab Bar (App-like feel)
    --------------------------------------------------- */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--mobile-bottom-nav-height);
        background-color: var(--color-surface);
        box-shadow: 0 -2px 10px rgba(23, 52, 4, 0.1);
        z-index: 1030;
        padding-bottom: env(safe-area-inset-bottom);
        justify-content: space-around;
        align-items: center;
    }
    
    .mobile-bottom-nav-link {
        color: var(--color-steel);
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: var(--fs-xs);
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }
    
    .mobile-bottom-nav-link.active {
        color: var(--color-primary);
        font-weight: bold;
    }
    
    .mobile-bottom-nav-link i {
        font-size: 1.25rem;
        margin-bottom: 2px;
    }
    
    /* Ensure content doesn't hide behind the fixed bar */
    body {
        padding-bottom: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom) + var(--space-4));
    }
}

/* Hide mobile tab bar on tablets and desktops */
@media (min-width: 768px) {
    .mobile-bottom-nav {
        display: none;
    }
}