﻿/*
    Custom styles for TTV Web application
*/
.bg-dark .nav-link:hover, .bg-dark .nav-link:focus {
    color: var(--bs-nav-link-hover-color-over-red);
    text-decoration: underline;
}

.bg-dark .nav-link {
    color: var(--bs-nav-link-color-over-red);
}

.bg-dark p {
    color: var(--bs-text-color-over-red);
}

.navbar-nav .nav-link:hover, .navbar-nav .nav-link:focus {
    color: var(--bs-primary);
    text-decoration: none;
}

.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link {
    color: var(--bs-white);
    background-color: #f6b119;
    border-color: #f6b119;
}

.nav-tabs .nav-link:hover {
    color: var(--bs-primary);
    text-decoration: none;
}

.nav-tabs .nav-link:focus {
    color: var(--bs-white);
    text-decoration: none;
}

.page-link.active, .active > .page-link {
    background-color: var(--bs-dark);
    border-color: var(--bs-dark);
}

@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 */
}

    .dropdown .dropdown-menu .dropdown-item:hover,
    .dropdown .dropdown-menu .dropdown-item:focus {
        color: var(--bs-primary);
    }

@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;
}

/* MapBox Widget - Loading Overlay */
#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: 2000; /* High z-index to ensure it's on top */
    cursor: wait; /* Show loading cursor */
}

#loader {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2001;
    width: 120px;
    height: 120px;
    margin: -75px 0 0 -75px;
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #b31d23; /* TTV red color */
    -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); }
}

/* Candidate Profile - Sticky Sidebar */
/* Only sticky on tablet and desktop (768px+), matches original data-sticky-for="768" */
@media (min-width: 768px) {
    .candidate-sidebar-sticky {
        position: sticky;
        top: 100px; /* Matches original data-margin-top="100" */
        align-self: flex-start; /* Prevents stretching to full column height */
    }
}