﻿/*
    LOGOS
*/

.logo {
    line-height: 1;
}


.logo img {
    width: 100px;
    height: auto;
    margin-right: 6px;
}

.logo span {
    margin-top: 30px;
    font-size: 30px;
    font-weight: 700;
    color: #012970;
    font-family: "Roboto", sans-serif;
}

.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    z-index: -9999 !important;
    pointer-events: none !important;
}

/*
    BACKGROUND
*/

.bg-primary-light {
    background-color: #cfe2ff;
    border-color: #cfe2ff;
}

.bg-secondary-light {
    background-color: #e2e3e5;
    border-color: #e2e3e5;
}

.bg-success-light {
    background-color: #d1e7dd;
    border-color: #d1e7dd;
}

.bg-danger-light {
    background-color: #f8d7da;
    border-color: #f8d7da;
}

.bg-warning-light {
    background-color: #fff3cd;
    border-color: #fff3cd;
}

.bg-info-light {
    background-color: #cff4fc;
    border-color: #cff4fc;
}

.bg-dark-light {
    background-color: #d3d3d4;
    border-color: #d3d3d4;
}






/*
    MAIN LAYOUT

*/


html, body {
    height: 100%;
    min-height: 100%;
    font-family: "Roboto", sans-serif;
}

.layout-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.top-bar {
    height: 40px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    padding-left: 10px;
}



.menu-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.menu-item.active {
    background-color: #dee2e6;
    font-weight: bold;
}

.menu-item:hover {
    background-color: #e2e6ea;
}

.menu-icon {
    width: 30px;
    text-align: center;
}

.menu-label {
    flex: 1;
    padding-left: 8px;
}

.menu-arrow {
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding-left: 20px;
}

.submenu.open {
    max-height: 1000px; /* large value to allow deep nesting */
}

.menu-arrow.rotate {
    transform: rotate(90deg);
}






.iframe-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}






@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.main-content {
    flex: 1;
    display: flex;
    box-sizing: border-box;
    height: calc(100% - 40px); /* optional */
    overflow: hidden;
}

.side-menu-wrapper {
    position: relative;
    width: 250px;
    transition: width 0.3s ease;
    flex-shrink: 0;
    z-index: 2;
}

    .side-menu-wrapper.collapsed {
        width: 0;
    }

.side-menu {
    position: absolute;
    width: 250px;
    height: 100%;
    background-color: #f8f9fa;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1;
}

/* Stretch content when sidebar is hidden */
.main-content.full-width .iframe-container {
    flex: 1 1 100%;
}

.main-content.full-width .side-menu {
    display: none;
}

.side-menu-wrapper.collapsed .side-menu {
    transform: translateX(-100%);
}

.sidebar-backdrop {
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}


@media (max-width: 768px) {
    .side-menu-wrapper {
        position: fixed;
        top: 40px;
        left: 0;
        height: calc(100% - 40px);
        width: 250px;
        z-index: 2;
        transition: transform 0.3s ease;
        transform: translateX(-100%);
    }

    .side-menu-wrapper.show {
        transform: translateX(0);
    }

    .side-menu {
        position: relative; /* Not absolute in mobile drawer */
    }

    .main-content.full-width .iframe-container {
        flex: 1;
    }
}

@keyframes pulse-bg {
    0% {
        background-color: rgba(255, 255, 255, 0.4);
    }

    50% {
        background-color: rgba(220, 220, 220, 0.6);
    }

    100% {
        background-color: rgba(255, 255, 255, 0.4);
    }
}

.iframe-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.iframe-tab-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.iframe-tab-overlay.active {
    opacity: 1;
    pointer-events: all;
    animation: pulse-bg 1.4s ease-in-out infinite;
}

.top-left {
    width: 250px;
    flex-shrink: 0;
}

.top-right {
    flex-shrink: 0;
}


.top-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.top-tabs::-webkit-scrollbar {
    display: none;
}

.tab-scroll-left,
.tab-scroll-right {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 30px;
    opacity: 0.8;
}

.tab-scroll-left:hover,
.tab-scroll-right:hover {
    opacity: 1;
}

.tab-close-icon {
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tab-close-icon:hover {
    color: #dc3545; /* Bootstrap danger red or choose your brand color */
}



/*
    END MAIN LAYOUT
*/


/*
    IFRAME AREAS
*/


.iframe-toolbar {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 50;
    padding: 0.5rem 1rem;
    overflow: visible;
    background-color: black;
}

.toolbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.scrollable-button-group {
    overflow-x: auto;
    overflow-y: hidden;
    flex-grow: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scrollable-button-group::-webkit-scrollbar {
    display: none;
}

.scroll-controls {
    flex-shrink: 0;
}




.context-menu {
    background: white;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 160px;
    padding: 0.25rem 0;
    position: fixed;
}

.context-menu .dropdown-item {
    padding: 0.25rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}

.context-menu .dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0.25rem 0;
}

.has-submenu::after {
    content: "›";
    position: absolute;
    right: 0.5rem;
}

.context-submenu {
    position: absolute;
    top: 0;
    left: 100%;
    background: white;
    border: 1px solid #ccc;
    min-width: 150px;
    box-shadow: 2px 4px 6px rgba(0,0,0,0.1);
    padding: 0.25rem 0;
    display: none;
}

.dropdown-item:hover > .context-submenu {
    display: block;
}


.context-icon {
    display: inline-block;
    width: 1.5rem;
}

.context-menu .dropdown-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: none !important;
}


/*
    Default Dropdown
*/

.dropdown-menu {
  border-radius: 4px;
  padding: 10px 0;
  animation-name: dropdown-animate;
  animation-duration: 0.2s;
  animation-fill-mode: both;
  border: 0;
  box-shadow: 0 5px 30px 0 rgba(82, 63, 105, 0.2);
}

.dropdown-menu .dropdown-header,
.dropdown-menu .dropdown-footer {
  text-align: center;
  font-size: 15px;
  padding: 10px 25px;
}

.dropdown-menu .dropdown-footer a {
  color: #444444;
  text-decoration: underline;
}

.dropdown-menu .dropdown-footer a:hover {
  text-decoration: none;
}

.dropdown-menu .dropdown-divider {
  color: #a5c5fe;
  margin: 0;
}

.dropdown-menu .dropdown-item {
  font-size: 14px;
  padding: 10px 15px;
  transition: 0.3s;
}

.dropdown-menu .dropdown-item i {
  margin-right: 10px;
  font-size: 18px;
  line-height: 0;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f6f9ff;
    cursor: pointer;
}

@media (min-width: 768px) {
  .dropdown-menu-arrow::before {
    content: "";
    width: 13px;
    height: 13px;
    background: #fff;
    position: absolute;
    top: -7px;
    right: 20px;
    transform: rotate(45deg);
    border-top: 1px solid #eaedf1;
    border-left: 1px solid #eaedf1;
  }
}

@keyframes dropdown-animate {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }

  0% {
    opacity: 0;
  }
}

/*
    Tabulator
*/


.tabulator-popup-container {
    border-radius: 10px;
    font-size: 15px;
}

.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover {
    background: #000000;
    color: #4154f1;
}

.tabulator-menu-item i {
    padding-top: inherit;
    margin-right: 8px;
    font-size: large;
}

@keyframes fadeInOutColor {
    0%, 100% {
        background-color: var(--fade-color, #ffffff); /* Default fade color */
    }

    50% {
        background-color: var(--original-color, #007bff); /* Default original color */
    }
}

.tabulator-cell-fade-effect {
    animation: fadeInOutColor 3s infinite;
    border-style: solid;
    border-width: 1px;
}

.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after {
    top: calc(10px + .4em);
    border-color: #3a12f9;
}

.no-filter {
    padding-left: 0px;
}

.has-filter {
    padding-left: 20px; /* Adjust based on your needs */
}



.tabulator .tabulator-header-popup-button {
    position: absolute;
    left: 0;
    top: 10px;
    transform: translateY(-50%);
    z-index: 1;
    padding: 0 !important;
}




.tabulator-selected {
    box-shadow: inset 0 0 0 1px rgba(0, 123, 255, 0.8); /* Inward border */
    transition: box-shadow 0.2s ease-in-out;
}

/* Specific case: Selected and Pending */
.tabulator-selected.row-pending::before {
}

.tabulator-selected.row-approved::before {
}

/* Specific case: Selected and In-Progress */
.tabulator-selected.row-inprogress::before {
}

/* Specific case: Selected and Rejected */
.tabulator-selected.row-rejected::before {
}

/* Ensure text color adapts for light and dark modes */
.row-approved,
.row-pending,
.row-inprogress,
.row-rejected {
    color: inherit;
}




/* Approved (Green, balanced for both modes) */
@keyframes pulse-approved {
    0% {
        background-color: rgba(0, 128, 0, 0.4); /* Dark green */
    }

    50% {
        background-color: rgba(0, 255, 0, 0.7); /* Vibrant green */
    }

    100% {
        background-color: rgba(0, 128, 0, 0.4); /* Dark green */
    }
}

/* Pending (Yellow, balanced for both modes) */
@keyframes pulse-pending {
    0% {
        background-color: rgba(200, 200, 0, 0.4); /* Dark yellow */
    }

    50% {
        background-color: rgba(255, 255, 0, 0.8); /* Bright yellow */
    }

    100% {
        background-color: rgba(200, 200, 0, 0.4); /* Dark yellow */
    }
}

/* In Progress (Orange, balanced for both modes) */
@keyframes pulse-inprogress {
    0% {
        background-color: rgba(200, 100, 0, 0.4); /* Dark orange */
    }

    50% {
        background-color: rgba(255, 165, 0, 0.8); /* Vibrant orange */
    }

    100% {
        background-color: rgba(200, 100, 0, 0.4); /* Dark orange */
    }
}

/* Rejected (Red, balanced for both modes) */
@keyframes pulse-rejected {
    0% {
        background-color: rgba(150, 0, 0, 0.4); /* Dark red */
    }

    50% {
        background-color: rgba(255, 0, 0, 0.8); /* Bright red */
    }

    100% {
        background-color: rgba(150, 0, 0, 0.4); /* Dark red */
    }
}

/*--------------------------------------------------------------
Row Classes with Animation
--------------------------------------------------------------*/

/* Base setup for rows */
.row-approved,
.row-pending,
.row-inprogress,
.row-rejected {
    position: relative; /* Ensure positioning for pseudo-element */
    z-index: 1; /* Text stays above animations */
}

.row-approved::before,
.row-pending::before,
.row-inprogress::before,
.row-rejected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0; /* Animation layer below text */
    border-radius: inherit; /* Match cell or row border-radius */
}

:root {
    --inprogress-color: rgba(255, 165, 0, 0.8);
    --approve-color: rgba(0, 128, 0, 0.4);
    --pending-color: rgba(255, 255, 0, 0.8);
    --reject-color: rgba(220, 20, 60,0.8);
    --draft-color: rgba(178, 190, 181,0.8);
}

/* Approved (Green, calm pulse) */
.row-approved::before {
    background-color: var(--approve-color);
    /*animation: pulse-approved 2s infinite;*/
}

/* Pending (Yellow, medium pulse) */
.row-pending::before {
    background-color: var(--pending-color);
    /*animation: pulse-pending 1.5s infinite;*/
}

/* In Progress (Orange, fast pulse) */
.row-inprogress::before {
    background-color: var(--inprogress-color);
}

/* Rejected (Red, sharp pulse) */
.row-rejected::before {
    background-color: var(--reject-color); /*rgba(255, 0, 0, 0.8);*/
}

.table-border-approved {
    border-color: var(--approve-color);
}

.table-border-pending {
    border-color: var(--pending-color);
}
.table-border-inprogress {
    border-color: var(--inprogress-color);
}
.table-border-rejected {
    border-color: var(--reject-color);
}

/*
    Extra Buttons
*/
.btn-orange {
    background-color: rgba(255, 165, 0, 0.8); /* Bootstrap's orange shade */
    color: white; /* Text color */
}

.btn-orange:hover {
    background-color: rgba( 245, 203, 167, 0.4); /* Bootstrap's orange shade */
    color: white; /* Text color */
}


.btn-orange:disabled,
.btn-orange[disabled] {
    background-color: rgba(255, 165, 0, 0.8); /* Darker orange on hover */
    opacity: 1; /* Prevent Bootstrap from lowering opacity */
}


.btn-purple {
    background-color: #9b59b6;
    color: white;
}
.btn-purple:hover {
    background-color: rgba( 165, 105, 189, 0.4); /* Bootstrap's orange shade */
    color: white; /* Text color */
}


.btn-purple:disabled,
.btn-purple[disabled] {
    background-color: #8e44ad;
    opacity: 1; /* Prevent Bootstrap from lowering opacity */
}

.btn.disabled,
.btn:disabled {
    pointer-events: all !important; /* Allow hover */
    cursor: not-allowed !important; /* Show the cancel cursor (🚫) */
    opacity: 0.65 !important; /* Keep the disabled look */
}

.btn.disabled:hover,
.btn:disabled:hover {
    background-color: #dc3545 !important; /* Change color on hover */
    border-color: #dc3545 !important;
    color: white !important;
}

.btn-xs {
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    line-height: 1.2;
}



/*
    CHILD IFRAME SPECIFICS
*/
.page-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(3px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.page-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}


/*
    VIRTUAL SELECT
*/

.vscomp-toggle-button {
    border-radius: var(--bs-border-radius);
}

.vscomp-ele {
    display: block;
    max-width: 100%;
}

/*
    SWEET ALERT
*/

.swal2-popup,
.swal2-html-container {
    overflow: visible !important;
}
/*
    CARDS
*/

/* Card */
.card {
    margin-top:12px;
    margin-bottom:10px;
    border: none;
    border-radius: 10px;
    box-shadow: 0px 0 30px rgba(1, 41, 112, 0.1);
}

.card-header,
.card-footer {
    border-color: #ebeef4;
    background-color: #fff;
    color: #798eb3;
}

.card-title {
    font-size: 18px;
    font-weight: 500;
    color: #012970;
}

.card-title span {
    color: #899bbd;
    font-size: 14px;
    font-weight: 400;
}

.card-body {
    padding: 10px;
}

.card-img-overlay {
    background-color: rgba(255, 255, 255, 0.6);
}


/*
    PULSES (EXCLUDING LOADING PULSE)
*/

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0px rgba(255, 0, 0, 0.7);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 1);
        transform: scale(1.1);
    }

    100% {
        box-shadow: 0 0 0px rgba(255, 0, 0, 0.7);
        transform: scale(1);
    }
}

.pulse-glow {
    display: inline-block;
    animation: pulseGlow 1.5s infinite;
    border-radius: 50%; /* Optional, looks nice on circular icons */
}


