/* Phone tab bar. Text that sits on a solid green background stays white. */

.badge.bg-success,
a.badge.bg-success,
.btn-success,
.btn-success.btn-sm {
    color: #fff;
}

.shefa-visitor-links {
    display: none;
}

.shefa-member-tabs {
    display: none;
}

@media (max-width: 991.98px) {
    html.shefa-has-member-tabs {
        --shefa-mobile-tab-offset: calc(78px + env(safe-area-inset-bottom, 0px));
    }

    html.shefa-has-member-tabs body,
    html.shefa-has-member-tabs .shefa-hg-main-scroll {
        padding-bottom: 6.25rem;
        scroll-padding-bottom: 6.25rem;
    }

    html.shefa-has-member-tabs .shefa-admin-dash-shell,
    html.shefa-has-member-tabs .content-wrapper {
        padding-bottom: 6.25rem;
    }

    html.shefa-has-member-tabs .shefa-topbar-mobile-actions .shefa-cart-link,
    html.shefa-has-member-tabs #menu-toggle,
    html.shefa-has-member-tabs #shefa-user-dash-shell > .shefa-dash-mobile-menu,
    html.shefa-has-farm-tabs .shefa-topbar-mobile-actions .shefa-cart-link,
    html.shefa-has-farm-tabs #menu-toggle,
    html.shefa-has-farm-tabs #shefa-farm-dash-shell > .shefa-dash-mobile-menu {
        display: none !important;
    }

    html.shefa-has-farm-tabs .shefa-dash-shell,
    html.shefa-has-farm-tabs .shefa-dash-main {
        padding-bottom: 6.25rem;
    }

    html.shefa-has-farm-tabs #shefaProfileReminder {
        display: none !important;
    }

    .shefa-visitor-links {
        display: flex;
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
        gap: 0.85rem;
        align-items: center;
        padding: 0.15rem 0.15rem 0.35rem;
        order: 3;
    }

    .main-header,
    .main-header .navbar,
    .shefa-topbar-inner,
    .shefa-hg-shell,
    .shefa-hg-main,
    .shefa-hg-main-scroll {
        max-width: 100%;
    }

    .shefa-pl-layout,
    .shefa-pl-results,
    .shefa-product-listing-grid,
    .shefa-farm-listing-grid,
    .shefa-product-listing-grid > [class*="col-"],
    .shefa-farm-listing-grid > [class*="col-"],
    .shefa-search-results .row > [class*="col-"] {
        min-width: 0;
        max-width: 100%;
    }

    .shefa-visitor-links a {
        color: #2f6b2c;
        font-size: 0.92rem;
        font-weight: 700;
        text-decoration: none;
    }

    .shefa-topbar-inner {
        flex-wrap: wrap;
    }

    .shefa-member-tabs {
        display: flex;
        position: fixed;
        z-index: 1040;
        justify-content: space-around;
        align-items: center;
        gap: 0.1rem;
    }

    .shefa-member-tabs--pill {
        left: 12px;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        padding: 6px 10px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid #e4efe2;
        box-shadow: 0 10px 28px rgba(51, 59, 50, 0.14);
    }

    .shefa-member-tabs--solid {
        left: 0;
        right: 0;
        bottom: 0;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        border-radius: 0;
        background: #fff;
        border: 0;
        border-top: 1px solid #e4efe2;
        box-shadow: 0 -6px 20px rgba(51, 59, 50, 0.08);
    }

    .shefa-member-tab {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 3.15rem;
        color: #333b32;
        text-decoration: none;
        font-weight: 600;
        border-top: 0;
        border-radius: 20px;
        position: relative;
    }

    .shefa-member-tab-label {
        font-size: 0.8125rem;
        line-height: 1.15;
    }

    .shefa-member-tab.is-active {
        color: #2f6b2c;
    }

    .shefa-member-tab-icon {
        position: relative;
        width: 42px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.12rem;
        line-height: 1;
        margin-bottom: 0.05rem;
        border-radius: 999px;
    }

    .shefa-member-tab.is-active .shefa-member-tab-icon {
        background: #eef8e8;
    }

    .shefa-member-tab-count {
        position: absolute;
        top: -0.35rem;
        right: -0.7rem;
        min-width: 1.15rem;
        height: 1.15rem;
        padding: 0 0.25rem;
        border-radius: 999px;
        background: #fff;
        color: #173616;
        border: 1px solid #3f8a3b;
        font-size: 0.6875rem;
        font-weight: 700;
        line-height: 1.1rem;
        text-align: center;
    }

    .shefa-member-tab-dot {
        position: absolute;
        top: -0.15rem;
        right: -0.35rem;
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 50%;
        background: #c2410c;
    }

    html[data-bs-theme="dark"] .shefa-member-tabs--pill {
        background: #1c1c1c;
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    }

    html[data-bs-theme="dark"] .shefa-member-tabs--solid {
        background: #161616;
        border-top-color: rgba(255, 255, 255, 0.12);
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.45);
    }

    html[data-bs-theme="dark"] .shefa-member-tab {
        color: #d0d0d0;
    }

    html[data-bs-theme="dark"] .shefa-member-tab.is-active {
        color: #d7ead2;
    }

    html[data-bs-theme="dark"] .shefa-member-tab.is-active .shefa-member-tab-icon {
        background: rgba(91, 140, 81, 0.35);
    }

    html[data-bs-theme="dark"] .shefa-member-tab-count {
        background: #1c1c1c;
        color: #f2f2f2;
        border-color: #5b8c51;
    }
}

.shefa-account-home {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shefa-account-card,
.shefa-join-farm-box,
.shefa-share-card {
    background: #f3faf1;
    border: 1px solid #d5ead2;
    border-radius: 1rem;
    padding: 0.9rem 1rem;
}

.shefa-account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e4efe2;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.shefa-account-row:last-child {
    border-bottom: 0;
}

.shefa-account-group {
    background: #fff;
    border: 1px solid #e4efe2;
    border-radius: 1rem;
    padding: 0.15rem 0.9rem;
}

.shefa-today-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.shefa-today-stat {
    display: block;
    min-width: 0;
    border: 1px solid #d7ead3;
    border-radius: 0.9rem;
    background: #fff;
    padding: 0.7rem 0.55rem;
    color: inherit;
    text-decoration: none;
}

.shefa-today-stat small {
    display: block;
    color: #5c6b5c;
    font-size: 0.72rem;
    font-weight: 600;
}

.shefa-today-stat strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.15rem;
}

.shefa-today-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: #2f6b2c;
    text-decoration: none;
}

.shefa-today-bell span {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 1rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    background: #e37b12;
    color: #fff;
    font-size: 0.65rem;
    line-height: 1rem;
    text-align: center;
}

@media (min-width: 992px) {
    #shefa-farm-reports[hidden] {
        display: block !important;
    }
}

.shefa-farm-section {
    margin: 0.35rem 0 0.4rem;
    color: #5c6b5c;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.shefa-saved-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.shefa-saved-tab {
    flex: 1 1 0;
    text-align: center;
    text-decoration: none;
    border: 1px solid #d7ead3;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    color: #2f6b2c;
    font-weight: 600;
    background: #fff;
}

.shefa-saved-tab.is-active {
    background: #3f8a3b;
    border-color: #3f8a3b;
    color: #fff;
}

.shefa-saved-farm-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.shefa-share-card .shefa-share-join {
    font-weight: 600;
    font-size: 1rem;
}

.shefa-account-todo + .shefa-account-todo {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #d5ead2;
}

.shefa-orders-quiet {
    color: #3d5340;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .shefa-farm-tab-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    .shefa-member-documents-page .col-md-6,
    .shefa-member-documents-page .col-xl-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .shefa-chat-page .shefa-chat-layout {
        min-height: calc(100vh - 12rem);
    }
    .shefa-member-documents-page .card-body,
    .shefa-portal-page .shefa-portal-card .card-body {
        padding: 0.9rem;
    }
}
