/*
Colours

    dark red:   #840212
    blue-black: #00343c
*/

body, html {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Sticky navbar adjustments */
.sticky-top {
    z-index: 1020;
    top: 0;
}

/* Remove default body margins that might cause gap */
body {
    margin-top: 0;
}

/* Add padding to content areas (not body) to prevent overlap with sticky navbar */
.content-section,
.container-fluid:not(.navbar .container-fluid) {
    padding-top: 80px; /* Space for navbar */
}

/* Reduce padding for compact navbar on non-home pages */
body:not(.home-page) .content-section,
body:not(.home-page) .container-fluid:not(.navbar .container-fluid) {
    padding-top: 65px; /* Slightly less for compact navbar */
}

/* Hero section should not have top padding - overlay handles navbar spacing */
.hero-section {
    padding-top: 0;
    margin-top: 0;
}

body, h1, h2, h3 {
    font-family: 'Titillium Web', sans-serif;
}

body {
    font-size: 14pt;
}

/* ProjeX Text Logo Styles */
.projex-text {
    font-size: 1.5em;
    text-decoration: none;
}

.projex-highlight {
    color: #840212; /* dark red */
}

.projex-normal {
    color: #333; /* dark gray */
}

/* Ensure navbar brand link styling doesn't affect our text */
.navbar-brand:hover .projex-text,
.navbar-brand:focus .projex-text {
    text-decoration: none;
}

/* Navbar Responsive Improvements */
.navbar {
    padding: 0.75rem 1rem;
}

/* Compact navbar for all pages except home */
body:not(.home-page) .navbar {
    padding: 0.375rem 1rem;
}

body:not(.home-page) .navbar-brand {
    padding-top: 0.1875rem;
    padding-bottom: 0.1875rem;
}

body:not(.home-page) .navbar-nav .nav-link {
    padding: 0.25rem 0.75rem;
}

body:not(.home-page) .projex-text {
    font-size: 1.25em;
}

body:not(.home-page) .navbar-nav .nav-link img {
    height: 32px;
}

/* Move entire navbar content to the right */
.navbar-collapse {
    justify-content: flex-end;
}

.navbar-brand {
    margin-right: 1rem;
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    margin-top: 0.125rem;
}

.navbar-toggler {
    padding: 0.375rem;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* ========================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ======================================== */

/* Mobile Typography - Tablet and below */
@media (max-width: 991.98px) {
    /* Base font size adjustment */
    body {
        font-size: 13pt;
    }

    /* Heading size adjustments */
    h1 {
        font-size: 2rem;
        margin: 20px 0 20px 0;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    h5 {
        font-size: 1.1rem;
    }

    /* Navbar adjustments */
    .navbar-collapse {
        border-top: 1px solid rgba(0, 0, 0, 0.125);
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }

    .navbar-nav .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: #f8f9fa;
        padding-left: 1rem;
    }

    .navbar-nav .dropdown-item {
        padding: 0.5rem 1rem;
    }

    /* Container padding reduction */
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Card spacing adjustments */
    .card {
        margin: 10px 5px;
    }

    .card-body {
        padding: 15px;
    }

    /* Table responsiveness */
    .table {
        font-size: 0.9rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
    }

    /* Button sizing for better touch targets */
    .btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }

    .btn-sm {
        min-height: 38px;
        padding: 0.375rem 0.75rem;
    }

    /* Form inputs touch-friendly */
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Dashboard adjustments */
    .dashboard {
        padding: 20px;
    }

    .dashboard .card {
        width: 100%;
        max-width: 100%;
    }

    /* Admin list page adjustments */
    .admin-list-page .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Mobile Typography - Phone size */
@media (max-width: 767.98px) {
    /* Further reduce font sizes */
    body {
        font-size: 12pt;
    }

    h1 {
        font-size: 1.75rem;
        margin: 15px 0 15px 0;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Reduce padding on container-fluid with py-4 px-5 */
    .container-fluid.py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .container-fluid.px-5 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Stack columns vertically */
    .row > [class*="col-"] {
        margin-bottom: 1rem;
    }

    /* Card adjustments */
    .card {
        margin: 8px 0;
    }

    .card-body {
        padding: 12px;
    }

    /* Projects card grid */
    .projects .card {
        min-width: 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }

    /* Table further reduced */
    .table {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 0.4rem 0.3rem;
    }

    /* Badge sizing */
    .badge {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    /* Hero section */
    .hero-section,
    .hero-overlay {
        min-height: 350px;
    }

    /* Intro message */
    .intro-message > h1 {
        font-size: 3em;
    }

    /* Lead text */
    .lead {
        font-size: 16px;
    }

    /* Toast positioning */
    .toast {
        right: 10px;
        min-width: 200px;
        margin-left: -100px;
    }

    /* Cookie consent */
    #cookie-consent-container {
        width: 90%;
        padding: 15px;
    }
}

/* Small phone adjustments */
@media (max-width: 575.98px) {
    /* Minimal padding for very small screens */
    .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Very small headings */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    /* Button text sizing */
    .btn {
        font-size: 0.9rem;
    }

    /* Tighter spacing */
    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mb-3 {
        margin-bottom: 0.75rem !important;
    }

    /* Horizontal scrolling for wide tables */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

/* ========================================
   RESPONSIVE UTILITY CLASSES
   ======================================== */

/* Mobile-specific utilities */
@media (max-width: 767.98px) {
    /* Text alignment utilities for mobile */
    .mobile-text-center {
        text-align: center !important;
    }

    .mobile-text-left {
        text-align: left !important;
    }

    /* Flex direction utilities for mobile */
    .mobile-flex-column {
        flex-direction: column !important;
    }

    /* Full width buttons on mobile */
    .mobile-btn-block {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Hide elements on mobile */
    .mobile-hide {
        display: none !important;
    }

    /* Show elements only on mobile */
    .mobile-show {
        display: block !important;
    }

    /* Reduce horizontal button groups to vertical on mobile */
    .btn-group {
        flex-direction: column;
    }

    .btn-group > .btn {
        width: 100%;
        border-radius: 0.25rem !important;
        margin-bottom: 0.25rem;
    }

    /* Stack d-flex horizontally on mobile */
    .d-flex.mobile-stack {
        flex-direction: column;
    }

    /* Action buttons in cards */
    .card-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .card-footer .btn:last-child {
        margin-bottom: 0;
    }

    /* Material icons in mobile buttons */
    .btn .material-icons {
        font-size: 18px;
    }
}

/* Tablet-specific utilities */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Show elements only on tablet */
    .tablet-show {
        display: block !important;
    }

    /* Hide elements on tablet */
    .tablet-hide {
        display: none !important;
    }
}

/* Desktop-only utilities */
@media (min-width: 992px) {
    /* Hide elements on desktop */
    .desktop-hide {
        display: none !important;
    }
}

/* Touch-friendly improvements for all mobile devices */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    a, button, .btn, .nav-link, .dropdown-item {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Better spacing for touch interactions */
    .list-group-item {
        padding: 1rem;
    }

    /* Larger checkboxes and radio buttons */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
    }

    /* Remove hover effects on touch devices */
    .btn:hover,
    .card:hover,
    a:hover {
        transform: none !important;
    }
}

/* University logo alignment */
.navbar-nav .nav-link img {
    vertical-align: middle;
}

/* Ensure proper spacing between menu items and logo */
@media (min-width: 992px) {
    .navbar-nav + .navbar-nav {
        margin-left: 1rem;
    }
}

/* Hero Section with Background Image */
.hero-section {
    min-height: 500px;
    background-image: url('/static/images/work_table.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
}

.hero-overlay {
    background-color: rgba(0, 52, 60, 0.7); /* blue-black overlay with transparency */
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    padding: 80px 0; /* Add padding for navbar clearance inside overlay */
}

.hero-section .text-white {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

h1 {
    margin: 40px 0 40px 0;
}

nav a,
footer a {
    font-family: 'Helvetica', sans-serif;
    font-size: 11pt;
}

a {
  color: #c31632;
}

.text-highlight {
    background-color: #feefef;
    border: #c31632;
}

.text-highlight strong {
    color: #c31632;
}

.navbar-default .navbar-brand, .navbar-default .navbar-nav>li>a {
  /*color: #c31632;*/
    color: #00343c;
}

a:hover, .navbar-default .navbar-brand:hover, .navbar-default .navbar-nav>li>a:hover {
  color: #840212;
}

.nav-link[data-toggle="tab"]:hover {
    background-color: #f0f0f0;
}
.nav-link.active[data-toggle="tab"]:hover {
    background-color: inherit;
}

a.action-link:hover  {
    text-decoration: none;
}
a.action-link:focus  {
    text-decoration: none;
}
td.actions a:hover {
    text-decoration: none;
}

footer {
    padding: 50px 0;
    background-color: #f8f8f8;
    position: relative;
    bottom: 0px;
    width: 100%;
}

table.content {
    margin-top: 50px;
    font-family: 'Titillium Web', sans-serif;
    font-size: 1.2em;
    font-width: 200;
}

p.content {
    font-family: 'Titillium Web', sans-serif;
    font-size: 1.2em;
    font-width: 200;
}

p.copyright {
    margin: 15px 0 0;
}

.alert-info {
    width: 50%;
    margin: auto;
    color: #687430;
    background-color: #e6ecca;
    border: none;
}

.btn-default {
    /*border-color: #c31632;*/
    /*color: #c31632;*/
    border-color: #00343c;
    color: #00343c;
}

.btn-default:hover {
    /*background-color: #c31632;*/
    background-color: #00343c;
    color: #ffffff;
}

.btn.disabled,
.btn.disabled:hover {
    color: inherit;
    background-color: #f0f0f0;
}

.badge {
    margin-right: 10px;
    color: white;
    background-color: #777;
    border-radius: 10px;
}

.btn-default .badge {
    color: #c31632;
    background-color: #fff;
}

.center {
    margin: auto;
    width: 50%;
    padding: 10px;
}

.vertical-space {
    margin: 80px 0 80px 0;
}

#change_academic_year {width: fit-content;}
/*#change_academic_year_submit {position: absolute; top: -20px;}*/
#change_academic_year_submit {display: none;}

.content-section {
    min-height: 100%;
    position: relative;
    border-top: 1px solid #e7e7e7;
}

.content-text {
    background-color: white;
    border-width: 0px;
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11pt;
}

.disabled .dropdown-item{
    color: #212529;
    text-decoration: none;
}

.footer, .push {
    clear: both;
    height: 4em;
}

.form-control {
    font-size: 14pt;
    height: 38px;
}

form #message {
    min-height: 200px;
}

form #overview {
    min-height: 200px;
}

form #deliverables {
    min-height: 100px;
}

form #resources {
    min-height: 100px;
}

form #skills_required {
    min-height: 120px;
}

form #admin_notes {
    min-height: 100px;
}

.info-text {
    font-style: italic;
    font-size: small;
}

.intro-divider {
    width: 400px;
    border-top: 1px solid #f8f8f8;
    border-bottom: 1px solid rgba(0,0,0,0.2);
}

.jumbotron-fluid img {
    width: 100%;
    height: auto;
}

.intro-header {
    padding-top: 50px;
    padding-bottom: 50px;
    text-align: center;
    color: #f8f8f8;
    background: url(../images/ice_lab_small.jpg) no-repeat center center;
    background-size: cover;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
    height: 100%;
}

.intro-header-pale::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: .1;
    filter: alpha(opacity=10);
    z-index: -1;
    background-size: cover;
    background: url(../images/ice_lab.jpg) no-repeat center center;
}

.intro-header-pale {
    padding-top: 50px;
    padding-bottom: 50px;
    height: 100%;
}

.intro-message {
    position: relative;
    padding-top: 30%;
    padding-bottom: 30%;
}

.intro-message > h1 {
    margin: 0;
    text-shadow: 3px 3px 5px rgba(0,0,0,0.6);
    font-size: 5em;
}

.intro-message > h3 {
    text-shadow: 2px 2px 3px rgba(0,0,0,0.6);
}

.lead {
    font-size: 18px;
    font-weight: 400;
}

.topnav {
    font-size: 14px;
}

.wrapper {
  min-height: 100%;
  height: auto !important;
  height: 100%;
  margin: 0 auto -4em;
}

.outer {
    display: table;
    /*position: absolute;*/
    height: 70%;
    width: 100%;
}

.middle {
    display: table-cell;
    vertical-align: middle;
}

.inner {
    margin-left: auto;
    margin-right: auto;
}

.action-icon {
    width: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

.dashboard {
    padding: 50px;
}

.dashboard .card {
    border: 1px solid lightgray;
    margin-bottom: 20px;
    width: 300px;
}

.dashboard .card-header {
    background-color: #efefef;
    padding: 5px;
}

.dashboard .card-body {
    text-decoration: none;
    color: black;
}

.dashboard a {
    text-decoration: none;
}

.dashboard .card:hover {
    background-color: #f3f9ff;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: .25rem 1.5rem;
    clear: both;
    font-weight: 400;
    /*color: #c31632;*/
    color: #00343c;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-item:hover {
    color: #212529;
    text-decoration: none;
}

.dropdown-item:active, .dropdown-item:active {
    color: #212529;
    text-decoration: none;
  }

.dropdown-item:disabled, .dropdown-item:disabled {
    color: #212529;
    background-color: transparent;
}

#date_info {font-style: italic; text-align: right}


#email-address {
    outline: none;
    border: none;
}

.email-link {
    display: inline;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

.filter-controls {
    margin-left: 5%;
}

.filter-controls a {
    text-decoration: None;
    padding: 0 5px 0 5px;
}

.hidden {display: none;}

.inset-chart {
    float: right;
}

.interest li {
    list-style: none;
    font-size: medium;
    margin: 10px 0px 0px -40px;
}

.interest a {
    text-decoration: none;
    color: black;
}

.interest a:hover {
    text-decoration: none;
    color: #337ab7;
}

.interest span {
    color: #337ab7;
}

.interest i.blink {
    color: #c31632;
}

/* Align all icons vertically in the interest list */
.interest li .material-icons,
.interest li .material-icons-outlined {
    vertical-align: middle;
    margin-left: 5px;
}

.large-icon {
    font-size: larger;
}

.popover-title {
    color: black;
}

.preserve_newlines {
    white-space: pre-wrap;
}

/* Flag popup styling */
.flag-popup {
    min-width: 250px;
    max-width: 350px;
}


.flag-popup hr {
    margin: 10px 0;
    border-color: #dee2e6;
}

.flag-link {
    text-decoration: none !important;
    cursor: pointer;
}

.flag-link:hover {
    text-decoration: none !important;
}

/*Cards*/

.card-deck {
  display: flex;
  justify-content: space-around;
  flex-flow: row wrap;
  align-items: stretch;
}

.card {
    margin: 10px;
    background-color: white;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.card-inner {
    height: 100%;
    position: relative;
}

.card-body {
    padding: 20px;
}

.card-body .modebar {
      display: none !important;
}

.card-footer {
    background-color: #fefefe;
    padding: 5px;
    flex-grow: 10;
    display: flex;
    align-content: flex-end;
    flex-flow: wrap;
    border-top: none;
}

.projects .card {
    border: 1px solid lightgray;
    margin-bottom: 20px;
    min-width: 300px;
    max-width: 30%;
}

.projects .card.hidden {display: none;}

.projects a .card-body:hover {
    background-color: #f3f9ff;
}

.projects a:visited {
    text-decoration: none;
    color: #c31632;
}

.projects .card-header {
    background-color: #efefef;
    padding: 5px;
}

/* Removed legacy .projects and status color styles - no longer used */

/* Status badge colors for manage projects page */
.status-badge {
  color: white !important;
  font-weight: 500;
}

/* Live projects - green */
.status-live {
  background-color: #28a745 !important;
}

/* New projects - blue */
.status-new {
  background-color: #007bff !important;
}

/* Complete projects - dark green */
.status-complete {
  background-color: #155724 !important;
}

/* Taken projects - light blue */
.status-taken {
  background-color: #17a2b8 !important;
}

/* Withdrawn projects - red */
.status-withdrawn {
  background-color: #dc3545 !important;
}

/* Protected projects - purple */
.status-protected {
  background-color: #6f42c1 !important;
}

/* Relisted projects - orange */
.status-relisted {
  background-color: #fd7e14 !important;
}

/* Old projects - gray */
.status-old {
  background-color: #6c757d !important;
}

/* Expired projects - dark red */
.status-expired {
  background-color: #721c24 !important;
}
/* Team-specific status badges */
/* Submitted teams - bright blue */
.status-submitted {
  background-color: #0d6efd !important;
}
/* Shortlisted teams - warning orange */
.status-shortlisted {
  background-color: #ffc107 !important;
  color: #000 !important;
}
/* Accepted teams - success green */
.status-accepted {
  background-color: #198754 !important;
}
/* Rejected teams - danger red */
.status-rejected {
  background-color: #dc3545 !important;
}

/* Material Icons sizing */
.material-icons.md-18 {
  font-size: 18px;
  vertical-align: middle;
}

/* Action buttons styling */
.btn-sm .material-icons {
  vertical-align: text-top;
}

.tab-pane {
    position: relative;
}
.team-contact {
    font-weight: bold;
    font-size: larger;
    display: inline-block;
    position: absolute;
    top: 0px;
    right: 10px;
}
.team-contact::before {
    content: "Contact: ";
}

.team-member {
    border-left: 1px dotted #a0a0a0;
    padding-left: 20px;
    margin-top: 20px;
}

.team-member-name {
    font-size: large;

}

.right-control {
    display: inline;
    float: right;
    padding-right: 20px;
}

.column {
    float: left;
    width: 50%;
}

/* Clear floats after the columns */
.row:after {
    content: "";
    display: table;
    clear: both;
}

#year-filter {
    margin: 0px 20px 20px 0px;
}

.team-table {
    margin-bottom: 20px;
}

.team-table th {
    min-width: 120px;
}

.team-table tr {
    height: 40px;
}

.team-table tbody tr:last-child {
    height: 100px;
    vertical-align: bottom;
}

.yes-no .radio {
    display: inline-block;
    margin-right: 10px;
}

.yes-no label {
    margin-right: 10px;
}

.wide-table {
    width: 90%;
    margin: 0 auto 0 auto;
}

.short-horizontal {
    display: inline-block;
    margin-bottom: 10px;
}

.short-horizontal input {
    width: 300px;
    margin-right: 10px;
}

.side-subsection {
    margin-top: 110px;
}

/* Toast functionality. See https://www.w3schools.com/howto/howto_js_snackbar.asp */
/* The toast - position it at the bottom and in the middle of the screen */
.toast {
    visibility: hidden; /* Hidden by default. Visible on click */
    min-width: 250px; /* Set a default minimum width */
    margin-left: -125px; /* Divide value of min-width by 2 */
    text-align: center; /* Centered text */
    border-radius: 8px; /* Rounded borders */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 1; /* Add a z-index if needed */
    right: 20px; /* Center the snackbar */
    top: 100px; /* 30px from the bottom */
}

/* Show the toast when clicking on a button (class added with JavaScript) */
.toast.show {
    visibility: visible; /* Show the toast */
    /* Add animation: Take 0.5 seconds to fade in and out the toast.
   However, delay the fade out process for 2.5 seconds */
   -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
   animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Animations to fade the toast in and out */
@-webkit-keyframes fadein {
    from {top: 50px; opacity: 0;}
    to {top: 100px; opacity: 1;}
}

@keyframes fadein {
    from {top: 50px; opacity: 0;}
    to {top: 100px; opacity: 1;}
}

@-webkit-keyframes fadeout {
    from {top: 100px; opacity: 1;}
    to {top: 150px; opacity: 0;}
}

@keyframes fadeout {
    from {top: 100px; opacity: 1;}
    to {top: 150px; opacity: 0;}
}

.toast-info {
    background-color: #C6D8F7;
    color: #000;
}

.toast-message {
    background-color: #fff;
    border: 1px solid #669110;
    color: #669110;
    font-weight: bold;
}

.toast-warning {
    background-color: #FCFFD9;
    color: #000;
}

.toast-error {
    background-color: #fff;
    border: 1px solid #c31632;
    color: #c31632;
    font-weight: bold;
}

/*Cookie consent*/
#cookie-consent-container {
    position: fixed;
    width: 40%;
    z-index: 99;
    bottom: 0;
    left: 50%;
    background: firebrick;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    padding: 20px;
    opacity: 90%;
}


/* Sidebar stuff from W3Schools */
/* The side navigation menu */
.sidenav {
    height: 100%; /* 100% Full-height */
    width: 0; /* 0 width - change this with JavaScript */
    position: fixed; /* Stay in place */
    z-index: 1; /* Stay on top */
    top: 90px; /* Stay at the top */
    right: 0;
    overflow-x: hidden; /* Disable horizontal scroll */
    padding-top: 60px;
    padding-bottom: 100px;
    transition: 0.5s; /* 0.5 second transition effect to slide in the sidenav */
    border: 1px solid #efefef;
}

/* The navigation menu links */
.sidenav a {
    padding: 4px 8px 8px 8px;
    text-decoration: none;
    font-size: 25px;
    color: #c31632;
    display: block;
    transition: 0.3s;
}

/* When you mouse over the navigation links, change their color */
.sidenav a:hover {
    color: #4D1A22;
}

/* Position and style the close button (top right corner) */
.sidenav .closebtn {
    position: absolute;
    top: 0;
    right: 0px;
    font-size: 36px;
}

/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
#main {
    transition: margin-left .5s;
    padding: 20px;
}

/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
    .sidenav {padding-top: 15px;}
    .sidenav a {font-size: 18px;}
}

/* On phones, where width is less than 550px, make the logos fit better */
@media screen and (max-width: 550px) {
    .navbar {min-width: 100%}
    .navbar-brand {margin: 0 auto 0 auto}
    #logo img {width: 140px;}
    .projex-logo img {width: 100px}
    .content-section {padding-top: 65px;}
    .intro-divider {width: 200px;}
}

.title {
    font: 25px arial, sans-serif;
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    padding: 8px 8px 8px 8px;
    background-color: #efefef;
}

#help {
    background-color: #fff;
    z-index: 999;
    overflow-y: scroll;
}

.help-body {
    padding: 0px 16px 8px 16px;
    font-weight: normal;
}

.help-body em {
    font-weight: bolder;
}

.fullscreen,
.CodeMirror-fullscreen,
.editor-preview-side.editor-preview-active-side {
    margin-top:100px;
}

.material-icons.md-14 {font-size: 14px;}
.material-icons.md-18 {font-size: 18px;}
.material-icons-outlined.md-18 {font-size: 18px;}

/* Help Icon Link Component */
.help-icon-link {
    color: #6c757d;
    cursor: pointer;
    font-size: 14px !important; /* Override material-icons default size */
    margin-left: 0.25rem;
    transition: color 0.2s ease;
}

.help-icon-link:hover {
    color: #007bff;
}

.help-popover {
    z-index: 1070;
    max-width: 350px;
}

/* Ensure table headers don't interfere with popover positioning */
.table th {
    position: relative;
}

/* Help icon styling in table headers */
.table th .help-icon-link {
    font-size: 16px;
    margin-left: 4px;
    vertical-align: middle;
    cursor: pointer;
    color: #6c757d;
}

.table th .help-icon-link:hover {
    color: #007bff;
}

/* Dashboard To-do Section Styling */
.todo-container {
    background-color: #f8f9fc;
    border: 1px solid #d1ecf1;
    color: #0c5460;
    padding: 1rem;
    border-radius: 0.375rem;
    width: 100%;
}

.border-left-primary {
    border-left: 4px solid #007bff !important;
}

.todo-list {
    margin-top: 1rem;
}

.todo-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e3e6f0;
    transition: background-color 0.2s ease;
}

.todo-item:last-child {
    border-bottom: none !important;
}

.todo-item:hover {
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 0.25rem;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.todo-text {
    font-size: 0.95rem;
    color: #5a5c69;
    flex-grow: 1;
}

.todo-action-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0.35rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 100px;
    text-align: center;
}

.todo-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.alert-info.border-left-primary {
    background-color: #f8f9fc;
    border-color: #d1ecf1;
    color: #0c5460;
}

/* Compact to-do styling for sidebar placement */
.todo-text-compact {
    font-size: 0.8rem;
    color: #5a5c69;
    flex-grow: 1;
    line-height: 1.2;
}

.todo-action-btn-compact {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

/* ========================================
   Multi-Select Widget Styles
   (Used for Skills and Team Members)
   ======================================== */

/* Container and Selector */
.multi-selector-container {
    position: relative;
}

.multi-selector {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    min-height: calc(2.25rem + 2px);
    background: white;
    width: 100%;
}

/* Pills Container */
.multi-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.multi-pills:empty {
    margin-bottom: 0;
}

/* Individual Pills */
.multi-pill {
    background: #007bff;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Remove Button on Pills */
.multi-pill .remove-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 2px;
    margin-left: 4px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.multi-pill .remove-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.multi-pill .remove-btn:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
}

/* Dropdown Input */
.multi-dropdown {
    border: none;
    outline: none;
    width: 100%;
    background: transparent;
}

/* Suggestions Dropdown */
.multi-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 0.25rem 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.multi-suggestion {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.multi-suggestion:hover {
    background-color: #f8f9fa;
}

.multi-suggestion:last-child {
    border-bottom: none;
}

/* Specific styles for member avatars */
.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #6c757d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 500;
    margin: 0;
}

.member-email {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

/* Legacy class aliases for backward compatibility */
.skills-selector-container,
.members-selector-container {
    position: relative;
}

.skills-selector,
.members-selector {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    min-height: calc(2.25rem + 2px);
    background: white;
    width: 100%;
}

.skills-pills,
.members-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.skills-pills:empty,
.members-pills:empty {
    margin-bottom: 0;
}

.skill-pill,
.member-pill {
    background: #007bff;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Remove button styling for pills */
.skill-pill .remove-btn,
.member-pill .remove-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 2px;
    margin-left: 4px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.skill-pill .remove-btn:hover,
.member-pill .remove-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.skill-pill .remove-btn:focus,
.member-pill .remove-btn:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
}

.skills-dropdown,
.members-dropdown {
    border: none;
    outline: none;
    width: 100%;
    background: transparent;
}

.skills-suggestions,
.members-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 0.25rem 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.skill-suggestion,
.member-suggestion {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-suggestion:hover,
.member-suggestion:hover {
    background-color: #f8f9fa;
}

.skill-suggestion:last-child,
.member-suggestion:last-child {
    border-bottom: none;
}

/* Field label with help icon styling */
.field-label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.help-icon-link {
    color: #6c757d;
    cursor: pointer;
    margin-left: 0.5rem;
}

/* Team Management Tabs */
#teamTabs .nav-link {
    border: 1px solid transparent;
    border-radius: 0.5rem 0.5rem 0 0;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1rem;
    margin-right: 0.25rem;
    transition: all 0.15s ease-in-out;
}

#teamTabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    color: #495057;
    background-color: #f8f9fa;
}

#teamTabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    border-bottom-color: transparent;
}

#teamTabs .nav-link .material-icons {
    vertical-align: middle;
}

.tab-content {
    border: 1px solid #dee2e6;
    border-top: none;
    background-color: #fff;
    border-radius: 0 0 0.5rem 0.5rem;
    padding: 1.5rem;
    min-height: 300px;
}

/* Tab content specific styling */
.tab-pane h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.tab-pane .text-muted {
    font-size: 0.9rem;
}

/* Form improvements within tabs */
.tab-pane .form-group {
    margin-bottom: 1rem;
}

.tab-pane .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.25rem;
}

.tab-pane .form-text {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Responsive adjustments for tabs */
@media (max-width: 768px) {
    #teamTabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    #teamTabs .nav-link .material-icons {
        font-size: 16px;
    }

    .tab-content {
        padding: 1rem;
    }

    .tab-pane .row .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* Readiness Breakdown Popover Styles */
.cursor-pointer {
    cursor: pointer;
}

.readiness-breakdown {
    max-width: 300px;
}

.readiness-breakdown h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.readiness-breakdown .small {
    font-size: 0.875rem;
    line-height: 1.4;
}

.readiness-breakdown hr {
    margin: 0.75rem 0;
    border-top: 1px solid #dee2e6;
}

/* Centralized Tooltip and Popover Styling */
.tooltip {
    font-size: 12px;
    z-index: 1070;
}

.tooltip-inner {
    max-width: 250px;
    padding: 6px 8px;
    background-color: #495057;
    border-radius: 4px;
    text-align: center;
    word-wrap: break-word;
}

.popover {
    max-width: 350px;
    font-size: 13px;
    z-index: 1060;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.popover-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.popover-body {
    padding: 0.75rem 1rem;
    color: #6c757d;
    line-height: 1.5;
}

.popover-body p:last-child {
    margin-bottom: 0;
}

.popover-body ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.popover-body li {
    margin-bottom: 0.25rem;
}

/* Help icon styling for consistent appearance */
.help-icon-link {
    cursor: pointer;
    color: #6c757d;
    font-size: 16px;
    transition: color 0.2s ease;
}

.help-icon-link:hover {
    color: #495057;
}

/* Bid Presentation Styles */
.bid-document {
    background: white;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    line-height: 1.6;
    color: #333;
}

.bid-header {
    text-align: center;
    border-bottom: 3px solid #007bff;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.bid-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 10px;
}

.bid-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.bid-section {
    margin-bottom: 35px;
}

.section-header {
    font-size: 1.4rem;
    font-weight: 600;
    color: #007bff;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.team-overview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.member-content {
    margin-left: 30px;
    padding-left: 15px;
    border-left: 2px solid #f8f9fa;
}

.member-programme {
    color: #6c757d;
    font-size: 1.0rem;
    margin-bottom: 20px;
    font-style: italic;
}

.profile-section {
    margin-bottom: 25px;
}

.profile-label {
    font-size: 1.0rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 3px;
}

.profile-content {
    margin-bottom: 10px;
}

.contact-links {
    margin-top: 15px;
}

.contact-links a {
    display: inline-block;
    margin-right: 15px;
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
}

.contact-links a:hover {
    text-decoration: underline;
}

.project-manager-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 10px;
}

.print-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

@media print {
    .print-btn, .navbar, .content-section > *:not(.bid-document) {
        display: none !important;
    }
    .bid-document {
        box-shadow: none;
        padding: 20px;
    }
}

/* ========================================
   ADMIN LIST PAGES STYLES
   ======================================== */

/* Admin table styling */
.admin-list-page .table-dark th {
    background-color: #343a40;
    color: white;
    font-weight: 500;
    padding: 12px 8px;
    vertical-align: middle;
}

.admin-list-page .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.025);
}

.admin-list-page .table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.075);
}

/* Role badges consistent styling */
.admin-role {
    background-color: #dc3545 !important;
}

.staff-role {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.student-role {
    background-color: #17a2b8 !important;
}

/* Status badges for users */
.status-live {
    background-color: #28a745 !important;
}

.status-disabled {
    background-color: #6c757d !important;
}

/* Action buttons consistent sizing */
.admin-list-page .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.25rem;
}

.admin-list-page .btn-sm .material-icons {
    font-size: 16px;
    line-height: 1;
}

/* Filter section styling */
.admin-list-page .card .form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #495057;
}

/* Removed: Filter status styling now centralized in core.css */

/* Responsive table improvements */
.admin-list-page .table-responsive {
    border-radius: 0.375rem;
}

.admin-list-page .text-nowrap {
    white-space: nowrap;
}

/* Consistent spacing for admin pages */
.admin-list-page .container-fluid {
    max-width: 1400px;
    padding-left: 3rem !important;
    padding-right: 3rem !important;
}

.admin-list-page h1.h2 {
    color: #343a40;
    font-weight: 600;
}

/* Empty state styling */
.admin-list-page .card.text-center .card-title {
    color: #6c757d;
    font-weight: 500;
}

.admin-list-page .card.text-center .card-text {
    color: #6c757d;
}

/* Material icons size classes */
.material-icons.md-18 {
    font-size: 18px;
}

.material-icons.md-16 {
    font-size: 16px;
}

.material-icons.md-14 {
    font-size: 14px;
}

/* Form label styling to prevent wrapping */
.form-group label {
    white-space: nowrap;
    min-width: 140px;
}

/* Table action buttons alignment */
.actions-cell {
    text-align: right;
    white-space: nowrap;
}

.actions-cell .btn {
    margin-left: 4px;
}

/* ========================================
   BUTTON GROUP SPACING
   ======================================== */

/* Ensure buttons in groups have proper spacing */
.btn-group .btn,
.btn-toolbar .btn {
    margin: 0.25rem;
}

/* Flex containers with buttons */
.d-flex .btn,
.d-inline-flex .btn {
    margin: 0.25rem;
}

/* Button groups using gap utility should not have additional margin */
.d-flex.gap-1 .btn,
.d-flex.gap-2 .btn,
.d-flex.gap-3 .btn,
.d-inline-flex.gap-1 .btn,
.d-inline-flex.gap-2 .btn,
.d-inline-flex.gap-3 .btn {
    margin: 0;
}

/* Action buttons container (common pattern in templates) */
.action-buttons .btn {
    margin: 0.25rem;
}

/* Card footer buttons */
.card-footer .btn:not(:last-child) {
    margin-right: 0.5rem;
}


/* ===================================
   BID EXPIRY INDICATORS AND STYLING
   =================================== */

/* Expiry Badge Styling */
.expiry-badge {
    font-size: 0.875rem;
    padding: 0.35em 0.65em;
    font-weight: 600;
}

.expiry-badge .material-icons {
    font-size: 18px;
    vertical-align: middle;
    margin-right: 2px;
}

/* Urgent Expiry Animation (< 24 hours) */
.expiry-urgent {
    animation: pulse-urgent 2s ease-in-out infinite;
}

@keyframes pulse-urgent {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.05);
    }
}

/* Expiry Info Cards */
.expiry-info-card {
    border-left: 4px solid #ffc107;
    background-color: #fff8e1;
    border-radius: 0.25rem;
    padding: 1rem;
    margin: 1rem 0;
}

.expiry-info-card.urgent {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

.expiry-info-card.expired {
    border-left-color: #6c757d;
    background-color: #e2e3e5;
}

/* Decline Feedback Display */
.decline-feedback {
    border-left: 3px solid #0dcaf0;
    padding: 1rem;
    background-color: #cff4fc;
    border-radius: 0.25rem;
    margin: 1rem 0;
}

.decline-feedback-label {
    font-weight: 600;
    color: #055160;
    margin-bottom: 0.5rem;
    display: block;
}

.decline-feedback-text {
    color: #0a3a42;
    margin: 0;
    white-space: pre-wrap;
}

/* Resubmit Action Cards */
.resubmit-action-card {
    border: 2px solid #0d6efd;
    background-color: #cfe2ff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.resubmit-action-card.expired {
    border-color: #6c757d;
    background-color: #f8f9fa;
}

.resubmit-action-card h6 {
    color: #084298;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.resubmit-action-card.expired h6 {
    color: #495057;
}

/* Status Badge for Expired */
.status-badge.status-expired {
    background-color: #6c757d !important;
}
