/* The CSS for the default template theme */
* {
/*	color: var(--page-text); */
/*	font-family: Helvetica;	*/
	font-family: Arial, sans-serif;
	font-size: 1.25cqw;
}

.card {
	color: var(--page-text);
}

.form-label {
	color: var(--page-text);
}

h1 {
	color: var(--page-text);
}

h2 {
	color: var(--page-text);
}

.content {
	background: var(--page-colour);
}

.page-container {
	display: grid;
	grid-template-rows: auto 1fr auto;
	min-height: 100dvh;
	margin: 0;
}

.header-container {
	width: 100%;
	background: var(--header-colour);
	border-bottom: 1px solid var(--page-border);
	color: var(--header-text);
	position: sticky;
	top: 0;
	z-index: 1000;
}

/* Utility Bar */
.utility-bar {
	position: relative;
	z-index: 1050;
	background: var(--utility-colour);
	display: flex;
	justify-content: flex-end;
	padding: 5px 5%;
	font-size: 0.8rem;
}

.utility-bar a { 
	text-decoration: none; 
	color: var(--utility-text); 
	margin-left: 20px; 
}

.utility-bar .dropdown-menu {
	margin-top: 10px;
}


/* Navigation Base */
.nav-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 5%;
}
.nav-wrapper {
	flex: 3;
	display: flex;
	justify-content: center;
    overflow: hidden; /* Keeps large text from spilling out */
    align-items: center; /* Centers text vertically against the nav */
    min-height: 80px;    /* Adjust based on your design */
 }





.navbar-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    z-index: 0;          /* Sits behind the navbar */
    font-size: 4rem;     /* Make it big and bold */
    font-weight: 900;
    color: rgba(0, 0, 0, 0.05); /* Very faint so links remain readable */
    white-space: nowrap;
    pointer-events: none; /* Allows clicks to pass through to the menu */
    user-select: none;
    background: transparent;
    color: var(--page-border);
}

.navbar {
    position: relative;
    z-index: 1; /* Sits in front of the text */
    width: 100%;
    background: transparent !important; /* Ensure nav background doesn't hide the text */
    transform: translate(42%, 50%);
}




.logo {
	font-size: 1.5rem;
	font-weight: bold;
	line-height: 1.1;
	color: var(--logo);
	text-decoration: none;
	flex: 1; /* Helps with alignment */
	width: auto;
	min-height: 11vh;
/*	background-image: url('/assets/images/Wide Logo.svg'); */
/*	background-image: url('/assets/images/Logo-002a-Wide.svg'); */
	background-image: url('/assets/images/Logo-002-Helmet.svg');
	background-size: contain;
	background-repeat: no-repeat;
	padding: 0;
	border: none;
	margin: 0;
}

.btn-primary {
	--bs-btn-color: var(--quote-text);
	--bs-btn-bg: var(--quote-colour);
	--bs-btn-border-color: var(--quote-text);
	--bs-btn-hover-color: var(--page-colour);
	--bs-btn-hover-bg: var(--quote-colour);
	--bs-btn-hover-border-color: var(--quote-colour);
	--bs-btn-focus-shadow-rgb: color-mix(in srgb, var(--highlight), transparent 75%);
	--bs-btn-active-color: var(--highlight);
	--bs-btn-active-bg: var(--quote-colour);
	--bs-btn-active-border-color: var(--quote-colour);
	--bs-btn-active-shadow: inset 0 3px 5px color-mix(in srgb, var(--highlight), transparent 75%);
	--bs-btn-disabled-color: var(--page-colour);
	--bs-btn-disabled-bg: var(--page-colour);
	--bs-btn-disabled-border-color: var(--page-colour);
}

.cta-btn {
	background: var(--quote-colour);
	color: var(--quote-text);
	padding: 10px 20px;
	border-radius: 5px;
	font-weight: bold;
	text-decoration: none;
}

.content-area {
	background: var(--page-colour);
	color: var(--page-text);
}

.footer-container {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 15px;
	background: var(--footer-colour);
	border-top: 1px solid var(--page-border);
	color: var(--footer-text);
}

.footer-col-1 {
	text-align: left;
}

.footer-col-2 {
	text-align: center;
	line-height: 1.1;
	color: #c9a865;
	font-family: Helvetica;
	font-weight: bold;
	font-size: 1.6em;
}

.footer-col-3 {
	text-align: right;
}

.form-control:focus {
	border-color: var(--highlight);
	box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--highlight), transparent 75%);
	outline: 0;
}

.form-check-input:focus {
	border-color: var(--highlight);
	box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--highlight), transparent 75%);
	outline: 0;
 }


.profile-image-dropdown {
	width: 60px; 
	height: 60px; 
	object-fit: cover; 
	border: 2px solid var(--page-border); 
	box-shadow: 0 2px 4px color-mix(in srgb, var(--highlight), transparent 75%);
}

.loader {
	border: 8px solid var(--light-gray);
	border-top: 8px solid var(--citb-blue);
	border-radius: 50%;
	width: 60px;
	height: 60px;
	animation: spin 1s linear infinite;
	margin-bottom: 20px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

@keyframes disappear {
  0% { 
  	opacity: 1; 
  	transform: translateY(0); 
  	max-height: 200px; /* Set to something larger than the alert */
  	margin-bottom: 0.1cqw;
  	padding-top: 0.25cqw;
  	padding-bottom: 0.25cqw;
  }
  90% { 
  	opacity: 1; 
  	transform: translateY(0); 
  	max-height: 200px;
  	margin-bottom: 0.1cqw;
  	padding-top: 0.1cqw;
  	padding-bottom: 0.1cqw;
  }
  100% { 
    opacity: 0; 
    transform: translateY(-10px); 
    max-height: 0; 
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    visibility: hidden;
    pointer-events: none; /* Prevents clicking on the invisible element */
  }
}

.alert {
  /* Change 5s to however long you want it to stay */
  animation: disappear 5s ease-in forwards; 
  overflow: hidden;
  transition: all 0.5s ease;
}

/* Keep traffic light colours even when active */
.nav-pills .nav-link.active.bg-danger { background-color: #dc3545 !important; }
.nav-pills .nav-link.active.bg-warning { background-color: #ffc107 !important; color: #000 !important; }
.nav-pills .nav-link.active.bg-success { background-color: #198754 !important; }

/* Dim all subtab pills by default */
.nav-pills .nav-link {
	opacity: 0.6;
	transition: opacity 0.2s ease-in-out;
}

/* Bring the active pill to full brightness */
.nav-pills .nav-link.active {
	opacity: 1 !important;
}

/* Optional: Slight brighten on hover for better UX */
.nav-pills .nav-link:hover {
	opacity: 0.85;
}

.bs-product {
	width: 23%; 
	display: flex; 
	flex-direction: column;
	box-shadow: 0 2px 4px color-mix(in srgb, var(--highlight), transparent 75%);
}


/* Force override for the actual header cells */
#specialityTable thead .table-dark th {
    color: #ffffff !important;
}

/* Fix for sorting icons appearing dark on dark background */
#specialityTable thead .dt-column-order:before,
#specialityTable thead .dt-column-order:after {
    filter: invert(1) brightness(2); /* Makes icons white */
}


/* --- Permissions Matrix Styling --- */
.clickable-cell {
    cursor: pointer;
    height: 50px;
    transition: background-color 0.2s;
    padding: 0 !important;
    position: relative;
}

.clickable-cell label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0.75rem; /* Match standard table padding */
    margin: 0;
    cursor: pointer;
}

    /* Hide the actual checkbox */
.cell-check {
    display: none;
}

/* Show the tick only when checked */
.tick-icon {
    display: none;
    font-weight: bold;
    color: #198754; /* Bootstrap success green */
    font-size: 1.2rem;
}

.cell-check:checked ~ .tick-icon {
    display: inline-block;
}

/* Optional: change background on hover */
.clickable-cell:hover {
    background-color: #f8f9fa;
}

.btn-outline-contrast {
    color: var(--page-text);
    border-color: var(--page-text);
    background-color: transparent;
}
.btn-outline-contrast:hover {
    background-color: var(--page-text);
    color: var(--page-colour); /* Inverts on hover */
}

.table-contrast th {
    background-color: var(--table-header-bg) !important;
    color: var(--table-header-text) !important;
    border-bottom: 2px solid var(--page-border);
    vertical-align: middle;
}

/* Ensure sorting icons (DataTables) follow the text colour */
.table-contrast .dt-column-order:before,
.table-contrast .dt-column-order:after {
    filter: var(--table-header-text) == #ffffff ? invert(0) : invert(1);
    /* Simple fix: just make them match the text brightness */
    opacity: 0.8;
}

/* --- MOBILE STYLING --- */
@media (max-width: 992px) {
	.nav-wrapper {
		display: none; 
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		background: var(--menu-colour);
		flex-direction: column;
		border-top: 1px solid var(--menu-border);
/*		box-shadow: 0 10px 10px rgba(0,0,0,0.1); */
		box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--highlight), transparent 75%);
		outline: none;
		z-index: 1001;
	}
	
	.nav-main {
		position: relative;
	}

	/* Show menu when Bootstrap adds 'show' class or your custom 'active' class */
	.nav-wrapper.show, .nav-wrapper.active { 
		display: flex; 
	}

	.nav-actions {
		flex: 1;
		display: flex;
		justify-content: center;
	}

	.cta-btn {
		margin: 0 auto;
		font-size: 0.85rem;
		padding: 8px 12px;
	}

	.navbar-toggler { 
		display: block !important; 
		padding: 4px 8px;
		border: 1px solid var(--header-colour);
	}

	.custom-hamburger span {
		display: block;
		width: 5vw;
		height: 3px;
		margin: 2px 0 2px 0;
		border-radius: 2px;
		transition: all 0.3s ease-in-out;
		background: var(--header-text);
	}

	.navbar-toggler:focus {
		box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--highlight), transparent 75%);
		outline: none;
	}

	.footer-container {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.footer-col-1, .footer-col-2, .footer-col-3 {
		text-align: center;
	}
}