/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.light-style .menu .app-brand.demo {
    height: 64px;
}

.dark-style .menu .app-brand.demo {
    height: 64px;
}

.app-brand-logo.demo svg {
    width: 30px;
    height: 24px;
}

.app-brand-text {
    text-transform: inherit;
    font-size: 2rem;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
    padding-top: 64px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
    z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks>* {
    display: block !important;
}

.demo-inline-spacing>* {
    margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing>* {
    margin-top: 1.25rem !important;
    margin-bottom: 0 !important;
}

.demo-vertical-spacing.demo-only-element> :first-child {
    margin-top: 0 !important;
}

.demo-vertical-spacing-lg>* {
    margin-top: 1.875rem !important;
    margin-bottom: 0 !important;
}

.demo-vertical-spacing-lg.demo-only-element> :first-child {
    margin-top: 0 !important;
}

.demo-vertical-spacing-xl>* {
    margin-top: 5rem !important;
    margin-bottom: 0 !important;
}

.demo-vertical-spacing-xl.demo-only-element> :first-child {
    margin-top: 0 !important;
}

.rtl-only {
    display: none !important;
    text-align: left !important;
    direction: ltr !important;
}

[dir='rtl'] .rtl-only {
    display: block !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
    #dropdown-variation-demo .btn-group .text-truncate {
        width: 300px;
        position: relative;
    }

    #dropdown-variation-demo .btn-group .text-truncate::after {
        position: absolute;
        top: 45%;
        right: 0.65rem;
    }
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-direction: column;
    flex-direction: column;
    margin-top: 1.25rem;
}

.layout-demo-placeholder img {
    width: 900px;
}

.layout-demo-info {
    text-align: center;
    margin-top: 1.25rem;
}


/* ========================================
   LOADING ANIMATIONS
   ======================================== */

/* Content loader container */
.bp-content-loader-container {
    position: relative;
    min-height: 400px;
    /* Ensure container has height for proper centering */
}

/* ========================================
   1. PAGE LOADER (Initial Load Only)
   ======================================== */

/* Shows on first page load, covers entire viewport, gets replaced by service content */
.bp-page-loader {
    /* Inline styles handle positioning (position-fixed, top-0, etc.) */
    /* This ensures it covers footer and entire page */
    opacity: 1 !important;
    visibility: visible !important;
    /* Prevent any inherited animations from fading the background */
    animation: none !important;
    transition: none !important;
}

/* Logo pulse animation */
.bp-pulse-scale {
    animation: pulse-scale 2s ease-in-out infinite;
}

@keyframes pulse-scale {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Loading text animation */
.bp-loading-text {
    animation: pulse-text 1.5s ease-in-out infinite;
}

/* Pulsing dots animation */
.bp-loader-dots {
    display: flex;
    gap: 0.5rem;
}

.bp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse-dot 1.4s ease-in-out infinite;
}

.bp-dot:nth-child(1) {
    animation-delay: 0s;
}

.bp-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.bp-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ========================================
   2. CONTENT NAVIGATION LOADER (Between Pages)
   ======================================== */

/* Shows when navigating between pages, overlays the content area */
.bp-content-loader .bp-content-loader-overlay {
    content: "";
    position: absolute;
    left: -10px;
    right: -10px;
    top: -10px;
    bottom: -10px;
    min-height: 400px;
    /* Ensure overlay has minimum height for centering */
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    /* background: linear-gradient(135deg,
            rgba(var(--bs-primary-rgb), 0.05) 0%,
            rgba(var(--bs-primary-rgb), 0.02) 100%); */
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    border-radius: 0.5rem;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-content-loader .bp-content-loader-overlay::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 3px solid rgba(var(--bs-primary-rgb), 0.2);
    border-top-color: rgb(var(--bs-primary-rgb));
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
    margin-top: -20px;
    /* Offset for the "Loading..." text below */
}

.bp-content-loader .bp-content-loader-overlay::after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 40px;
    /* Position below the spinner */
    color: var(--bs-body-color);
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.7;
    animation: pulse-text 1.5s ease-in-out infinite;
}

/* Active loading state */
.bp-content-loader.content-loading .bp-content-loader-overlay {
    opacity: 1;
    visibility: visible;
}

/* Spinner rotation */
@keyframes spinner-rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Text pulse */
@keyframes pulse-text {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* content error styles */
.misc-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    min-height: 100vh;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    position: relative;
    padding: 1.25rem;
}

.misc-bg {
    inline-size: 100%;
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
}

.misc-object {
    position: absolute;
    bottom: 15%;
    z-index: 1;
}

html:not([dir="rtl"]) .misc-object {
    left: 3%;
}

[dir="rtl"] .misc-object {
    right: 3%;
}

.misc-model {
    position: relative;
    bottom: 3rem;
}

/* ========================================
   3. MENU LOADER (Menu Item Clicks)
   ======================================== */

.menu-with-loader .ico-loading {
    display: none;
}

/* Hide the regular icon when loading, but not the spinner */
.menu-with-loader.loading .menu-icon:not(.ico-loading) {
    display: none;
}

.menu-with-loader.loading .ico-loading {
    display: block;
}

/* Hide menu sub arrow when loading */
.layout-wrapper:not(.layout-horizontal) .menu-vertical .menu-inner>.menu-item>.menu-sub>.menu-item>.menu-link.loading::before {
    display: none;
}

/* Smooth spinner animation */
@keyframes mdi-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.layout-wrapper:not(.layout-horizontal) .menu-vertical .menu-inner .menu-link.loading .ico-loading,
.spinme {
    animation: mdi-spin 1s linear infinite;
}

.ico-loading.spinme {
    display: block;
}

.layout-wrapper:not(.layout-horizontal) .menu-vertical .menu-inner .menu-sub .menu-link.loading .ico-loading {
    position: absolute;
    margin-left: -30px;
}

/* Pulsing effect on loading menu item - matches active item styling */
.bg-menu-theme .menu-inner>.menu-item>.menu-link.loading:not(.menu-toggle),
.bg-menu-theme .menu-inner>.menu-item .menu-sub>.menu-item>.menu-link.loading {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
    border-radius: 0 50rem 50rem 0;
    animation: pulse-menu-item 1.5s ease-in-out infinite;
}

@keyframes pulse-menu-item {

    0%,
    100% {
        background-color: rgba(var(--bs-primary-rgb), 0.04);
    }

    50% {
        background-color: rgba(var(--bs-primary-rgb), 0.12);
    }
}

/* ========================================
   TOP PROGRESS BAR - DISABLED
   ======================================== */

/* Top progress bar removed - caused issues with positioning */

/* ========================================
   SKELETON LOADERS (Optional)
   ======================================== */

.bp-skeleton {
    background: linear-gradient(90deg,
            rgba(var(--bs-body-color-rgb), 0.06) 25%,
            rgba(var(--bs-body-color-rgb), 0.12) 50%,
            rgba(var(--bs-body-color-rgb), 0.06) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 0.375rem;
}

.bp-skeleton-text {
    height: 1em;
    margin-bottom: 0.5rem;
}

.bp-skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1rem;
}

.bp-skeleton-paragraph {
    height: 1em;
    margin-bottom: 0.5rem;
}

.bp-skeleton-paragraph:last-child {
    width: 80%;
}

.bp-skeleton-card {
    height: 200px;
    border-radius: 0.5rem;
}

.bp-skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.bp-skeleton-button {
    height: 38px;
    width: 100px;
    border-radius: 0.375rem;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   SMOOTH TRANSITIONS
   ======================================== */

/* Smooth content transitions */
#bp-content {
    transition: opacity 0.2s ease-in-out;
}

.bp-content-loader.content-loading #bp-content {
    opacity: 0.6;
}

/* Prevent layout shift during loading */
.bp-content-loader {
    min-height: 400px;
    position: relative;
}