﻿/*
    Custom styles for ATPE Web application
*/
footer .nav.flex-column:not(.nav-pills) .nav-link {
    padding-bottom: 0;
    padding-top: 0;
}

.bg-red {
    --bs-bg-opacity: 1;
    background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
}

    .bg-red .nav-link:hover, .bg-red .nav-link:focus {
        color: var(--bs-nav-link-hover-color-over-red);
        text-decoration: underline;
    }

    .bg-red .nav-link {
        color: var(--bs-nav-link-color-over-red);
    
    }

    .bg-red p {
        color: var(--bs-text-color-over-red);
    }
.bg-gray {
    background: #F4F4F4;
}

.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link {
    color: var(--bs-white);
    background-color: var(--bs-dark);
    border-color: var(--bs-dark);
}

.nav-tabs .nav-link:hover {
    color: var(--bs-primary);
    text-decoration: none;
}

.nav-tabs .nav-link:focus {
    color: var(--bs-white);
    text-decoration: none;
}

/* Fix: prevent .form-control from breaking checkbox appearance */
input.form-control[type="checkbox"] {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: auto;
  -webkit-appearance: checkbox;
  -moz-appearance: checkbox;
  display: inline-block;
  vertical-align: middle;
  margin: 0 .5rem 0 0;
}

@media (min-width: 1200px) {
    .dropdown .dropdown-menu {
        max-width: 250px;
        width: 250px;
    }
}

.dropdown .dropdown-menu .dropdown-item {
    white-space: normal; /* Allow wrapping */
    word-break: break-word; /* Break long words if needed */
}

@media (min-width: 1200px) {
    .navbar-expand-xl .dropdown.dropend .dropdown-toggle {
        position: relative; /* Required for absolute positioning */
        padding-right: 2rem; /* Give space for the icon */
    }

        .navbar-expand-xl .dropdown.dropend .dropdown-toggle::after {
            content: "\f285";
            font-family: "bootstrap-icons" !important;
            position: absolute;
            right: 1rem;
            top: 50%; /* Center vertically */
            transform: translateY(-50%);
            font-size: 0.7rem;
            line-height: 1; /* Reset line height */
        }
}

.dropdown .nav-link {
    text-decoration: none;
}

/* Overlay Loader */
#overlay {
    position: fixed; /* Sit on top of the page content */
    display: none; /* Hidden by default */
    width: 100%; /* Full width (cover the whole page) */
    height: 100%; /* Full height (cover the whole page) */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5); /* Black background with opacity */
    z-index: 2; /* Specify a stack order in case you're using a different order for other elements */
    cursor: pointer; /* Add a pointer on hover */
}

#loader {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #b31d23;
    width: 120px;
    height: 120px;
    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Add animation to "page content" */
.animate-bottom {
    position: relative;
    -webkit-animation-name: animatebottom;
    -webkit-animation-duration: 1s;
    animation-name: animatebottom;
    animation-duration: 1s
}

@-webkit-keyframes animatebottom {
    from {
        bottom: -100px;
        opacity: 0
    }

    to {
        bottom: 0px;
        opacity: 1
    }
}

@keyframes animatebottom {
    from {
        bottom: -100px;
        opacity: 0
    }

    to {
        bottom: 0;
        opacity: 1
    }
}