/* ========================================
   GLOBAL STYLES
   ======================================== */

* {
	font-family: "Roboto", sans-serif;
	letter-spacing: 0.5px;
}

body {
	background-color: #f3f4f6;
}

.container-fluid {
	max-width: 94% !important;
}

/* ========================================
   NAVIGATION TABS
   ======================================== */

.custom-tabs {
	border-bottom: 2px solid #f0f0f0;
	margin-bottom: 20px;
}

.nav-tabs .nav-link {
	color: #343a40;
	font-size: 14px;
	font-weight: 500;
	padding: 10px 16px;
	margin-right: 5px;
	transition: all 0.2s ease;
	border: none;
}

.nav-tabs .nav-link:hover {
	color: #247fc0;
	border-bottom: 2px solid #247fc0;
	background-color: transparent;
}

.nav-tabs .nav-link.active {
	color: #247fc0;
	background-color: transparent;
	border: none;
	border-bottom: 2px solid #247fc0;
	font-weight: 600;
}

/* ========================================
   FORM CONTROLS & SEARCH
   ======================================== */

/* Search and Filter Elements */
.search-projects {
	border-radius: 5px;
	border: 1px solid #ced4da !important;
	padding: 8px 15px;
}

.project-type-select,
.project-priority-select,
.project-requestor-select,
.auto-scores-select,
.project-start-date-select,
.project-end-date-select,
.project-date-quick-select,
.project-vp-select,
.project-board-select {
	border-radius: 5px;
	border: 1px solid #ced4da !important;
	padding: 8px 10px;
}

/* Focus States */
.form-control:focus,
.form-select:focus {
	border-color: #4fb949 !important;
	box-shadow: 0 0 0 0.25rem rgba(79, 185, 73, 0.25) !important;
	background-color: #edf8ed;
	outline: 0 none;
}

.input-group-append {
	cursor: pointer;
}

/* ========================================
   BADGES & STATUS INDICATORS
   ======================================== */

.badge {
	font-weight: 500;
	padding: 6px 10px;
	border-radius: 4px;
	font-size: 12px;
}

/* Priority Badge Colors */
.priority-danger {
	background-color: #ffdbdb;
	color: #dc3545;
}

.priority-warning {
	background-color: #fff3cd;
	color: #856404;
}

.priority-success {
	background-color: #d1e7dd;
	color: #0f5132;
}

.priority-secondary {
	background-color: #e9ecef;
	color: #495057;
}

/* Type Badge Colors */
.type-primary,
.type-danger,
.type-warning,
.type-success,
.type-info {
	background-color: #cfe2ff;
	color: #0d6efd;
}

.type-lightblue {
	background-color: #cfe2ff;
	color: #0d6efd;
}

.type-danger {
	background-color: #f8d7da;
	color: #dc3545;
}

.type-green {
	background-color: #d1e7dd;
	color: #198754;
}

.type-light {
	background-color: #f1f1f1;
	color: #585858;
}

.type-warning {
	background-color: #fff3cd;
	color: #664d03;
}

.type-secondary {
	background-color: #cff4fc;
	color: #055160;
}

.type-purple {
	background-color: #e7e0ff;
	color: #6f42c1;
}

/* Custom Project Stage Classes */
.text-bg-purple {
	background-color: #e0b0ff;
	color: #702963;
}

.text-bg-lightblue {
	background-color: #bbdefb;
	color: #1565c0;
}

.text-bg-green {
	background-color: #a9dfbf;
	color: #196f3d;
}

/* ========================================
   PROGRESS BARS & STATUS
   ======================================== */

.status-container {
	padding-bottom: 6px;
}

.status-percent {
	font-weight: 600;
	color: #343a40;
}

.progress {
	background-color: #e9ecef;
	border-radius: 4px;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
	height: 5px;
}

.progress-bar {
	background-color: #247fc0;
	border-radius: 4px;
	transition: width 0.6s ease;
}

/* Progress Bar Color States */
.progress-bar[style*="width: 0%"] {
	background-color: #e9ecef; /* Gray for 0% */
}

/* Red for very low % (1-10%) */
.progress-bar[style*="width: 1%"],
.progress-bar[style*="width: 2%"],
.progress-bar[style*="width: 3%"],
.progress-bar[style*="width: 4%"],
.progress-bar[style*="width: 5%"],
.progress-bar[style*="width: 6%"],
.progress-bar[style*="width: 7%"],
.progress-bar[style*="width: 8%"],
.progress-bar[style*="width: 9%"],
.progress-bar[style*="width: 10%"] {
	background-color: #dc3545;
}

/* Yellow for low to mid % (11-40%) */
.progress-bar[style*="width: 1_"] {
	background-color: #ffc107;
}
.progress-bar[style*="width: 2_"] {
	background-color: #ffc107;
}
.progress-bar[style*="width: 3_"] {
	background-color: #ffc107;
}
.progress-bar[style*="width: 40%"] {
	background-color: #ffc107;
}

/* Blue for mid to high % (41-70%) */
.progress-bar[style*="width: 4_"] {
	background-color: #247fc0;
}
.progress-bar[style*="width: 5_"] {
	background-color: #247fc0;
}
.progress-bar[style*="width: 6_"] {
	background-color: #247fc0;
}
.progress-bar[style*="width: 70%"] {
	background-color: #247fc0;
}

/* Green for high % (71-100%) */
.progress-bar[style*="width: 7_"] {
	background-color: #198754;
}
.progress-bar[style*="width: 8_"] {
	background-color: #198754;
}
.progress-bar[style*="width: 9_"] {
	background-color: #198754;
}
.progress-bar[style*="width: 100%"] {
	background-color: #198754;
}

/* ========================================
   TABLE STYLES
   ======================================== */

.table-container {
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.table-responsive {
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.project-table {
	margin-bottom: 0;
	table-layout: auto;
}

.project-table thead th {
	font-size: 11px;
	font-weight: 600;
	color: #343a40;
	padding: 15px 12px;
	background-color: #f8f9fa;
	text-transform: uppercase;
	text-align: center;
	vertical-align: middle;
	letter-spacing: 1px;
	white-space: nowrap;
}

.project-table tbody td {
	padding: 15px 12px;
	vertical-align: middle;
	text-align: center;
	border-color: #f0f0f0;
	font-size: 12px;
}

/* Table Cell Content */
td {
	font-weight: 500;
	color: #343a40;
	text-decoration: none;
}

.project-title a {
	font-weight: 600;
	color: #343a40;
	text-decoration: none;
	font-size: 14px;
}

.project-title,
.description-text {
	text-align: left !important;
	vertical-align: auto !important;
}

.project-title a:hover {
	color: #247fc0;
}

/* Date Styling */
.date-danger {
	color: #dc3545;
	font-weight: 600;
}

.date-warning {
	color: #d18700;
	font-weight: 600;
}

.date-success {
	color: #198754;
	font-weight: 600;
}

.date-secondary {
	color: #6c757d;
	font-style: italic;
}

.description-text {
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.4;
}

.description-cell {
	text-align: left;
	vertical-align: top;
	max-width: 500px; /* Limit the width */
	min-width: 300px;
}

.description-text-cr {
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.4;
	max-height: 80px; /* Limit height */
	overflow-y: auto; /* Add vertical scroll */
	overflow-x: hidden; /* Hide horizontal overflow */
	word-wrap: break-word; /* Break long words */
}

.description-cell-cr {
	text-align: left;
	vertical-align: top;
	max-width: 250px; /* Limit the width */
	min-width: 200px;
}

/* Table Interactions */
.table-hover tbody tr:hover {
	background-color: #f3f4f6;
	cursor: pointer;
}

/*
th.ascending::after {
    content: " ▲";  
}

th.descending::after {
    content: " ▼";  
}

th {
    cursor: pointer;
} */

/* ========================================
   CARD STYLES
   ======================================== */

.project-card {
	border: none;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-card {
	border: none;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-title {
	font-size: 16px;
	font-weight: 600;
	color: #343a40;
	margin-bottom: 8px;
}

.card-text {
	color: #6c757d;
	font-size: 14px;
}

.project-card:hover .expandable-text {
	white-space: normal;
	overflow: visible;
}

/* ========================================
   MODAL STYLES
   ======================================== */

#projectModal .modal-content {
	font-size: 0.875rem; /* Smaller text */
	line-height: 1.4;
}

#projectModal .modal-title {
	font-size: 1.125rem; /* Slightly larger title */
	font-weight: bold;
}

#projectModal .modal-body p {
	font-size: 0.875rem; /* Smaller body text */
	margin-bottom: 0.5rem;
}

#projectModal .badge {
	font-size: 0.75rem; /* Smaller badge text */
	padding: 0.35em 0.5em;
}

#projectModal .progress {
	height: 5px;
}

/* Modal Background Effects */
.blurred {
	filter: blur(5px);
	pointer-events: none; /* Prevent interactions with the blurred content */
}

.modal-backdrop.show {
	z-index: 1040 !important;
}

/* ========================================
   TAB CONTENT STYLES
   ======================================== */

.tab-pane h4 {
	color: #343a40;
	font-weight: 600;
	font-size: 20px;
	margin-bottom: 5px;
}

.tab-pane h5 {
	color: #343a40;
	font-weight: 600;
	font-size: 18px;
	margin-bottom: 15px;
}

.tab-pane h6 {
	color: #343a40;
	font-weight: 600;
	font-size: 16px;
	margin-bottom: 15px;
}

.tab-pane hr {
	margin: 15px 0 20px;
	opacity: 0.1;
}

.truncate-3-lines {
  display: -webkit-box;
  -webkit-line-clamp: 4; /* Change to 2 or 4 for different limits */
  line-clamp: 4; /* Standard property for compatibility */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/*Below was added in by Dom in a rush. Hope to comeback and refactor*/
/* ========================================
   PRIORITY BUTTON STYLES
   ======================================== */

/* Not Set Priority */
.btn-outline-notset {
    background-color: #e9ecef;
    color: #495057;
    border-color: #e9ecef;
}

.btn-outline-notset:hover {
    background-color: #e9ecef !important;
    color: #495057 !important;
    border-color: #495057 !important;
}

.btn-check:checked + .btn-outline-notset {
    background-color: #c6c9cc !important;
    color: #212529 !important;
    border-color: #495057 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 2px rgba(73, 80, 87, 0.3) !important;
}

/* Low Priority */
.btn-outline-low {
    background-color: #d1e7dd;
    color: #0f5132;
    border-color: #d1e7dd;
}

.btn-outline-low:hover {
    background-color: #d1e7dd !important;
    color: #0f5132 !important;
    border-color: #0f5132 !important;
}

.btn-check:checked + .btn-outline-low {
    background-color: #a3cfbb !important;
    color: #0a3622 !important;
    border-color: #0f5132 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 2px rgba(15, 81, 50, 0.3) !important;
}

/* Medium Priority */
.btn-outline-medium {
    background-color: #fff3cd;
    color: #856404;
    border-color: #fff3cd;
}

.btn-outline-medium:hover {
    background-color: #fff3cd !important;
    color: #856404 !important;
    border-color: #856404 !important;
}

.btn-check:checked + .btn-outline-medium {
    background-color: #ffe69c !important;
    color: #664d03 !important;
    border-color: #856404 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 2px rgba(133, 100, 4, 0.3) !important;
}

/* High Priority */
.btn-outline-high {
    background-color: #ffe5d0;
    color: #fd7e14;
    border-color: #ffe5d0;
}

.btn-outline-high:hover {
    background-color: #ffe5d0 !important;
    color: #fd7e14 !important;
    border-color: #fd7e14 !important;
}

.btn-check:checked + .btn-outline-high {
    background-color: #ffc89c !important;
    color: #cc6200 !important;
    border-color: #fd7e14 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 2px rgba(253, 126, 20, 0.3) !important;
}

/* Critical Priority */
.btn-outline-critical {
    background-color: #ffdbdb;
    color: #dc3545;
    border-color: #ffdbdb;
}

.btn-outline-critical:hover {
    background-color: #ffdbdb !important;
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.btn-check:checked + .btn-outline-critical {
    background-color: #f8b9b9 !important;
    color: #b02a37 !important;
    border-color: #dc3545 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3) !important;
}

/* ========================================
   TAG BUTTON STYLES
   ======================================== */

/* Base Tag Button Style */
.btn-outline-tag {
    --tag-color-light: color-mix(in srgb, var(--tag-color), white 75%);
    --tag-color-dark: color-mix(in srgb, var(--tag-color), black 20%);
    --tag-color-darker: color-mix(in srgb, var(--tag-color), black 30%);
    --tag-shadow-color: color-mix(
        in srgb,
        var(--tag-color-darker),
        transparent 70%
    );
    --tag-text-color: color-mix(in srgb, var(--tag-color), black 50%);

    color: var(--tag-text-color);
    background-color: var(--tag-color-light) !important;
    border-color: transparent;
    transition: all 0.15s ease-in-out;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Tag Button Hover State */
.btn-outline-tag:hover {
    border-color: var(--tag-color-dark) !important;
}

/* Tag Button Selected State */
.btn-check:checked + .btn-outline-tag {
    background-color: var(--tag-color-light) !important;
    color: var(--tag-text-color) !important;
    border-color: var(--tag-color-darker) !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 2px var(--tag-shadow-color) !important;
}

/* Tag Button Wrapper */
.tag-checkbox-wrapper {
    display: inline-block;
}

/* Tag Button Text Readability for Light Colors */
.btn-outline-tag[style*="--tag-color: #ff"],
.btn-outline-tag[style*="--tag-color:#ff"] {
    --tag-text-color: color-mix(in srgb, var(--tag-color), black 60%);
}

/* ========================================
   ADVANCED PRIORITY BUTTON STYLES
   ======================================== */

/* Advanced Priority Base Style */
.btn-outline-priority {
    --priority-color-light: color-mix(in srgb, var(--priority-color), white 75%);
    --priority-color-dark: color-mix(in srgb, var(--priority-color), black 20%);
    --priority-color-darker: color-mix(in srgb, var(--priority-color), black 30%);
    --priority-shadow-color: color-mix(
        in srgb,
        var(--priority-color-darker),
        transparent 70%
    );
    --priority-text-color: color-mix(in srgb, var(--priority-color), black 50%);

    color: var(--priority-text-color);
    background-color: var(--priority-color-light) !important;
    border-color: transparent;
    flex: 1;
    transition: all 0.15s ease-in-out;
}

/* Special Border for "Not Set" Priority */
.btn-outline-priority[for="priorityNot Set"] {
    border-color: var(--priority-color);
}

/* Critical Priority Text Color Override */
.btn-outline-priority[style*="--priority-color: #ff4b4b"],
.btn-outline-priority[style*="--priority-color:#ff4b4b"] {
    --priority-text-color: #990000;
}

/* Advanced Priority Hover State */
.btn-outline-priority:hover {
    border-color: var(--priority-color-dark) !important;
}

/* Advanced Priority Selected State */
.btn-check:checked + .btn-outline-priority {
    background-color: var(--priority-color-light) !important;
    color: var(--priority-text-color) !important;
    border-color: var(--priority-color-darker) !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 2px var(--priority-shadow-color) !important;
}

/* Bootstrap Override for Button Groups */
.btn-group .btn-check:checked + .btn {
    background-color: var(--priority-color-light) !important;
}