 /* Ensure this CSS is loaded after your main theme CSS (bootstrap_limitless.css, components.css, etc.) 
   or in a file that has access to the :root variables. */

/* Define RGB color variables for W3C validation (also defined in style.min.css) */
:root {
  --info-rgb: 13, 110, 253;
  --success-rgb: 25, 135, 84;
  --danger-rgb: 220, 53, 69;
}

/* skip-link styles moved to assets/css/accessible.css to centralize accessibility rules */

/* Prevent double email icons on mailto links */
a[href^="mailto:"]::before,
a[href^="mailto:"]::after {
    display: none !important;
}

/* Ensure only our custom icons show for mailto links */
a[href^="mailto:"] {
    text-decoration: none !important;
}

.navbar-bg-img {
    background-image: url('../img/bg/panel_bg.png');
    background-size: contain;
}

.text-justify {
    text-align: justify !important;
}

.uniform-image {
    width: 250px; /* Set your desired width */
    height: 250px; /* Set your desired height */
    object-fit: cover; /* Ensures the image covers the container */
}

.border-dashed {
    border-bottom: 1px dashed #dee2e6; /* Dashed border style */
}

.display-none { display: none; }
.display-block { display: block; }


.list-icon {
    list-style-type: none; /* Remove default list styling */
    padding-left: 10px;
}
.list-icon li {
    display: flex; /* Align items horizontally */
    align-items: center; /* Vertically center items (changed from 'top') */
    margin-bottom: 10px; /* Add some spacing between items */
}

.list-icon li i, .list-icon li span {
    margin-right: 10px; /* Add some spacing between icon and text */
}

.falist-margin {
    --fa-li-margin: 1.5em;
}

/* inline styles */
.bg-image {
    background-image: url('../img/spot-illustrations/32.png');
    background-position: right center;
}

.bg-image-right {
    background-image: url('../img/spot-illustrations/32.png');
    background-position: top right;
}

.bg-image-earth {
    background-image: url('../img/spot-illustrations/earth-plane.png');
    background-position: bottom right;
    background-size: auto;
}

.bg-image-earth-dark {
    background-image: url('../img/spot-illustrations/earth-plane-dark.png');
    background-position: bottom right;
    background-size: auto;
}

.bg-26-top-center {
    background-image: url('../img/bg/26.png');
    background-position: top center;
}

.width-20rem {
    width: 20rem;
}

.width-max-25rem {
    max-width: 25rem;
}

.bg-image-38 {
    background-image: url('../img/bg/38.png');
}

.bg-image-32-right {
    background-image: url('../img/spot-illustrations/32.png');
    background-position: top right;
}

.bg-image-31-left {
    background-image: url('../img/spot-illustrations/31.png');
    background-position: top left;
}

/* Note: .bg-image-38 was defined twice. Keeping the last one. If they were different, you'd merge or choose. */
/* .bg-image-38{
    background-image:url('../img/bg/38.png');
} */

.bg-image-13-right {
    background-image: url('../img/spot-illustrations/13.png');
    background-position: top right;
    background-size: 150px;
}

.bg-image-13-dark-right {
    background-image: url('../img/spot-illustrations/dark_13.png');
    background-position: top right;
    background-size: 150px;
}

.bg-image-16-right {
    background-image: url('../img/spot-illustrations/16.png');
    background-position: top right;
    background-size: 150px;
}

.bg-image-16-dark-right {
    background-image: url('../img/spot-illustrations/dark_16.png');
    background-position: top right;
    background-size: 150px;
}

.mb-2px {
    margin-bottom: 2px;
}

.size-16 {
    height: 16px;
    width: 16px;
}

.size-19 {
   height: 19px;
   width: 19px;
}

.size-32 {
    height: 32px;
    width: 32px;
}

.size-34 {
    width: 34px;
    height: 34px;
    min-height: 34px;
    min-width: 34px;
    max-width: 34px;
    max-height: 34px;
}

.size-22 {
    height: 22px;
    width: 22px;
}

.height-5rem {
    height: 5rem;
}

/* Only apply fixed height to specific card components, not all card-img-top elements */
.card:not(.flat-box) .card-img-top {
    object-fit: cover; /* Ensure the image covers the card without distortion */
    height: 200px; /* Set a fixed height for the images */
}

/* Decision Flow Styles
   - This section styles a decision flow list with arrows indicating the flow direction.
   - It uses theme variables for colors, borders, and shadows to ensure consistency with the overall design.
*/
.decision-flow {
    list-style: none;
    padding: 0;
    max-width: 600px; /* You could also use a variable here if your theme defines container widths */
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.decision-flow li {
    background-color: var(--gray-100, #f8f9fa); /* Using --gray-100, fallback to original */
    border: var(--border-width, 1px) solid var(--border-color, #dee2e6); /* Using theme border variables */
    padding: 1rem; /* This is a common value, could be var(--spacer) if 1.25rem is acceptable, or keep as 1rem */
    margin-bottom: calc(var(--spacer, 1.25rem) * 2); /* Approx 40px if spacer is 1.25rem (20px) */
    position: relative;
    border-radius: var(--border-radius-sm, 0.25rem); /* Using theme small border-radius */
    box-shadow: var(--box-shadow-sm, 0 1px 2px rgba(0,0,0,0.1)); /* Using theme small box-shadow, original was slightly different blur */
}

/* Arrow styling: applied to all list items except the first one */
.decision-flow li:not(:first-child)::before {
    content: '';
    position: absolute;
    bottom: 100%; 
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    /* Using theme success color. If #28a745 was a specific branding color, 
       consider creating a custom variable like --decision-flow-arrow-color: #28a745; */
    border-bottom: 15px solid var(--success, #28a745); 
    margin-bottom: var(--spacer-2, 10px); /* Using theme spacer-2 for 10px */
}

/* Connector line between items */
.decision-flow li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: calc(100% + var(--spacer-2, 10px)); /* start below the arrow */
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: var(--spacer-5, 3.75rem); /* vertical connector length */
    background-color: var(--success, #28a745);
    opacity: 0.5;
}

/* Remove extra space on last item */
.decision-flow li:last-child {
    margin-bottom: 0;
}

/* Optional states for steps using DBIM functional colors */
.decision-flow li.is-current {
    border-color: var(--info, #0d6efd);
    box-shadow: 0 0 0 0.125rem rgb(var(--info-rgb) / 0.25);
}
.decision-flow li.is-current:not(:first-child)::before {
    border-bottom-color: var(--info, #0d6efd);
}

.decision-flow li.is-done {
    border-color: var(--success, #198754);
    background-color: rgb(var(--success-rgb) / 0.05);
}
.decision-flow li.is-done:not(:first-child)::before {
    border-bottom-color: var(--success, #198754);
}

.decision-flow li.is-blocked {
    border-color: var(--danger, #dc3545);
    background-color: rgb(var(--danger-rgb) / 0.05);
}
.decision-flow li.is-blocked:not(:first-child)::before {
    border-bottom-color: var(--danger, #dc3545);
}

/* Focus visibility for accessibility */
.decision-flow li:focus-within {
    outline: 2px solid var(--link-hover-color, #0A58CA);
    outline-offset: 2px;
}

/* Responsive adjustment for mobile */
@media (max-width: 575.98px) {
    .decision-flow li {
        margin-bottom: var(--spacer, 1.25rem);
    }
    .decision-flow li:not(:last-child)::after {
        height: var(--spacer-4, 1.875rem);
    }
}

/* Dropdown Menu Styles
   - This section ensures dropdown menus in tables do not scroll, allowing them to expand naturally.
   - It uses theme variables for consistency with the overall design.
*/
.table .dropdown-menu:not(.dropdown-menu-scrollable) {
  max-height: none;     /* Remove any restrictive max-height */
  overflow-y: visible;  /* Allow content to naturally flow and prevent scrollbars */
                          /* 'visible' is the default, but explicitly setting it can help override */
}
/* In your custom CSS file (e.g., style.min.css or user.min.css) */

/* Target dropdown menus specifically within a .table that's inside a .card,
   but only if they are NOT intentionally scrollable. */
.card .table .dropdown .dropdown-menu:not(.dropdown-menu-scrollable) {
    max-height: none !important; /* Override any max-height that might be causing the scroll */
    overflow-y: visible !important; /* Ensure content can overflow vertically without a scrollbar */
    height: auto !important; /* Ensure height is not constrained if JS is setting it */
}

/* Logo banner sizing: used by brand_logo() */
.logo-banner {
    min-height: 42px;
    min-width: 200px;
    height: 100%;      /* fill navbar height via parent h-100 */
    width: auto;       /* preserve aspect ratio */
    object-fit: contain;
    display: block;    /* avoid inline gap issues */
}

/* DBIM-Compliant PSU Logo Styling */
.logo-banner-dbim {
    min-height: 42px;
    min-width: 200px;
    height: 100%;      /* fill navbar height via parent h-100 */
    width: auto;       /* preserve aspect ratio */
    object-fit: contain;
    display: block;    /* avoid inline gap issues */
    /* DBIM color scheme compliance */
    filter: none;      /* ensure no color modifications */
}

/* Prevent brand from stretching and creating extra blank space */
.navbar .navbar-brand { flex: 0 0 auto; }

/* Optional border around brand lockup */
/* removed brand-border styles */

/* Reduce only brand padding so logo can be taller without affecting other items */
.navbar .navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
}

/* Slightly larger desktop logo */
.navbar .navbar-brand .logo-banner-dbim {
    min-height: 46px;
}

/* Note: Text styling not needed for image-based logos */

/* Mobile logo sizing - smaller width for mobile screens, same height */
@media (max-width: 767.98px) {
    .logo-banner {
        min-width: 120px;  /* smaller minimum width for mobile */
        max-width: 150px;  /* maximum width to prevent overflow */
        min-height: 42px;  /* keep same height as desktop */
    }
    
    .logo-banner-dbim {
        min-width: 120px;  /* smaller minimum width for mobile */
        max-width: 150px;  /* maximum width to prevent overflow */
        min-height: 42px;  /* keep same height as desktop */
    }
    
    /* Mobile text styling not needed for image-based logos */
}

/* Sidebar link underline rules have been moved to style.min.css (from all.scss)
   and mode-specific exceptions to accessible.css. This file should not define
   nav-sidebar underline styles to avoid conflicts. */

/* DBIM icons: light variant for dark backgrounds */
.dbim-icon-light {
    filter: brightness(0) saturate(100%) invert(100%);
}

/* Prevent long strings from causing horizontal scroll */
.text-wrap-anywhere {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Removed custom overrides - using reference classes exactly */

/* Footer navbar small adjustments */
.navbar.navbar-footer .navbar-nav-link-icon {
    line-height: 1;
}
.navbar.navbar-footer .nav .nav-item + .nav-item {
    margin-left: .25rem;
}

/*------------ Product Carousel Styles (Bootstrap Carousel - Fixed Height, CSP Compliant) ---------------- */
.product-carousel-container {
    height: 400px;
    position: relative;
    overflow: hidden;
}

.product-carousel-inner {
    height: 100%;
}

.product-carousel-item {
    height: 100%;
    position: relative;
}

.product-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Carousel controls (prev/next buttons) - Enhanced visibility */
.product-carousel-container .carousel-control-prev,
.product-carousel-container .carousel-control-next {
    background-color: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.product-carousel-container .carousel-control-prev {
    left: 15px;
}

.product-carousel-container .carousel-control-next {
    right: 15px;
}

.product-carousel-container .carousel-control-prev:hover,
.product-carousel-container .carousel-control-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 1;
}

.product-carousel-container .carousel-control-prev-icon,
.product-carousel-container .carousel-control-next-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Carousel caption - Enhanced visibility with background */
.product-carousel-container .carousel-caption {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    padding: 20px 30px 30px;
    left: 0;
    right: 0;
    bottom: 0;
    text-align: left;
    border-radius: 0;
}

.product-carousel-container .carousel-caption .h5,
.product-carousel-container .carousel-caption h5 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
}

.product-carousel-container .carousel-caption p {
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    margin-bottom: 15px;
}

/* Carousel indicators - Enhanced visibility and CSP compliant (override Bootstrap inline styles) */
.product-carousel-container .carousel-indicators {
    margin-bottom: 10px !important;
    position: absolute !important;
    bottom: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 !important;
    list-style: none !important;
    z-index: 2 !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.product-carousel-container .carousel-indicators button {
    background-color: rgba(255, 255, 255, 0.5) !important;
    border: 2px solid rgba(0, 0, 0, 0.3) !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
    position: relative !important;
    text-indent: 0 !important;
    cursor: pointer !important;
    opacity: 0.5 !important;
    transition: opacity 0.3s ease !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
}

.product-carousel-container .carousel-indicators button:hover {
    opacity: 0.85 !important;
}

/* =============================================================================
   FOOTERBOX HORIZONTAL SCROLL PREVENTION
   ============================================================================= */

/* Prevent horizontal scrolling - general rule */
body, html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* Prevent horizontal scrolling from footerbox */
.footerbox {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.footerbox .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.footerbox [class*="col-"] {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Ensure footer content doesn't overflow */
footer {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
}

/* Mobile specific - prevent horizontal scroll */
@media (max-width: 767.98px) {
    .footerbox,
    .footerbox .container,
    .footerbox .row {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .footerbox [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Ensure images and content don't overflow */
    .footerbox img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .footerbox .d-flex {
        flex-wrap: wrap !important;
    }
}

/* Theme icon styling - replaces inline styles */
.theme-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ========================================
   Page Title & Breadcrumb Styles (Modave)
   ======================================== */

/* Page Title Section */
.page-title {
    padding: 30px 0 40px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    margin-bottom: 0.5rem;
}

.page-title .heading {
    margin-bottom: 8px;
    color: #084298;
    font-size: 1.75rem;
    font-weight: 600;
}

/* Breadcrumbs */
ul.breadcrumbs {
    display: flex;
    gap: 4px;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.breadcrumbs li {
    color: #052c65;
    font-size: 14px;
    line-height: 22px;
}

ul.breadcrumbs li a {
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

ul.breadcrumbs li a:hover {
    color: #084298;
    text-decoration: underline;
}

ul.breadcrumbs i {
    font-size: 12px;
    color: #052c65;
}

ul.breadcrumbs .breadcrumb-separator {
    color: #052c65;
    font-weight: 400;
    padding: 0 4px;
}

/* Breadcrumb Default Style */
.breadcrumbs-default {
    padding: 40px 0px 60px;
}

.breadcrumbs-default .breadcrumbs-content {
    display: grid;
    gap: 16px;
}

.breadcrumbs-default .breadcrumbs-content .content-bottom {
    display: grid;
    gap: 8px;
}

/* Breadcrumb Wrapper */
.tf-breadcrumb-wrap {
    padding: 21px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.tf-breadcrumb-wrap .tf-breadcrumb-list {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1px;
}

.tf-breadcrumb-wrap .tf-breadcrumb-list .icon {
    font-size: 12px;
}

.tf-breadcrumb-wrap .tf-breadcrumb-list span {
    text-decoration: underline;
}

.tf-breadcrumb-wrap .tf-breadcrumb-prev-next {
    display: flex;
    gap: 4px;
    align-items: center;
    font-size: 23px;
}

.tf-breadcrumb-wrap .tf-breadcrumb-prev-next a {
    display: flex;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .page-title {
        padding: 40px 0 50px;
    }
    
    .page-title .heading {
        font-size: 2rem;
    }
    
    .breadcrumbs-default {
        padding: 40px 0px 50px;
    }
}

/* RTL Support */
.rtl .tf-breadcrumb-wrap .tf-breadcrumb-prev-next {
    direction: ltr;
}

/* ========================================
   Topbar Primary Color Palette
   ======================================== */

/* ========================================
   Navbar Search Input Enhancement
   ======================================== */

/* Enhance navbar search input by modifying existing form-control variables */
.navbar-search .form-control {
    --input-border-width: 2px;
    --input-border-color: rgba(255, 255, 255, 0.4);
}

.navbar-search .form-control:focus {
    --input-border-color: rgba(255, 255, 255, 0.7);
}
