﻿/* ############################ */
/* ##  CSS for Register Form ## */
/* ############################ */
.stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 2rem;
}

    .stepper::before {
        content: "";
        position: absolute;
        top: 30%;
        left: 0;
        right: 0;
        height: 2px;
        background-color: #dee2e6;
        z-index: 0;
    }

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

    .step .circle {
        height: 40px;
        width: 40px;
        line-height: 40px;
        background-color: #dee2e6;
        border-radius: 50%;
        display: inline-block;
        color: #495057;
        font-weight: bold;
        margin-bottom: 0.5rem;
    }

    .step.active .circle {
        background-color: var(--bs-primary);
        color: #fff;
    }

    .step.completed .circle {
        background-color: #198754;
        color: #fff;
    }

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
}

.step.active .step-label {
    color: var(--bs-primary);
}

.step.completed .step-label {
    color: #198754;
}

.step-form {
    display: none;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

    .step-form.active {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

.form-container {
    position: relative;
}

/* ######################### */
/* ##  CSS for DataTables ## */
/* ######################### */

.dt-paging .pagination {
    justify-content: center;
    margin-top: 1rem;
}

.dt-paging .page-item .page-link {
    color: black;
    border: none;
    border-radius: 50%;
    margin: 0 0.25rem;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    padding: 0;
    transition: 0.3s;
}

.dt-paging .page-item.active .page-link {
    background-color: var(--bs-primary);
    color: white;
    font-weight: bold;
}

.dt-paging .page-item .page-link:hover {
    background-color: var(--bs-primary);
    color: white;
}

/*#view_contacts thead tr, #adminUsersTable thead tr, #superAdminTable thead tr, #sms-logs-table thead tr {
    background: linear-gradient(90deg, #2196f3, #3f51b5);
}*/

#view_contacts thead th, #adminUsersTable thead th, #superAdminTable thead th, #sms-logs-table thead th {
    background: transparent !important;
    color: white !important;
    font-weight: bold;
    border: none !important;
}

/* ################### */
/* ##  CSS for Tabs ## */
/* ################### */

.navigational-panel {
    border: 1px #dee2e6 solid;
    border-top: none;
    border-radius: 0 0 5px 5px;
    padding: 5px;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.navigational .nav-link:not(.active) {
    background: white;
    border-radius: 5px;
    margin: 3px;
    padding: 10px 15px;
    filter: brightness(95%);
}

.navigational .nav-link.active {
    padding: 10px 20px;
    font-weight: bold;
}

[data-bs-theme="dark"] .nav-link:not(.active) {
    color: white
}


[data-bs-theme="dark"] .nav-link.active {
    color: var(--bs-primary)
}

@media (max-width: 576px) {
    .navigational-panel {
        border: none;
    }

    .nav-tabs {
        --bs-nav-tabs-border-width: 0;
    }
}

[data-bs-theme="dark"] .navigational-panel {
    /*    border: 0;*/
    border-color: var(--bs-border-color);
    box-shadow: none;
}

/* ##################### */
/* ##  CSS for Modals ## */
/* ##################### */

.badge-orange {
    background-color: #FF8800;
    color: #fff;
}

.checkbox-lg {
    transform: scale(1.5);
    margin-right: 0.5rem;
}

/* ###################### */
/* ##  CSS for NavMenu ## */
/* ###################### */

:root {
    /* Base nav text color → use body text */
    --nav-color: var(--bs-body-color);
    /* Hover / active accent → use primary color */
    --nav-hover-color: var(--bs-primary);
    /* Mobile nav background → use body background */
    --nav-mobile-background-color: var(--bs-body-bg);
    /* Dropdown background → use dropdown background */
    --nav-dropdown-background-color: var(--bs-body-bg);
    /* Dropdown text → use dropdown link color */
    --nav-dropdown-color: var(--bs-primary);
    /* Dropdown hover/active → use dropdown hover color */
    --nav-dropdown-hover-color: var(--bs-dropdown-link-hover-color);
}

/*html, body {
    overflow-x: hidden;
}*/

.navbar-brand:hover,
.nav-link:hover {
    color: white;
}

.nav-link {
    padding: 0 20px;
}

    .nav-link:not(.active) {
        color: var(--bs-primary);
/*        background-color: transparent !important;*/
        /*opacity: 0.85;*/ /* slightly dim to show it's inactive */
        transition: color 0.2s ease, opacity 0.2s ease;
    }

#mainNavbar li {
    position: relative;
    font-family: 'Roboto Flex', sans-serif;
}

#mainNavbar > ul > li > a:before {
    content: "";
    position: absolute;
    height: 2px;
    bottom: -6px;
    left: 0;
    background-color: rgba(67, 206, 162, 0.85);
    visibility: hidden;
    width: 0px;
    transition: all 0.3s ease-in-out;
}

/* ########################### */
/* ##  Custom NavMenu CSS   ## */
/* ########################### */

.navmenu {
    padding: 0;
    position: relative;
}

    .navmenu ul {
        margin: 0;
        padding: 0;
        display: flex;
        list-style: none;
        align-items: center;
    }

    .navmenu li {
        position: relative;
    }

    .navmenu > ul > li {
        white-space: nowrap;
        padding: 15px 14px;
    }

        .navmenu > ul > li:last-child {
            padding-right: 0;
            padding-left: 0;
        }

    .navmenu a,
    .navmenu a:focus {
        color: var(--nav-color);
        font-size: 14px;
        padding: 0 2px;
        font-family: 'Roboto Flex', sans-serif;
        font-weight: 400;
        display: flex;
        align-items: center;
        justify-content: space-between;
        white-space: nowrap;
        transition: 0.3s;
        position: relative;
        text-transform: uppercase;
        text-decoration: none;
    }

        .navmenu a i,
        .navmenu a:focus i {
            font-size: 12px;
            line-height: 0;
            margin-left: 5px;
            transition: 0.3s;
        }

    .navmenu > ul > li > a:before {
        content: "";
        position: absolute;
        height: 2px;
        bottom: -6px;
        left: 0;
        background-color: rgba(67, 206, 162, 0.85);
        visibility: hidden;
        width: 0px;
        transition: all 0.3s ease-in-out;
    }

    /* Dropdown Style */
    .navmenu .dropdown ul {
        margin: 0;
        padding: 10px 0;
        background: var(--nav-dropdown-background-color);
        display: block;
        position: absolute;
        visibility: hidden;
        left: auto;
        right: 0;
        top: 130%;
        opacity: 0;
        transition: 0.3s;
        border-radius: 4px;
        z-index: 999;
        box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.1);
        min-width: 200px;
        max-width: 90vw;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .navmenu .dropdown:hover > ul {
        opacity: 0 !important;
        visibility: hidden !important;
        top: 130% !important;
        pointer-events: none !important;
    }

    .navmenu .dropdown ul li {
        width: 100%;
    }

    .navmenu .dropdown ul a {
        padding: 10px 20px;
        font-size: 15px;
        text-transform: none;
        color: var(--nav-dropdown-color);
        display: block;
        white-space: normal;
    }

        .navmenu .dropdown ul a:hover,
        .navmenu .dropdown ul .active:hover,
        .navmenu .dropdown ul li:hover > a {
            color: var(--nav-dropdown-hover-color);
            background-color: rgba(0, 0, 0, 0.03);
        }

    /* Multi-level dropdown fix */
    .navmenu .dropdown .dropdown ul {
        top: 0;
        left: auto;
        right: 100%;
        visibility: hidden;
    }

    .navmenu .dropdown .dropdown:hover > ul {
        opacity: 1;
        top: 0;
        right: 100%;
        visibility: visible;
    }

.avatar-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #6c757d;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

    .avatar-circle:hover {
        background-color: #495057;
    }

.initials {
    user-select: none;
}

.navmenu .dropdown ul {
    pointer-events: none; /* disable hover-based dropdown */
}

    .navmenu .dropdown ul.show {
        opacity: 1 !important;
        visibility: visible !important;
        top: 100% !important;
        pointer-events: auto !important;
    }

/* Sidebar (mobile only) */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -260px; /* hidden by default */
    width: 260px;
    height: 100vh;
    background: var(--bs-body-bg);
    box-shadow: 2px 0 8px rgba(0,0,0,0.3);
    transition: left 0.3s ease;
    z-index: 2000;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

    .mobile-sidebar.open {
        left: 0; /* slide in */
    }

    .mobile-sidebar ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-sidebar li {
        margin-bottom: 1rem;
    }

    .mobile-sidebar a {
        text-decoration: none;
        color: var(--nav-color, #333);
        font-size: 16px;
        display: block;
    }

.mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    display: none;
}

    .mobile-sidebar-overlay.show {
        display: block;
    }

#themeToggle {
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    #themeToggle:hover {
        background-color: var(--bs-primary);
    }

[data-bs-theme="dark"] #themeToggle:hover {
    background-color: var(--bs-primary);
}
[data-bs-theme="dark"] #themeToggle {
    color: var(--bs-white);
    border: var(--bs-white);
}
    /* Show burger only on mobile */
    @media (max-width: 768px) {
        .navbar-toggler {
        display: block;
    }

/*    .navmenu, .navbar-nav {
        display: none !important;
    }

        .navmenu ul {
            flex-direction: column;
            align-items: flex-start;
        }

        .navmenu .dropdown ul {
            position: static;
            display: block !important;
            opacity: 1 !important;
            visibility: visible !important;
            box-shadow: none;
        }*/
}

/* ############################ */
/* ## Custom NavMenu CSS #2  ## */
/* ############################ */

.apps-modal, .theme-modal {
    margin: 0;
    padding: 10px;
    background: var(--nav-dropdown-background-color);
    display: flex;
    flex-wrap: wrap;
    position: absolute;
    top: 130%;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    border-radius: 4px;
    z-index: 999;
    box-shadow: var(--nav-dropdown-shadow);
    width: 300px;
    min-width: 300px;
    color: var(--nav-dropdown-text);
}

    .apps-modal.show, .theme-modal.show {
        opacity: 1;
        top: 100%;
        visibility: visible;
    }

    .apps-modal li {
        flex: 0 0 33.3333%;
        padding: 5px;
        text-align: center;
        list-style: none;
        box-sizing: border-box;
    }

    .apps-modal a, .theme-modal a {
        display: block;
        padding: 6px;
        border-radius: 0.375rem;
        color: inherit;
        text-decoration: none;
        transition: background-color .2s ease, color .2s ease;
    }

        .apps-modal a:hover, .theme-modal a:hover {
            background-color: rgba(0, 0, 0, 0.03); /* light mode hover */
            color: var(--nav-dropdown-hover-color);
        }

        .apps-modal a:hover, .theme-modal a:hover {
            background-color: rgba(0, 0, 0, 0.03);
            color: var(--nav-dropdown-hover-color);
        }

.theme-modal {
    width: 200px !important;
    min-width: 200px !important;
}

    .theme-modal :is(label) {
        color: var(--bs-body-color);
    }

.text-color-change ul li a:hover {
    color: var(--bs-primary) !important;
    filter: brightness(1.5)
}

/* Explicit Bootstrap dark theme */
[data-bs-theme="dark"] .apps-modal a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--nav-dropdown-hover-color);
}

[data-bs-theme="dark"] .apps-modal :is(i, small) {
    color: white;
}

/* Fallback: system dark when no explicit theme set */
@media (prefers-color-scheme: dark) {
    :root:not([data-bs-theme]) .apps-modal a:hover {
        background-color: rgba(255, 255, 255, 0.08);
        color: var(--nav-dropdown-hover-color);
    }
}
/* ############################## */
/* ##  Custom Breadcrumb CSS   ## */
/* ############################## */

.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    font-size: 0.95rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    padding: 0 0.5rem;
    color: var(--bs-body-color);
}

.plain-link {
    text-decoration: none;
    color: var(--bs-body-color);
}

    .plain-link:hover {
        color: red;
        cursor: pointer;
    }

/* ########################## */
/* ##  Member Modal  CSS   ## */
/* ########################## */
.profile-pic {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 4px solid #ddd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.details-grid {
    display: grid;
    grid-template-columns: 150px auto;
    gap: 8px 16px;
}

    .details-grid div {
        padding: 4px 0;
        font-size: 0.95rem;
    }


.modal-content {
    border-radius: 12px;
}

.modal-header {
    border-bottom: 2px solid #e9ecef;
}

.modal-footer {
    border-top: 2px solid #e9ecef;
}

[data-bs-theme="dark"] .modal-header, [data-bs-theme="dark"] .modal-footer, [data-bs-theme="dark"] .section-nav {
    border: 0
}

/* ####################### */
/* ## Custom Header CSS ## */
/* ####################### */
.pagination {
    --bs-pagination-color: #dc3545; /* text color */
    --bs-pagination-hover-color: #fff; /* hover text */
    --bs-pagination-hover-bg: #dc3545; /* hover background */
    --bs-pagination-active-bg: #dc3545; /* active background */
    --bs-pagination-active-border-color: #dc3545;
    --bs-pagination-focus-color: #fff;
    --bs-pagination-focus-bg: #dc3545;
}

thead.primary-table-header tr th {
    color: white !important;
}
