/*
Theme Name: BUID Theme ok
Theme URI: https://buid.in
Author: Antigravity
Author URI: https://buid.in
Description: A custom Bootstrap 5 theme for BUID system.
Version: 2.0
Text Domain: buid-theme
*/

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

main {
    flex: 1;
    padding-top: 120px;
    /* Adjust based on header height */
}

.buid-main-header {
    background-color: #000;
    border-bottom: 2px solid #c9a961;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    width: 100%;
}

.buid-logo-icon {
    max-height: 80px;
    width: auto;
}

.buid-center-text {
    max-width: 400px;
    width: 100%;
    height: auto;
}

.navbar {
    background-color: transparent !important;
}

.navbar-nav {
    flex-direction: row;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover {
    color: #c9a961 !important;
}

.navbar-nav .nav-item {
    margin: 0 0.25rem;
}

/* Footer Styles */
footer.buid-footer {
    background-color: #2c2c2c;
    padding: 3px 0;
    margin-top: auto;
    width: 100%;
    color: #ffffff;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 50%;
    margin: 0 auto;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 400;
    margin: 5px 0;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.footer-contact {
    font-size: 0.95rem;
    margin: 5px 0;
    color: #ffffff;
}

.footer-copyright {
    font-size: 0.85rem;
    margin: 5px 0 0 0;
    color: #ffffff;

    }

    .buid-center-text {
        max-width: 250px;
    }

    .navbar-nav {
        flex-direction: column;
        text-align: right;
    }
}

@media (max-width: 768px) {
    .buid-main-header .row {
        flex-direction: column;
        text-align: center !important;
    }

    .buid-main-header .col-md-3,
    .buid-main-header .col-md-6 {
        margin-bottom: 1rem;
    }

    .buid-logo-icon {
        max-height: 50px;
    }

    .buid-center-text {
        max-width: 200px;
    }
}

.admin-nav .list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.admin-nav .list-group-item:hover {
    background-color: #f8f9fa;
    border-left-color: #c9a961;
}

.admin-nav .list-group-item.active {
    background-color: #000;
    color: #fff;
    border-left-color: #c9a961;
}

.admin-nav .list-group-item.active:hover {
    background-color: #1a1a1a;
}

.card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 1.5rem;
}

.table {
    margin-top: 1rem;
}

.table thead {
    background-color: transparent !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.badge {
    padding: 0.35em 0.65em;
    font-size: 0.85em;
}

.form-control,
.form-select {
    border-radius: 0.25rem;
}

.alert {
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

/* Filter section positioning */
.filter-section {
    position: sticky;
    top: 120px;
    /* Adjust based on your main header height */
    z-index: 1030;
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6;
    padding: 15px 0;
    margin-bottom: 0;
}

/* Table Container and Header Fix */
.table-responsive {
    position: relative;
    overflow: auto;
    max-height: 49vh;
    margin-top: 1rem;
}

/* Main table styling */
#business-listings-table {
    border: 1px solid #dee2e6;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 0;
}

/* Fixed header that stays visible during scroll */
#business-listings-table thead.table-dark {
    position: sticky;
    top: 0;
    /* Stick to top of table container */
    z-index: 1020;
    background-color: #212529 !important;
}

#business-listings-table thead.table-dark th {
    background-color: #212529 !important;
    color: #fff !important;
    border: 1px solid #32383e !important;
    border-top: none !important;
    padding: 0.75rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

/* Table column widths */
#business-listings-table th:nth-child(1),
#business-listings-table td:nth-child(1) {
    width: 8%;
    min-width: 80px;
}

#business-listings-table th:nth-child(2),
#business-listings-table td:nth-child(2) {
    width: 15%;
    min-width: 120px;
}

#business-listings-table th:nth-child(3),
#business-listings-table td:nth-child(3) {
    width: 10%;
    min-width: 100px;
}

#business-listings-table th:nth-child(4),
#business-listings-table td:nth-child(4) {
    width: 12%;
    min-width: 120px;
}

#business-listings-table th:nth-child(5),
#business-listings-table td:nth-child(5) {
    width: 12%;
    min-width: 100px;
}

#business-listings-table th:nth-child(6),
#business-listings-table td:nth-child(6) {
    width: 12%;
    min-width: 100px;
}

#business-listings-table th:nth-child(7),
#business-listings-table td:nth-child(7) {
    width: 15%;
    min-width: 120px;
}

#business-listings-table th:nth-child(8),
#business-listings-table td:nth-child(8) {
    width: 10%;
    min-width: 100px;
}

#business-listings-table th:nth-child(9),
#business-listings-table td:nth-child(9) {
    width: 16%;
    min-width: 150px;
}

/* Table body styling */
#business-listings-table tbody td {
    border: 1px solid #dee2e6;
    border-top: none;
    padding: 0.75rem;
    vertical-align: top;
    background-color: #fff;
}

#business-listings-table tbody tr:first-child td {
    border-top: 1px solid #dee2e6;
}

/* Striped rows */
#business-listings-table.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        max-height: 42vh;
        font-size: 0.875rem;
    }

    #business-listings-table thead.table-dark th,
    #business-listings-table tbody td {
        padding: 0.5rem;
    }

    .filter-section {
        top: 100px;
        /* Adjust for smaller headers on mobile */
    }

    main {
        padding-top: 100px;
    }
}

/* WordPress admin bar adjustment */
body.admin-bar .buid-main-header {
    top: 32px;
}

body.admin-bar main {
    padding-top: 152px;
    /* 120px + 32px */
}

@media screen and (max-width: 782px) {
    body.admin-bar .buid-main-header {
        top: 46px;
    }

    body.admin-bar main {
        padding-top: 166px;
        /* 120px + 46px */
    }
}