/* Custom Sidebar Styles for T2I Holidays Admin */

/* Active menu item highlight */
.pe-nav-link.active {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-weight: 600;
}

/* Hover effect */
.pe-nav-link:hover {
    background-color: rgba(var(--primary-rgb), 0.05);
}

/* Active submenu item */
.pe-slide-menu .pe-nav-link.active {
    color: var(--primary);
    font-weight: 600;
    padding-left: 3rem;
    border-left: 3px solid var(--primary);
}

/* Menu icons spacing */
.pe-nav-icon {
    font-size: 1.1rem;
}

/* Submenu icons */
.pe-slide-menu .bi {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Menu titles */
.pe-menu-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 1rem 1.5rem 0.5rem;
}

/* Smooth transitions */
.pe-nav-link,
.pe-slide-menu {
    transition: all 0.3s ease;
}

/* Logo hover effect */
.pe-app-sidebar-logo a:hover {
    opacity: 0.8;
}

/* Fix for sidebar text showing behind when in icon mode */
[data-sidebar="icon"] .pe-app-sidebar {
    overflow: hidden !important;
}

[data-sidebar="icon"] .pe-nav-content,
[data-sidebar="icon"] .pe-nav-arrow,
[data-sidebar="icon"] .pe-menu-title {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

[data-sidebar="icon"] .pe-slide-menu {
    display: none !important;
}

[data-sidebar="icon"] .pe-nav-link {
    justify-content: center;
    padding: 0.75rem;
}

[data-sidebar="icon"] .pe-nav-icon {
    margin: 0 !important;
}

/* Ensure proper z-index and fixed positioning */
.pe-app-sidebar {
    z-index: 1005;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    overflow-x: hidden;
}

/* Smooth transition when toggling */
.pe-app-sidebar {
    transition: width 0.3s ease, left 0.3s ease;
}

.pe-nav-content,
.pe-nav-arrow {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hide scrollbar in icon mode */
[data-sidebar="icon"] .pe-app-sidebar-menu {
    overflow: hidden !important;
}

/* Tooltip support for icon mode */
[data-sidebar="icon"] .pe-nav-link {
    position: relative;
    cursor: pointer;
}

[data-sidebar="icon"] .pe-nav-link::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bs-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-left: 1rem;
    z-index: 1001;
    font-size: 0.875rem;
}

[data-sidebar="icon"] .pe-nav-link:hover::after {
    opacity: 0.9;
}

/* Hover effect for icon mode menu items */
[data-sidebar="icon"] .pe-has-sub > .pe-nav-link:hover {
    background-color: rgba(var(--primary-rgb), 0.15);
}

/* Popover styling */
.sidebar-icon-popover {
    animation: fadeInPopover 0.2s ease-in-out;
}

@keyframes fadeInPopover {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fix dashboard logo visibility when sidebar is in icon mode */
[data-sidebar=icon] .pe-app-sidebar .pe-app-sidebar-logo {
    position: relative !important;
    top: 0 !important;
    background-color: var(--pe-app-sidebar-bg) !important;
    width:4.4rem !important;
    border-right: 1px solid var(--pe-border-color) !important;
    z-index: auto !important;
}
.card-title {
    font-size: 20px;
    margin-bottom: 0;
    color: var(--pe-body-color);
}
    .bg-info-1 {
  background-color: #FE0000 !important;
  color: #fff !important;
}
@media (min-width: 992px) {
    [data-sidebar=icon] .app-header {
        left:4.4rem;
    }
}
.text-dark-custom {
  color: #212529 !important;
}
.btn-dark-custom{
    background-color:  #212529 !important;
    color: white
}
.btn-dark-custom:hover{
    background-color:  #212529 !important;
    color: white
}
/* Table Alignment Fix for Sidebar Toggle */

/* Fix table width during sidebar toggle */
.table {
    /* width: 100% !important; */
    table-layout: auto;
    transition: none;
}

/* Prevent table columns from jumping */
/* .table th,
.table td {
    white-space: nowrap;
    transition: none;
} */

/* DataTables specific fixes */
/* .dataTables_wrapper {
    width: 100%;
    transition: width 0.3s ease;
}

.dataTables_wrapper .table {
    margin: 0 !important;
} */

/* Fix for DataTables scrolling container */
.dataTables_scrollBody {
    transition: width 0.3s ease;
}

/* Ensure card maintains proper width */
.card {
    transition: width 0.3s ease;
}

/* Fix for content width during sidebar toggle */
@media (min-width: 992px) {
    .app-wrapper .container-fluid {
        max-width: 100%;
        transition: max-width 0.3s ease;
    }
}

/* Prevent layout shift on sidebar toggle */
/* [data-sidebar="icon"] .app-wrapper .table-responsive {
    width: 100%;
} */

/* Fix table overflow */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    will-change: transform;
}

/* Ensure smooth transition without layout shift */
* {
    box-sizing: border-box;
}

/* Fix for buttons and action columns */
.table .btn-group,
.table .dropdown {
    white-space: nowrap;
}

/* Prevent content jump */
.row {
    transition: margin-left 0.3s ease, margin-right 0.3s ease;
}

/* Stabilize table header */
.table thead th {
    position: relative;
}

/* Fix DataTables filter and length controls */
.dataTables_length,
.dataTables_filter {
    transition: none;
}

/* Ensure pagination doesn't shift */
.dataTables_paginate {
    transition: none;
    margin-top: 1rem;
}

/* Fix for row hover during transitions */
.table-hover tbody tr {
    transition: background-color 0.15s ease-in-out;
}

/* Prevent text wrapping changes during transition */
/* .table td {
    max-width: none;
} */

/* Fix for icon sidebar mode */
@media (min-width: 992px) {
    [data-sidebar="icon"] .app-wrapper {
        transition: margin-left 0.3s ease;
    }
    
    [data-sidebar="icon"] .table-responsive {
        transition: width 0.3s ease;
    }
}

/* Ensure content doesn't overflow during transition */
/* .container-fluid {
    overflow-x: hidden;
    transition: padding 0.3s ease;
} */

/* Additional stability fixes */
.card {
    will-change: auto;
}

/* Prevent flash of content during transition */
.app-wrapper > .container-fluid {
    position: relative;
}

/* Fix for DataTables responsive extension */
/* .dtr-details {
    width: 100%;
} */

/* Ensure search box and length selector stay in place */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}



/* Prevent content shift during sidebar animation */
@media (min-width: 992px) {
    /* body {
        overflow-x: hidden;
    } */
}

/* Fix for table actions column */
.table .text-end,
.table .text-center {
    min-width: fit-content;
}

/* Ensure badges and status indicators don't wrap */
.badge {
    white-space: nowrap;
}

/* Fix for dropdown menus in tables */
/* .table .dropdown-menu {
    position: absolute;
    z-index: 1050;
} */

/* Prevent table cell content from shifting */
.table td > * {
    vertical-align: middle;
}

/* Smooth opacity transition during adjustment */
.dataTables_processing {
    transition: opacity 0.2s ease;
}

/* Dashboard specific table fixes */
#layout-wrapper .table {
    width: 100% !important;
    table-layout: fixed;
}

#layout-wrapper .table th,
#layout-wrapper .table  {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ensure dashboard tables maintain column widths */
#layout-wrapper .table th[style*="width"],
#layout-wrapper .table td[style*="width"] {
    min-width: auto;
}

/* Fix for dashboard card body containing tables */
#layout-wrapper .card-body .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Prevent dashboard tables from shifting */
#layout-wrapper .card {
    transition: width 0.3s ease;
}

/* Fix for Recent Tours/Enquiries cards on dashboard */
#layout-wrapper .col-xl-8 .table,
#layout-wrapper .col-xl-4 .table {
    transition: none;
}

/* Ensure text doesn't wrap in specific columns */
.text-nowrap {
    white-space: nowrap !important;
}

/* Fix dropdown in dashboard tables */
/* #layout-wrapper .dropdown-menu {
    min-width: 150px;
} */

/* Ensure dashboard table cells have consistent height */
#layout-wrapper .table td {
    vertical-align: middle;
    padding: 0.75rem;
}

#layout-wrapper .table thead th {
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
}

/* Fix for table hover effect */
#layout-wrapper .table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

[data-bs-theme="dark"] #layout-wrapper .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.025);
}

/* Sidebar Footer - Logout Button Styling */
.pe-sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--pe-app-sidebar-bg);
    border-top: 1px solid var(--pe-border-color);
    padding: 0.75rem 0;
    z-index: 10;
}

.pe-sidebar-footer form {
    margin: 0;
}

.pe-sidebar-footer .pe-nav-link {
    color: var(--pe-danger, #dc3545);
    padding: 12px 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pe-sidebar-footer .pe-nav-link:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--pe-danger, #dc3545);
}

.pe-sidebar-footer .pe-nav-icon {
    font-size: 1.0625rem;
    width: 20px;
    height: 20px;
}

.pe-sidebar-footer .pe-nav-content {
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Icon mode logout styling */
[data-sidebar="icon"] .pe-sidebar-footer .pe-nav-link {
    justify-content: center;
    padding: 0.75rem;
}

[data-sidebar="icon"] .pe-sidebar-footer .pe-nav-content {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

[data-sidebar="icon"] .pe-sidebar-footer .pe-nav-icon {
    margin: 0 auto;
}

/* Tooltip for logout in icon mode */
[data-sidebar="icon"] .pe-sidebar-footer .pe-nav-link {
    position: relative;
}

[data-sidebar="icon"] .pe-sidebar-footer .pe-nav-link::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bs-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-left: 1rem;
    z-index: 1001;
    font-size: 0.875rem;
}

[data-sidebar="icon"] .pe-sidebar-footer .pe-nav-link:hover::after {
    opacity: 0.9;
}

/* Adjust sidebar menu height to account for footer */
.pe-app-sidebar-menu {
    height: calc(100% - var(--pe-app-header-height) - 60px) !important;
}

/* Footer width in icon mode */
[data-sidebar="icon"] .pe-sidebar-footer {
    width: 70px;
}
 