﻿
.search-field input {
    width: 300px;
    border-left: none;
    font-weight: 400;
}

    .search-field input:focus {
        border: 1px solid #d5dcec;
        border-left: none;
    }

.search-field .input-group-text {
    padding-right: 0;
    padding-left: 15px;
}

.filter-bar {
    flex-direction: row;
    display: flex;
    gap: 15px;
}

    .filter-bar input, .filter-bar .input-group-prepend, .filter-bar .dropdown button {
        height: 40px !important;
        border-radius: 5px;
    }

    .input-group-text, .filter-bar .dropdown button {
        font-weight: 600;
        border-radius: 5px;
        font-size: 14px;
        line-height: 1.5;
        color: #020617 !important;
    }

.dropdown-item {
    font-size: 14px;
}


input {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    font-size: 14px !important;
}

.dropdown-toggle {
    background-color: white;
    padding: 8px 30px 8px 12px;
    height: 35.5px;
    color: black;
    font-weight: 600;
}

    .dropdown-toggle strong {
        position: absolute;
        color: black;
        bottom: 6px;
    }

.table th {
    color: #020617 !important;
}

.table tr {
    background-color: white;
    cursor: pointer;
    position: relative;
    color: #020617;
}

#ReferralsJQueryTable_wrapper {
    overflow: auto;
}


#RewardsJQueryTable_filter, #RewardsJQueryTable_paginate, #ReferralsJQueryTable_filter, #ReferralsJQueryTable_paginate {
    display: none;
}

#RewardsJQueryTable img, #ReferralsJQueryTable img {
    margin-right: 8px;
}

table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-collapse: collapse !important;
}

.cards tbody tr {
    border: 0.0625rem solid rgba(0, 0, 0, .125);
    border-radius: 8px;
    padding: 16px;
    width: 100%;
}

.cards tbody td {
    border-top: 0;
    padding: 0 !important;
    display: flex;
    padding: 16px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1 0 0;
    align-self: stretch;
}

.cards thead {
    display: none;
}

.cards tbody {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card {
    border-radius: 10px;
}

.view-toggle button, #filterButton i {
    margin: 0;
    vertical-align: sub;
    font-size: 18px;
    padding-left: 12px;
    padding-right: 12px;
}

#filterButton button {
    padding-left: 10px;
    padding-right: 10px;
}

.view-toggle i {
    margin: 0;
}

.cards tr td:not(:first-child) {
    display: none;
}

.cards tr > td:nth-child(1) > strong {
    font-size: 14px;
}

.rewardStatusBadge, .referralStatusBadge {
    display: none;
}

.cards .rewardStatusBadge, #side-drawer .rewardStatusBadge,
.cards .referralStatusBadge, #side-drawer .referralStatusBadge {
    display: inline-block !important;
    font-weight: 600;
    border-radius: 9999px;
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    padding: 2px 8px;
    color: #475569;
    font-size: 12px;
}

.cards .card-info {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    align-self: stretch;
}

.cards .topRow {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    align-self: stretch;
}

.cards .cardHeader {
    display: flex;
    align-items: center;
    align-content: center;
    gap: 8px;
    flex: 1 0 0;
    flex-wrap: wrap;
}

.cards .nameBadgeContainer {
    display: flex;
    align-items: center;
    align-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.referralName {
    display: flex !important;
    align-items: center;
}

    .referralName span {
        max-width: 200px;
    }

.cards .referralName {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* Ensure this is set to prevent wrapping */
    font-size: 15px;
    line-height: 11px;
    max-width: 194px;
    display: inline-block !important;
}

.page-item.active > .page-link, .page-link:hover, .pagination .page-item:hover .page-link, .pagination .page-item.active .page-link {
    background-color: #F8FAFC !important;
    background: #F8FAFC;
    color: black;
    border-color: #d5dcec;
}

.card-info strong {
    font-weight: 600 !important;
    color: #020617;
}

.dataTable .mdi-chevron-right {
    display: none;
}

.cards .mdi-chevron-right {
    display: flex;
    padding: 8px 0px;
    align-items: flex-start;
    gap: 8px;
}

.card-line {
    padding-top: 4px;
    font-size: 0.8rem;
    display: flex; /* This ensures the strong and span are aligned in a row */
    max-width: 320px; /* Max width applied to the container */
}

    .card-line span {
        color: #64748B;
        font-weight: 400;
        flex: 1 1 auto;
        min-width: 0;
        white-space: normal;
        word-break: break-word; /* Breaks long unbreakable strings */
    }

    .card-line strong {
        flex: 0 0 auto;
        margin-right: 8px; /* Adjust space between strong and span */
    }


    .card-line .email {
        white-space: nowrap;
    }

.noteformember, .notefrommember {
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 320px;
    overflow-x: clip;
}


.card-line.notefrommember span,
.card-line.noteformember span {
    white-space: nowrap;
    overflow-x: clip;
    text-overflow: ellipsis;
    display: inline-block; /* or block */
    max-width: calc(100% - 20px); /* Adjust based on the strong element's width */
    min-width: 0; /* For flex children in Firefox */
}

.view-toggle .btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

#NoRewardsMsg, #NoReferralsMsg {
    display: none;
    width: 100%;
    text-align: center;
    padding: 48px;
    margin: 0px auto;
    max-width: 500px;
}

.dataTables_wrapper .dataTable thead .sorting:before, .dataTables_wrapper .dataTable thead .sorting:after {
    display: none;
}

/* Bottom drawer*/
.modal.fade .modal-dialog {
    transform: translateY(100%);
    transition: transform .3s ease-out;
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

#filter-modal .modal-dialog {
    position: fixed;
    margin: 0;
    width: 100%;
    bottom: 0;
}

#filter-modal .modal-content {
    min-height: 20vh; /* Adjust the drawer height as needed */
    border-radius: 0.5rem 0.5rem 0 0;
    background-color: white;
}

.modal-header {
    color: #020617;
    padding: 15px 26px !important;
}

    .modal-header .close span {
        color: black !important;
        font-size: 25px !important;
        font-weight: bold !important;
    }

.modal-body strong {
    font-size: 14px;
    color: #020617;
}

.modal-body select {
    font-size: 14px;
    color: #020617;
    font-weight: 400;
}


/*Filters mobile*/
@media screen and (max-width: 991px) {
    .cards tbody {
        grid-template-columns: repeat(2, 1fr);
    }

    .view-toggle, #filterBar .dropdown {
        display: none;
    }

    #filterButton {
        display: block !important;
    }

    .cards tr:last-child {
        margin: 0;
    }
}

.rewardName, .referralName {
    display: inline-block;
    font-size: 14px;
    color: black;
    font-weight: 600;
}

.cards tbody:has(.dataTables_empty) {
    grid-template-columns: repeat(1, 1fr);
}

tr:has(> .dataTables_empty) {
    cursor: default;
    background-color: white !important;
}

.dataTables_empty h5 {
    color: #020617;
    font-size: 14px;
}

.dataTables_empty p {
    color: #64748B;
    font-size: 14px;
}

.btn-inverse-light {
    color: #020617 !important;
    font-weight: 600;
    border-radius: 5px;
    padding-left: 12px;
    padding-right: 12px;
}


@media screen and (max-width: 770px) {
    .cards tbody {
        grid-template-columns: repeat(1, 1fr);
    }
}

/*Pagination mobile*/
@media screen and (max-width: 767px) {
    #paginationDropdown {
        text-align: center;
        margin: 0 auto;
    }

    #RewardsPaginationContainer div.col-md-4.row, #referralsPaginationContainer div.col-md-4.row {
        justify-content: center;
    }

    /*Drawer mobile*/
    #side-drawer {
        width: 100% !important;
        right: -336px;
        opacity: 0;
    }
}

/* Bootstrap drawer */
#side-drawer {
    height: 100vh;
    width: 500px; /* Reference: https://forums.envato.com/t/standard-sidebar-width/75633 */
    z-index: 1050; /* z-index of standard bootstrap navbar is 1030 + 1 offset due to side-drawer-void */
    top: 0;
    right: -700px;
    transition: right 0.3s ease;
}

.scrollable-drawer {
    overflow-x: hidden;
    overflow-y: auto;
    background: white;
}

.hidden-scrollbar {
    overflow: hidden;
}

    #side-drawer img {
        display: block;
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
        border-radius: 30px;
    }

    #side-drawer .rewardStatusBadge, #side-drawer .referralStatusBadge {
        font-size: 12px;
        margin-left: 5px;
    }

    #side-drawer #drawer-title span {
        font-size: 24px;
        vertical-align: sub;
        font-weight: 600;
        overflow-wrap: break-word;
    }

    #side-drawer strong {
        font-size: 14px;
        font-weight: 600 !important;
        color: #020617;
    }

    #side-drawer .rewardName, #side-drawer .referralName {
        display: block;
    }

#side-drawer-void {
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1031; /* z-index of standard bootstrap navbar is 1030 */
    background: rgba(0,0,0,.6);
}

table.dataTable td {
    font-size: 14px;
    font-weight: 500;
    padding: 16px 16px;
}

/*Sort icon fixes and padding fix*/
table.dataTable thead th {
    white-space: nowrap;
    padding: 15px 15px;
    font-size: 14px;
}

table.dataTable thead span.sort-icon {
    display: inline-block;
    padding-left: 5px;
    width: 16px;
    height: 16px;
    top: 4px;
    position: relative;
}

table.dataTable thead .sorting span {
    background: url('http://cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/images/sort_both.png') no-repeat center right;
}

table.dataTable thead .sorting_asc span {
    background: url('/images/icons8-sort-up-50.png') no-repeat center;
    background-size: 12px 12px;
}

table.dataTable thead .sorting_desc span {
    background: url('/images/icons8-sort-down-50.png') no-repeat center;
    background-size: 12px 12px;
}

table.dataTable thead .sorting_asc_disabled span {
    background: url('http://cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/images/sort_asc_disabled.png') no-repeat center right;
}

table.dataTable thead .sorting_desc_disabled span {
    background: url('http://cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/images/sort_desc_disabled.png') no-repeat center right;
}
