/* 
	* © Copyright  Samantha Reddington. All rights reserved.
	* Designed and developed by Samantha Reddington.
	* 
	* Unauthorised modification, redistribution, or reproduction of this file, 
	* in whole or in part, is strictly prohibited without prior written permission.
	* 
*/


/*table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed; /* Ensures equal column widths 
	}
	
	table, th, td {
    border: 1px solid #ddd;
	}
	
	th, td {
    padding: 10px;
    text-align: left;
	}
	
	th:first-child, td:first-child {
    width: 200px; 
    min-width: 200px;
    max-width: 200px;
	}
	
	th:not(:first-child), td:not(:first-child) {
    width: auto; 
	}
	
	th {
    background: #0073e6;
    color: white;
	}
	
	td {
    background: #ffffff;
	}
*/
/* Grid Right Click */
.context-menu {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.context-menu ul {
    list-style: none;
    padding: 10px;
    margin: 0;
}

.context-menu ul li {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.context-menu ul li:hover {
    background: #007bff;
    color: white;
}

/* Task Icon */
.task-icon {
    width: auto;
    height: auto;
    max-width: 80%;
    max-height: 80%;
    aspect-ratio: 1 / 1;
    object-fit: fill;
}

/* Icon Grid */
.icon-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Individual Icon */
.icon-option {
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.icon-option:hover {
    transform: scale(1.2);
}
/* 🏗️ Scrollable Container */
/* 🏗️ Main Container Holding Both Tables */
.main-grid-container {
    display: flex;
    justify-content: space-between; /* ✅ Ensures space between both tables */
    align-items: flex-start; /* ✅ Aligns tables at the top */
    width: 100%;
    gap: 10px; /* ✅ Adds spacing between tables */
}

/* 🏗️ Rota Table Container */
.rota-container, .summary-table-wrapper {
    height: 40%; /* ✅ Makes each table take up 45% of the parent */
    max-height: 40vh; /* ✅ Limits height */
    overflow-x: auto; /* ✅ Enables horizontal scrolling */
    overflow-y: auto; /* ✅ Enables vertical scrolling */
}

/* 📝 Unified Grid Styling (For Both Tables) */
.rota-grid {
    display: block;
    width: 100%; /* ✅ Ensures the table fills its container */
    border-collapse: collapse;
    table-layout: fixed; /* ✅ Prevents auto-resizing */
}

/* 🔹 First Row (Smaller Font) */
.rota-grid thead tr {
    font-size: 0.8em !important;
    text-align: center !important;
}


/* 🔹 Fixed Width for First Column */
.rota-grid td:first-child, 
.rota-grid th:first-child {
    min-width: 300px; /* ✅ Adjust this value as needed */
    max-width: 300px;
    width: 300px; /* ✅ Ensures consistency */
    white-space: nowrap; /* ✅ Prevents text wrapping */
    text-align: left;
    position: sticky;
    left: 0;
    background: white; /* ✅ Prevents overlap issues */
    z-index: 2;
	border-bottom: 1px solid #dee2e6;
}


/* 🔹 All Other Columns (Fixed Width) */
.rota-grid th:not(:first-child), 
.rota-grid td:not(:first-child) {
    min-width: 60px;
    max-width: 60px;
    width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
	border: 1px solid #dee2e6 !important;
}

/* 📊 Force Scrollbars to Always Be Visible */
.rota-container::-webkit-scrollbar,
.summary-table-wrapper::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.rota-container::-webkit-scrollbar-thumb,
.summary-table-wrapper::-webkit-scrollbar-thumb {
    background: #888;
}

.rota-container::-webkit-scrollbar-track,
.summary-table-wrapper::-webkit-scrollbar-track {
    background: #eee;
}
/* Adds a small red triangle to the top-right corner when an annotation is present */
.rota-cell.has-annotation {
    position: relative;
}

.rota-cell.has-annotation::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background-color: DeepPink;
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

/* 🔹 Highlights Working Hours */
/* 🔹 Highlight Rows Where Staff is Working */
/* 🟢 Highlight working hours */
.working-hours {
    background-color: rgba(0, 255, 0, 0.2) !important; /* ✅ Light green */
}



/*
	.custom-tooltip {
    position: absolute;
    background: black;
    color: white;
    padding: 5px;
    border-radius: 5px;
    font-size: 12px;
    white-space: pre-line;
    max-width: 200px;
	}
*/
/* Ensure the main content does not overlap with the sidebar */
.main-content {
    margin-right: 320px; /* Creates space for the sidebar */
    flex: 1;
}

/* 🎨 Dashboard Layout */
.dashboard {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 📋 Task Table (Main Content) */
.tasks-container {
    flex: 2;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.tasks-container h2 {
    background: #005bb5;
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

/* 📋 Task Table */
.task-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.task-table th, .task-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    width: auto !important; /* ✅ Ensures normal behavior */
    min-width: unset !important;
    max-width: unset !important;
}

}

.task-table th {
    background: #0073e6;
    color: white;
}

.task-table td img {
    width: 30px;
    height: 30px;
}
/* Override for task-table */
.task-table th:first-child, 
.task-table td:first-child {
    width: auto !important; /* ✅ Removes forced width */
    min-width: unset !important;
    max-width: unset !important;
}
.delete-user-entries {
    font-size: 12px;
    color: red;
    cursor: pointer;
    margin-left: 5px;
    display: inline-block;
}

.delete-user-entries:hover {
    color: darkred;
}
.delete-user-entries,
.undo-user-entries {
    font-size: 12px;
    cursor: pointer;
    margin-left: 5px;
    display: inline-block;
}

.delete-user-entries {
    color: red;
}

.delete-user-entries:hover {
    color: darkred;
}

.undo-user-entries {
    color: blue;
}

.undo-user-entries:hover {
    color: darkblue;
}
/* ✅ Make the dropdown button smaller and sticky */
.sticky-left {
    position: sticky;
    left: 10px; /* Adjust as needed */
    display: inline-block;
}

/* ✅ Make button smaller */
#taskFilterDropdown {
    width: auto; /* Prevent full-width */
    min-width: 100px; /* Small enough but clickable */
}

/* ✅ Keep dropdown from stretching */
.dropdown-menu {
    min-width: 150px;
    max-width: 200px;
}
/* ✅ Ensure rota cells maintain structure when icons are hidden */
.rota-cell {
    min-width: 50px; /* Prevents shrinking */
    height: 50px;
    text-align: center;
}

/* ✅ Prevent task icons from shifting position */
.task-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
}

/* ✅ Ensure hidden task icons don't affect layout */
.task-icon[style*="visibility: hidden"] {
    width: 40px;
    height: 40px;
}
.bg-gradient-primary {
    background: linear-gradient(90deg, #f05a28, #ffb84d) !important;
}
.btn-primary {
    background-color: #ffb84d !important; /* Your new background */
    border-color: #ff9900 !important; /* Change border color */
}

.btn-primary:hover {
    background-color: #ff9900 !important; /* Slightly darker on hover */
    border-color: #e68a00 !important;
}

.btn-primary:focus, 
.btn-primary:active {
    background-color: #ffb84d !important;
    border-color: #e68a00 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 184, 77, 0.5) !important; /* Soft glow effect */
}

.btn-primary:disabled {
    background-color: #ffcc80 !important;
    border-color: #ffcc80 !important;
    opacity: 0.6;
}
body {
	font-family: 'Montserrat', sans-serif;
	font-size: 16px;
	padding-top: 60px; /* Adjust based on header height */
}
.header {
	background: #007bff;
	color: white;
	padding: 15px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px; /* Set a fixed height */
	z-index: 1030; /* Ensures it's above other elements */
}
.header-title {
	font-size: 1.5rem;
}
.hamburger {
	font-size: 24px;
	background: none;
	border: none;
	color: white;
	cursor: pointer;
}
.sidebar-nav {
	width: 250px;
}
.sidebar-nav .nav-link {
	color: #fff;
	font-size: 1.1rem;
}
.sidebar-nav .nav-link:hover {
	background: rgba(255, 255, 255, 0.1);
}
p {
	
}
.sidebar-nav {
    width: 250px;
    height: 100vh; /* Full height */
    background: linear-gradient(180deg, #f0ad4e, #fa9200); /* Dark gradient */
}


.success-tick {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: #28a745; /* Bootstrap success green */
    font-weight: bold;
    opacity: 1;
    transition: opacity 1s ease-out;
    z-index: 9999;
}


/* Rotate chevron when menu is open */
.sidebar-nav .collapse.show + .nav-link .bi-chevron-down {
    transform: rotate(180deg);
}
.sidebar-nav {
    width: 280px; /* Adjust width if needed */
	color: #000;
}

.sidebar-nav .nav-link {
    font-size: 1.1rem; /* Increase font size */
    padding: 12px 16px; /* Add spacing */
    border-bottom: 1px solid rgba(255, 101, 101, 0.8);
	/* Subtle dividers */
}

.sidebar-nav .nav-item:last-child .nav-link {
    border-bottom: none; /* Remove border from last item */
}

.sidebar-nav .collapse .nav-link {
    font-size: 1rem; /* Keep dropdown items slightly smaller */
    padding-left: 24px; /* Indent dropdown items */
    border-bottom: none;/* Remove dividers for dropdown items */
	color: #000;
}

.sidebar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Light hover effect */
    border-radius: 6px; /* Slightly rounded corners on hover */
}

.sidebar-nav .offcanvas-header {
    padding: 16px; /* Increase padding for a more spacious header */
}

.sidebar-nav .bi-chevron-down {
    transition: transform 0.3s ease-in-out;
}

.sidebar-nav .nav-item .collapsed .bi-chevron-down {
    transform: rotate(-90deg); /* Rotate icon when collapsed */
}
.fade-out {
    opacity: 0;
}
.accordion-button {
	color: inherit; /* Keep same as surrounding text (e.g., .text-secondary on <h2>) */
}

.accordion-button:focus,
.accordion-button:not(.collapsed) {
	color: inherit; /* Prevent it turning blue */
	box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.5); /* warning colour */
	border-color: #ffc107;
}
tbody tr.dragging {
    background-color: #fff3cd;
    cursor: grab;
}
.sidebar .nav-link {
	color: var(--bs-warning) !important;
}
.sidebar .nav-link.active {
	background-color: var(--bs-warning);
	color: #000 !important;
	border-radius: 0.375rem;
}
.leave-cell {
    background-color: #c09081 !important;
    opacity: 0.6;
    pointer-events: none; /* Optional: Prevent clicks if you like */
}
.site-list .form-check:nth-child(odd) {
	background-color: #f8f9fa;
}

.site-list .form-check {
	padding: 0.5rem 1rem; /* Add space inside each row */
	margin: 0;
	border-radius: 0.375rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.site-list .form-check-input {
	margin: 0; /* Prevent Bootstrap's default spacing */
}

.site-list .form-check-label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	margin: 0;
}
.edit-sites-btn {
	display: inline-block !important;
}

/* Hide sidebar on small screens */
@media (max-width: 768px) {
    .sidebar {
        display: none;
	}
}

@media (max-width: 768px) {
	.rota-grid td:first-child, 
	.rota-grid th:first-child {
		min-width: 180px; /* ✅ Adjust this value as needed */
		max-width: 180px;
		width: 180px; /* ✅ Ensures consistency */
	}
	
	/* Responsive Design */
	@media (max-width: 768px) {
		.container {
			width: 100%;
			padding: 10px;
		}
	}
	:root {
		--navbar-height: 60px; /* Adjust if needed */
		--footer-height: 50px; /* Adjust if needed */
	}			