/* Ben's style overrides */

::-moz-selection {
    background: rgba(0, 0, 255, .2);
}

::selection {
    background: rgba(0, 0, 255, .2);
}


/* General */
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
	font-weight: 500; /* Was 600, that's too chunky */
}

a {
	color: #0365ce;
}

/* Notices */
.alert {
	border-radius: 4px;
	margin: 1rem 0;
}

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

/* Modals */
.modal-content {
	background-color: #ffa;
}

/* Forms */
label {
	margin-right: 2rem;
}

/* Sidebar Nav */
aside.sidebar {
	background-color: #ddd;
	width: 18rem;
}

/* -- add some side padding so that the active highlight bar doesn't go all the way across */
ul.navigation {
	padding-left: 1rem;
	padding-right: 1rem;
}

/* -- and reduce the padding on this to compensate */
.navigation__sub > ul > li > a {
	padding-left: 2.6rem;
	padding-right: 0;
}

/* -- make links not bold */
.navigation li a {
	font-weight: 400;
}

/* Adjust the vertical position of the icons relative to text, for top-level links only */
ul.navigation > li > a > i {
	position: relative;
	top: -1px;
}

/* -- make top level links larger, and apply same padding */
ul.navigation > li.navigation > a,
ul.navigation > li.navigation__active > a {
	font-size: 1.1rem;
}

/* -- make submenu headers larger. Don't highlight them when active. */
.navigation__sub > a {
	background-color: inherit !important;
	font-size: 1.1rem !important;
	font-weight: 400 !important;
}

/* -- get rid of the dot that marks active, and instead highlight */
.navigation__sub .navigation__active::before {
	display: none;
}
.navigation .navigation__active > a, 
.navigation .navigation__sub--active > a {
	background-color: rgba(255,255,255,0.5);
	border-radius: 8px;
}

/* -- we now use Bootstrap collapse instead of whatever weird system Gary used */
.navigation__sub:not(.navigation__sub--active) > ul.show,
.navigation__sub:not(.navigation__sub--active) > ul.collapsing {
	display: block;
}


/* Login */

.login {
	min-height: 80vh; /* Not 100, as that pushes the footer off the screen */
}

.login h1 {
	color: #ddd;
}
.login {
	color: #ccc;
	font-size: 1.2rem;
}
.login .form-control {
	color: white;
}
.login .form-control::placeholder {
	color: #ddd;
}
.login__error {
	margin-top: 2rem;
	color: #fffc5c;
}

.login .btn-theme {
	background-color: rgba(255, 255, 255, 0.15);
	color: #eee;
}
.login .btn-theme:not([disabled]):focus, .btn-theme:not([disabled]):hover {
	background-color: #eee;
	color: #495e68;
}

/* Standard Page Furniture */

/* Don't bother with a header going across the whole page, we have nothing to put in it */
.header {
	background: #aaa;
	background: linear-gradient(180deg, #aaa 0%, #ddd 100%);
	box-shadow: none;
	width: 18rem;
}

/* But on small screens, when the sidebar collapses, the header should go across. And position the sidebar popout below it */
@media (max-width: 1199.98px) {
	.header {
		width: 100%;
	}
	aside.sidebar {
		margin-top: 72px;
	}
}

.header--scrolled {
	background-color: transparent;
	box-shadow: none;
	z-index: -1;
}
.logo {
	padding-left: 0;
	min-width: 18rem;
	max-width: 18rem;
}
.logo a {
	font-size: 1.9rem;
	font-weight: 500;
	margin-left: 2rem;
}

@media (min-width: 1200px) {
	.content:not(.content--boxed):not(.content--full) {
		padding-top: 1.2rem;
		padding-left: 20rem;
	}
}

footer.content {
	padding-top: 10px !important;
	padding-bottom: 0 !important;
}

/* In DataTables, move the sorting arrows to the left so they're next to the label */
table.dataTable thead .sorting_asc, 
table.dataTable thead .sorting_desc, 
table.dataTable thead .sorting {
	background-position: center left;
}

/* Forms */
fieldset {
	border: 2px groove #eee;
	display: block;
	background-color: rgba(0, 0, 0, 0.04);
	border-radius: 4px;
	padding: 0.4rem 1.0rem;
	margin: 0.2rem 0.4rem;
}
fieldset legend {
	width: auto;
	font-size: 1.1rem;
	padding: 0.2rem 0.4rem;
	display: table;
	max-width: 100%;
	white-space: normal;
	box-sizing: border-box;
}
fieldset label {
	margin-right: 1.0rem;
}

.form-control {
	border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Standard page heading block - allows for appending buttons etc next to the title */
.cvm-backend-page-heading {
	display: flex;
	flex-direction: row;
}
.cvm-backend-page-heading > *:not(:first-child) {
	margin-left: 1rem;
}

.cvm-backend-page-heading h1 {
	margin-bottom: 2rem;
}


/* Generic bordered table */
.cvm-grid-table {
	border-collapse: collapse;
}
.cvm-grid-table th,
.cvm-grid-table td {
	border: 1px dotted #777;
	padding: 0.2rem 0.4rem;
}

/* Action icons in table rows */
.cvm-table-row-actions {
	text-align: right;
}
.cvm-table-row-actions i {
	padding: 0 5px;
}

/* Quote Screen */
/* -- Countdown to quote lock expiry */
.cvm-quote-lock-countdown-container {
	position: absolute;
	top: 0.8rem;
	right: 1.2rem;
	text-align: right;
}

/* -- override values are highlighted */
.cvm-override {
	color: #f44;
	background-color: #ff8;
	margin-left: 0.5rem;
	padding: 0.1rem 0.2rem;
}

.cvm-quote-override-inputs .col {
	flex-grow: 0;
}
.cvm-quote-override-inputs .input-group-text {
	padding: 0.5rem 1rem;
	background-color: rgba(0, 0, 0, 0.1);
	border: 1px solid #c4c4c4;
}


/* Quote Table: The monthly pricing table in the Quote Box page */
.cvm-quote-table {
	width: calc(100% + 20px);
	margin-left: -10px;
	margin-right: -10px;
}
/* -- workaround to allow the togglable tbody to change height and following content move up */
.cvm-quote-table tbody {
	display: block;
	overflow: hidden;
}
.cvm-quote-table thead,
.cvm-quote-table tr {
	display: table;
	width: 100%;
	table-layout: fixed;
	margin-top: 5px;
	margin-bottom: 5px;
}
/* ---- because table-layout: fixed is necessary to make the columns line up, the columns don't adjust to their content. So we manually tell it to give more room to the row headings. */
.cvm-quote-table th[scope="row"] {
	width: 40%;
}
/* ------ but we can't use expressions like max() or clamp() in the above, and 40% is a bit too much on the smallest screens, so... */
@media (max-width: 500px) {
	.cvm-quote-table th[scope="row"] {
		width: 30%;
	}
}
/* -- Row headings */
.cvm-quote-table th[scope="row"] {
	font-weight: normal;
	padding-bottom: 5px;
	line-height: 1.2; /* If text is wrapped, keep it closer so that the gap between rows is clearer */
	padding-left: 10px;
}

/* -- Column headings */
.cvm-quote-table tr.cvm-tax-years th {
	line-height: 1.2;
}

/* -- Accordion-type unfold on the second part of that table */
.cvm-quote-table-toggle {
	color: black !important;
	position: relative;
}
.cvm-quote-table-toggle::before,
.cvm-quote-table-toggle::after {
	content: "";
	height: 2px;
	width: 14px;
	position: absolute;
	left: 0;
	top: 50%;
	background-color: #44596b;
}
.cvm-quote-table-toggle::before {
	transform: rotate(90deg);
	transition: all 0.2s ease-in-out;
}
.cvm-quote-table-toggle.open::before {
	transform: rotate(0);
}
.cvm-quote-table-toggle > * {
	margin-left: 20px;
}
.cvm-quote-table-toggle a {
	color: #44596b;
}

.cvm-quote-table-foldout {
	transform-origin: top;
	transition: all 0.3s ease-in-out;
	max-height: 0;
}
.cvm-quote-table-foldout.open {
	max-height: 600px;
}

/* Loader spinner */
/* Loader animation - adapted from "Dual Ring" https://loading.io/css/ */
/* NB this is a different size and colour than the one on the driver site */
/* It fades in so that it doesn't flash on the screen if the table loads quickly */
.cvm-staff-loader {
  display: block;
  width: 100px;
  height: 100px;
  margin-left: auto;
  margin-right: auto;
  transition: opacity 2s linear;
}
.cvm-staff-loader:after {
  content: " ";
  display: block;
  width: 78px;
  height: 78px;
  margin: 8px;
  border-radius: 50%;
  border-width: 6px; 
  border-style: solid;
  border-color: #000c #0001 #000c #0001;
  animation: cvm-dual-ring 1.2s linear infinite;
}
@keyframes cvm-dual-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Ensure dropzones in Alphabet table are usable */
.alpha.dropzone {
	width: 50px;
	height: 50px;
	overflow: hidden; /* Avoids the dropzone from growing down into the next row when an image has been dropped */
	min-width: 50px;
	min-height: 50px;
	border-radius: 6px;
	background-color: rgba(0, 0, 0, 0.1);
	padding: 0;
}

.alpha.dropzone .dz-message {
	margin-top: 0;
	margin-bottom: 0;
}

.alpha.dropzone .dz-message span::before {
	margin-right: 0;
}

.alpha.dropzone .dz-message span {
	padding: 5px 0 0 0;

}

.alpha.dropzone .dz-preview {
	margin: 0;
	width: 50px;
	height: 50px;
	min-width: 50px;
	min-height: 50px;
}
.alpha.dropzone .dz-preview .dz-image {
	border-radius: 6px;
	width: 50px;
	height: 50px;
}

.alpha.dropzone .dz-details {
	display: none;
}

.alpha.dropzone .dz-preview .dz-remove {
	top: 0;
	right: 0;
	width: 18px;
	height: 18px;
}

.alpha.dropzone .dz-preview .dz-progress {
	height: 8px;
	width: 40px;
	margin-left: -20px;
}

.alpha.dropzone .dz-preview .dz-progress .dz-upload {
	background: linear-gradient(to bottom, #eee, #333);
}

.alpha.dropzone .dz-preview .dz-success-mark svg, 
.alpha.dropzone .dz-preview .dz-error-mark svg {
	width: 30px;
	height: 30px;
	margin-left: 12px;
	margin-top: 12px;
}
