/* General page layout */
html,
body {
    height: 100%;
    /* Ensure the page takes full height */
}

.form-signin {
    max-width: 330px;
}

    .form-signin .form-floating:focus-within {
        z-index: 2;
    }

    .form-signin input[type="email"],
    .form-signin input[type="password"] {
        border-radius: 0.375rem;
        /* Match Bootstrap's rounded corners */
        border: 1px solid var(--bs-border-color);
        padding: 0.5rem;
    }

    .form-signin input[type="password"] {
        margin-bottom: 10px;
    }

a:not([class]) {
    text-decoration: none;
}

    a:not([class]):hover {
        text-decoration: underline;
    }

label {
    margin-bottom: 0;
    padding-left: 0.5rem;
    color: var(--bs-body-color);
    /* Ensure labels match theme text color */
}

#content {
    min-height: 440px !important;
}

.form-control .form-select {
    width: 330px;
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
}

.breadcrumb {
    background-color: transparent;
    color: var(--bs-body-color);
}

/* Custom CSS for third-level dropdowns */
.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: -6px;
        display: none;
        background-color: var(--bs-body-bg);
        /* Match dropdowns with theme */
        color: var(--bs-body-color);
        /* Match text color */
        border: 1px solid var(--bs-border-color);
    }

    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }

    .dropdown-submenu > a::after {
        margin-left: 5px;
    }

/* Theme Light/Dark Mode */
:root {
    --bs-body-bg: #fff;
    --bs-body-color: #000;
    --bs-border-color: #dee2e6;
    --bs-primary: #0d6efd;
    --bs-secondary: #6c757d;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #121212;
    --bs-body-color: #f8f9fa;
    --bs-border-color: #343a40;
    --bs-primary: #0d6efd;
    --bs-secondary: #6c757d;
}

.footer-custom {
    margin-top: auto;
    /* Ensure the footer stays at the bottom */
}

    .footer-custom .dropup .dropdown-menu {
        bottom: 100%;
        /* Ensure the dropup menu aligns properly upwards */
        transform: translateY(-10px);
        /* Slight upward adjustment if necessary */
    }

/* Base Styles for AjaxToolkit TabContainer */
.ajax__tab_xp {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

    /* Tab Header Styles */
    .ajax__tab_xp .ajax__tab_header {
        display: flex;
        justify-content: start;
        background-color: var(--bs-body-bg) !important;
        border-bottom: 1px solid var(--bs-border-color);
        border-radius: 0.375rem 0.375rem 0 0;
        padding: 0.5rem;
        margin-bottom: 1rem;
    }

        /* Individual Tab Styles */
        .ajax__tab_xp .ajax__tab_header .ajax__tab_tab {
            flex: 1;
            text-align: center;
            font-weight: bold;
            padding: 0.75rem 1.5rem;
            cursor: pointer;
            border: 1px solid var(--bs-border-color);
            border-radius: 0.375rem 0.375rem 0 0;
            background-color: var(--bs-body-bg);
            color: var(--bs-body-color);
            margin-right: 0.5rem;
            transition: all 0.3s ease;
            background-image: none !important;
        }

            /* Hover State for Tabs */
            .ajax__tab_xp .ajax__tab_header .ajax__tab_tab:hover {
                background-color: var(--bs-secondary) !important;
                color: var(--bs-light) !important;
                transform: translateY(-2px);
            }

        /* Active Tab Styles */
        .ajax__tab_xp .ajax__tab_header .ajax__tab_active {
            background-color: var(--bs-primary) !important;
            color: var(--bs-white) !important;
            border-bottom: none;
            z-index: 2;
        }

    /* Tab Body Styles */
    .ajax__tab_xp .ajax__tab_body {
        background-color: var(--bs-body-bg) !important;
        color: var(--bs-body-color) !important;
        padding: 1.5rem;
        border: 1px solid var(--bs-border-color);
        border-radius: 0 0 0.375rem 0.375rem;
        margin-top: -1px;
    }

/* Scrollable Content Area */
.ajax__scroll_none {
    overflow: auto;
    /*  max-height: 20rem;*/
}

/* Vertical Tab-Specific Styles */
.ajax__tab_xp .ajax__tab_body_verticalleft,
.ajax__tab_xp .ajax__tab_body_verticalright {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
    border: 1px solid var(--bs-border-color) !important;
}

/* Utility to Hide Borders */
.ajax__tab_xp .ajax__tab_header,
.ajax__tab_xp .ajax__tab_body {
    border: none !important;
}

/* Fix for the parent container holding buttons */
.button-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--bs-body-bg) !important;
    border: none !important;
    margin-top: 1rem;
}

    /* Individual Button Styles */
    .button-container button,
    .button-container .btn {
        padding: 0.75rem 1.5rem;
        border-radius: 0.375rem;
        font-weight: bold;
        border: 1px solid var(--bs-border-color);
        transition: all 0.3s ease-in-out;
    }

    .button-container .btn-primary {
        background-color: var(--bs-primary) !important;
        color: var(--bs-white) !important;
    }

    .button-container .btn-secondary {
        background-color: var(--bs-secondary) !important;
        color: var(--bs-white) !important;
    }

    /* Hover Effects for Buttons */
    .button-container .btn:hover {
        opacity: 0.9;
        transform: translateY(-2px);
    }

.modal-md {
    max-width: 540px;
}

/* Hover effects for radio and button groups */
.btn.btn-outline-success:hover {
    opacity: 0.9;
}

.btn.btn-outline-danger:hover {
    opacity: 0.8;
}
