/*
File: Custom Css File
*/


/* FONTS */
.font-brand {
    font-family: "Quicksand", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    text-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
}
.font-title {
    font-family: "Quicksand", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
}
.font-esd {
    font-family: "Quicksand", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: bold;
}
.taak-green {
    color: rgb(33, 185, 164) !important;
}


/* LANDING */
.hero-image {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.feature-card {
    transition: all 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}


/* GANTT PAGE */
.gantt-container {
    overflow-x: auto;
    margin-bottom: 30px;
}

.gantt-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 800px;
}

.gantt-table th, .gantt-table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px;
    text-align: center;
}

.gantt-table th {
    background-color: rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
    color: rgba(255, 255, 255, 0.9);
}

.gantt-table .project-name {
    text-align: left;
    font-weight: 600;
    min-width: 250px;
    position: sticky;
    left: 0;
    background-color: #282b2e;
    z-index: 5;
    color: rgba(255, 255, 255, 0.9);
}

.gantt-table .project-info {
    text-align: left;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.gantt-bar {
    height: 25px;
    border-radius: 3px;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.today-marker {
    position: absolute;
    width: 2px;
    background-color: #ff5757;
    height: 100%;
    z-index: 2;
}

.weekend {
    background-color: rgba(255, 255, 255, 0.03);
}

.status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.legend-item {
    display: flex;
    align-items: center;
    white-space: nowrap; /* Prevents the manufacturer name from breaking */
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Time period selector */
.period-selector {
    margin-bottom: 20px;
}

.period-selector .btn-group {
    margin-bottom: 10px;
}

/* Timeline formatting */
.gantt-table td {
    position: relative;
    height: 40px;
    padding: 0;
    background-color: #2d3237;
}


/* Improve visibility of project bars */
.gantt-bar {
    border: 1px solid rgba(0, 0, 0, 0.3);
}

/* Enhance contrast in project info */
.project-info strong {
    color: rgba(255, 255, 255, 0.9);
}

/* Due date marker and tooltip styles */
.due-date-marker {
    position: absolute;
    right: -5px;
    top: -5px;
    width: 12px;
    height: 12px;
    background-color: #ff5757;
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 3;
    cursor: pointer;
}

.tooltip-container {
    position: relative;
}

.due-date-tooltip {
    position: absolute;
    background-color: rgba(51,51,51, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    z-index: 100;
    width: max-content;
    max-width: 250px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
    visibility: visible;
    opacity: 1;
    top: -35px;
    right: 0;
    white-space: nowrap;
}

/* Revised due date styling */
.revised-date {
    color: #ff5757;
    font-weight: bold;
}

/* Due date flag */
.due-date-flag {
    position: absolute;
    right: -1px;
    height: 35px;
    width: 8px;
    background-color: #ff5757;
    z-index: 2;
    border-radius: 0 3px 3px 0;
    border: 1px solid rgba(0, 0, 0, 0.3);
}

/* Week counter badge */
.weeks-badge {
    display: inline-block;
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 10px;
    background-color: #0a84ff;
    color: white;
    font-weight: bold;
    text-align: center;
    margin-left: 4px;
    font-size: 10px;
}

.weeks-past-due {
    background-color: #ff5757;
}


/* Print-specific styles that will only apply when printing the page directly */
@media print {
    /* Hide navigation elements and other non-essential UI */
    #layout-wrapper > header,
    .vertical-menu,
    #page-topbar,
    .page-title-right,
    .footer,
    #back-to-top,
    #preloader,
    .filter-container form label,
    .filter-container select,
    button:not(#printGanttBtn) {
        display: none !important;
    }
    
    /* Expand content to full width */
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .container-fluid {
        width: 100% !important;
        max-width: none !important;
        padding: 10px !important;
    }
    
    /* Ensure the Gantt chart table is visible and spans the page */
    .gantt-container {
        overflow: visible !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .gantt-table {
        font-size: 11px !important;
        width: 100% !important;
        page-break-inside: avoid;
    }
    
    /* Improve visibility in print */
    .gantt-table th, 
    .gantt-table td {
        border: 1px solid #000 !important;
        color: #000 !important;
        background-color: #fff !important;
    }
    
    .gantt-table th {
        background-color: #f0f0f0 !important;
    }
    
    .gantt-table .project-name {
        background-color: #f0f0f0 !important;
        color: #000 !important;
    }
    
    .project-info {
        color: #333 !important;
    }
    
    /* Force background colors to print */
    .gantt-bar,
    .legend-color,
    .due-date-flag {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    /* Set page to landscape orientation */
    @page {
        size: landscape;
        margin: 0.5cm;
    }
    
    /* Add a header and footer for the printed page */
    .card-title::before {
        content: "TaakBoard Gantt Chart - " attr(data-print-date);
        display: block;
        text-align: center;
        font-size: 14pt;
        margin-bottom: 10px;
    }
    
    .card::after {
        content: "Printed on " attr(data-print-date);
        display: block;
        text-align: center;
        font-size: 8pt;
        margin-top: 10px;
    }
}


.gantt-bar {
    cursor: pointer;
    transition: opacity 0.2s ease;
    border-radius: 4px;
    height: 100%;
}

.gantt-bar:hover {
    opacity: 0.8;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}

.chart-container {
    position: relative;
    margin: auto;
    height: 100%;
    width: 100%;
  }
  
  canvas {
    max-width: 100%;
    max-height: 100%;
  }

  .status-header {
    position: relative;
    display: flex;
    align-items: center;
    padding-bottom: 8px;
}

.status-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #f0f0f0;
}

/* Add some space between status sections */
.table-responsive > div:not(:last-child) {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

/* Make status badges a bit larger and more prominent */
.status-header .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem !important;
}



/* Project Gannt Chart */
/* Dark Theme Colors */
:root {
    --bs-dark-rgb: 26, 38, 52;
    --bs-darker: #253240;
    --bs-darkest: #1a2634;
    --bs-dark-border: #374151;
    --bs-cyan: #0dcaf0;
    --bs-cyan-rgb: 13, 202, 240;
    --bs-text-light: #e9ecef;
    --bs-text-muted: #adb5bd;
}

/* Status Badges */
.badge.bg-secondary-subtle {
    background-color: rgba(108, 117, 125, 0.2) !important;
}

.badge.bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.2) !important;
}

.badge.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.2) !important;
}

.badge.bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.2) !important;
}

/* Chart Container */
.gantt-chart-container {
    background-color: var(--bs-darker);
    border-radius: 6px;
}

/* Dark theme for alerts */
.alert-primary.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.2) !important;
    color: #0d6efd !important;
    border-color: rgba(13, 110, 253, 0.4) !important;
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-darkest);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-dark-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Date picker styling for dark theme */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* SweetAlert Dark Theme Overrides */
.swal2-popup.swal2-toast {
    background: var(--bs-darker) !important;
    color: var(--bs-text-light) !important;
}

/* Ensure tables look good in dark mode */
.table-bordered {
    border-color: var(--bs-dark-border);
}

.table-bordered th, 
.table-bordered td {
    border-color: var(--bs-dark-border);
}

.table thead th {
    border-bottom-color: var(--bs-dark-border);
    background-color: rgba(55, 65, 81, 0.3);
}


/* Add subtle fade effect to read notifications */
.notification-item.read-notification {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* Style for the notification badge */
.topbar-badge {
    top: 0;
    right: 0;
    transform: translate(40%, -40%) !important;
}

/* Improve notification item hover */
.notification-item:hover {
    background-color: rgba(var(--vz-light-rgb), 0.6);
}

/* Make checkboxes more visible */
.notification-check .form-check-input {
    cursor: pointer;
}

/* Animation for new notifications */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(0.8);
    }
}

.has-new-notifications .bx-bell {
    animation: pulse-ring 2s ease infinite;
    transform-origin: center;
}

/* File Upload */
#uploadFile p{
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 80px;
    color: #f0f0f0;
    background-color: #262a2f;
    border-style: dashed;
    border-color: #5c6066;
    font-weight: bold;
}

#uploadFile input{
position: absolute;
margin: 0;
padding: 0;
width: 100%;
height: 80px;
outline: none;
opacity: 0;
}