/* Poppins Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Special+Gothic:wght@400..700&display=swap');

/*#region ColorModes */
[data-bs-theme="light"] {
    --bs-body-bg: #fafaff;
    --bs-bg-gradient: linear-gradient(35deg, #d4d8d9, #8ba4f6);
    --bs-bg-gradient-secondary: linear-gradient(35deg, #c3c3c3, #7c8dc9);
    --bs-bg-button-gradient: linear-gradient(35deg, #a498b5, #2849bd);
    --bs-body-bg-secondary: #ffffff;
    --bs-primary: #475569;
    --bs-icon-bg: #a0c3ed;
    --bs-border-color: #e4e4e4;
    --bs-theme-color1: #1b36cf;
    --btn-border: #a97aff;
    /*Images*/
    --bg-image: url(/img/Authentication/bg-primary-light.jpg);
}

[data-bs-theme="dark"] {
    --bs-body-bg: #121130;
    --bs-bg-gradient: linear-gradient(35deg, #00479F, #001239);
    --bs-bg-gradient-secondary: linear-gradient(35deg, #c3c3c3, #7c8dc9);
    --bs-bg-button-gradient: linear-gradient(35deg, #433457, #0f2267);
    --bs-body-bg-secondary: #1c1d3b;
    --bs-primary: #ffffff;
    --bs-icon-bg: rgb(74, 63, 82);
    --bs-border-color: #282733;
    --bs-theme-color1: #c990d6;
    --btn-border: #813dff;
    /*Images*/
    --bg-image: url(/img/Authentication/bg-primary-dark.jpg);
}

/*#endregion*/

/*#region HTML Elements*/

a {
    text-decoration: none;
}

li {
    list-style: none;
}

body {
    font-family: 'Poppins', sans-serif;
    background-image: var(--bg-image) !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    margin: 0;
    height: 100vh;
    overflow: hidden;
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6) center center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    z-index: 9999;
}

/* Spinner */
.spinner {
    border-top: 6px solid #fff;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wrapper {
    display: flex;
    height: 100vh; /* Full viewport height */
    overflow: hidden;
}

.form-control {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: #fff;
}

main {
    flex: 1 0 auto;
}

.table-transparent {
    background-color: transparent !important;
}

    .table-transparent th {
        background-color: transparent !important;
        font-weight: 400;
    }

    .table-transparent td {
        background-color: transparent !important;
        font-size: 15px;
        font-weight: 400;
    }

.table tr {
    line-height: 2;
}

/*#endregion*/

/*#region Layout*/

.main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    transition: all 0.25s ease-in-out;
}

.main-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
}

.reg-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    transition: all 0.25s ease-in-out;
    background-image: var(--bg-image);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.log-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    transition: all 0.25s ease-in-out;
    background-image: var(--bg-image);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

#navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bs-border-color);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}

#sidebar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid var(--bs-border-color);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    width: 80px;
    min-width: 80px;
    transition: all 0.25s ease-in-out;
    display: flex;
    flex-direction: column;
}

    #sidebar #logo-container {
        padding-left: 25px;
        padding-right: 25px;
    }

    #sidebar.expand {
        width: 270px;
        min-width: 270px;
    }

    #sidebar .close-btn {
        display: none;
    }

footer {
    border-top: 1px solid var(--bs-border-color);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    flex-shrink: 0;
}

.page-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

@media (max-width: 992px) {

    #sidebar {
        display: none;
    }

        #sidebar.expand {
            display: block;
            width: 100%;
            min-width: 100%;
        }

        #sidebar:not(.expand) .sidebar-item .sidebar-dropdown {
            position: absolute;
            top: 0;
            left: 40px !important;
            background-color: #0e2238;
            padding: 0;
            min-width: 15rem;
            display: none;
        }

        #sidebar .close-btn {
            color: var(--bs-primary) !important;
            display: block;
        }
}

.height-700 {
    min-height: 770px;
}

/*#endregion*/

/*#region SideBar*/

#sidebar .logo-full {
    display: none;
}

#sidebar .logo-compact {
    display: block;
    width: 40px;
    transition: opacity 0.2s ease;
}

.logo-toast {
    display: block;
    width: 25px;
    transition: opacity 0.2s ease;
}

#sidebar.expand .logo-full {
    display: block;
}

#sidebar.expand .logo-compact {
    display: none;
}

#sidebar:not(.expand) a.sidebar-link span {
    display: none;
}

.toggle-btn {
    width: 30px;
    height: 30px;
    color: var(--bs-primary) !important;
    border-radius: 0.425rem;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
}

.headertoggle-btn {
    font-size: small;
    border: 0;
    color: var(--bs-body-bg-secondary);
    background-color: transparent;
}

.toggle-btn i {
    color: var(--bs-primary);
}

#sidebar.expand.sidebar-logo,
#sidebar.expand a.sidebar-link span {
    animation: fadeIn .25s ease;
}

.navbar-brand img {
    max-height: 35px;
    max-width: 70px;
    object-fit: contain;
}

.sidebar-logo a img {
    max-height: 30px;
    max-width: 120px;
    object-fit: contain;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.sidebar-nav {
    padding: 0.7rem 0;
    flex: 1 1 auto;
    z-index: 10;
    overflow-y: auto;
}

.sidebar-link {
    position: relative;
}

a.sidebar-link {
    padding: .625rem 1.625rem;
    color: var(--bs-primary);
    display: block;
    white-space: nowrap;
    font-weight: 700;
    border-radius: 45rem;
    border-left: 3px solid transparent;
}

.sidebar-link i,
.dropdown-item i {
    font-size: 1.3rem;
    margin-right: .75rem;
}

#sidebar.expand a.sidebar-link:hover {
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
    padding-left: 2.5rem;
    background-color: var(--bs-icon-bg);
    color: var(--bs-theme-color1);
    transition: all .5s ease-in-out;
}

#sidebar a.sidebar-link:not(.has-dropdown):hover {
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
    background-color: var(--bs-icon-bg);
    color: var(--bs-theme-color1);
    transition: all .5s ease-in-out;
}

a.sidebar-link:hover {
    color: var(--bs-theme-color1);
}

.sidebar-item {
    position: relative;
}

#sidebar:not(.expand) .sidebar-item .sidebar-dropdown {
    position: absolute;
    top: 0;
    left: 80px;
    background-color: hsla(0, 0%, 100%, 0.15);
    backdrop-filter: blur(30px);
    padding: 0;
    min-width: 15rem;
    display: none;
}

#sidebar:not(.expand) .sidebar-item:hover .has-dropdown + .sidebar-dropdown span {
    display: inline;
}

#sidebar:not(.expand) .sidebar-item:hover .has-dropdown + .sidebar-dropdown {
    display: block;
    max-height: 15rem;
    width: 100%;
    opacity: 1;
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"]::after {
    border: solid;
    border-width: 0 .075rem .075rem 0;
    content: "";
    display: inline-block;
    padding: 2px;
    position: absolute;
    right: 1.5rem;
    top: 1.4rem;
    transform: rotate(-135deg);
    transition: all .2s ease-out;
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"].collapsed::after {
    transform: rotate(45deg);
    transition: all .2s ease-out;
}

/*#endregion*/
/*#region ContentCards*/
.bg-card {
    background-image: var(--bs-bg-gradient);
    border-bottom: 1px solid var(--bs-border-color);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    border-radius: 5px;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.profile-card img {
    object-fit: contain;
    max-height: 200px;
    max-width: 180px;
    border-radius: 5px;
    border: solid 1.5px #a09cae;
}

.login-logo img {
    object-fit: contain;
    max-height: 25px;
    border-radius: 5px;
}

.insurance-card {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-image: var(--bs-bg-button-gradient);
    border-radius: 5px;
    padding: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 10px;
    width: 100%;
}

    .insurance-card:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    }

    .insurance-card .text {
        position: relative;
        z-index: 1;
        /* set colour, font-size etc */
    }

.clickable-div {
    cursor: pointer;
}

/*#endregion*/

/*#region Buttons*/

.primary-btn {
    border: 0.5px solid #462dfc;
    padding: 9px 30px;
    color: #ffffff;
    background-color: #462dfc;
}

    .primary-btn:hover {
        border: 0.5px solid #5331a8;
        padding: 9px 30px;
        color: #ffffff;
        background-color: #5331a8;
    }

.success-btn {
    border: 0.5px solid #58ad6b;
    padding: 9px 30px;
    color: #ffffff;
    background-color: #58ad6b;
}

    .success-btn:hover {
        border: 0.5px solid #208a37;
        padding: 9px 30px;
        color: #ffffff;
        background-color: #208a37;
    }

.warning-btn {
    border: 0.5px solid #ebe86a;
    padding: 9px 30px;
    color: #121200;
    background-color: #ebe86a;
}

    .warning-btn:hover {
        border: 0.5px solid #dbbc1f;
        padding: 9px 30px;
        color: #241e01;
        background-color: #dbbc1f;
    }

.danger-btn {
    border: 0.5px solid #db7048;
    padding: 9px 30px;
    color: #ffffff;
    background-color: #db7048;
}

    .danger-btn:hover {
        border: 0.5px solid #752102;
        padding: 9px 30px;
        color: #ffffff;
        background-color: #752102;
    }

/*#endregion*/

/* Form Inputs*/

.form-input {
    padding: 5px 10px;
    max-width: 100%;
    width: 100%;
    border-top: hidden;
    border-right: hidden;
    border-left: hidden;
    border-bottom: 1px solid white;
    color: white;
    background-color: transparent;
    transition: all ease 1s;
}

    .form-input:focus {
        padding-left: 1px;
        text-align: center;
        outline: none;
    }

.search-bar {
    width: 100%;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    border-radius: 60px;
    padding: 5px 10px;
    backdrop-filter: blur(4px) saturate(180%);
}

    .search-bar input {
        max-width:100%;
        min-width:50px;
        background-color: transparent;
        flex: 1;
        border: 0;
        outline: none;
        padding: 5px 15px;
        font-size: 16px;
        color: var(--bs-primary);
    }

    .search-bar button {
        border: 0;
        border-radius: 60px;
        width: 30px;
        height: 30px;
        cursor: pointer;
    }

        .search-bar button i {
            width: 15px;
        }

.signature-canvas {
    width: 100%;
    height: 250px;
    border: 2px dashed #aaa;
    border-radius: 10px;
    background-color: transparent;
}

.personnelProfile-image {
    height: 100%;
    width: 100%;
    max-width: 150px;
    max-height: 200px;
    object-fit: contain; /* ensures image fills container and is cropped */
    display: block;
}

/* Slightly smaller on very small viewports */
@media (max-width: 576px) {
    .profile-card .profile-image {
        width: clamp(64px, 28vw, 120px);
    }
}