﻿:root, html {
    /* Fonts */
    --default-font: 'Calibri';
    --code-font: 'Lucida Console', 'Courier New';

	--gradient-start: #2196F3;
	--gradient-end: #673AB7;

	/* Color definitions */
	--wild-sand: #f4f4f4;
	--silver: #dadada;
	--waterloo: rgba(140, 140, 162, 0.25);

	/* Usages */
	--background: var(--wild-sand);
	--tag-background: var(--waterloo);

	--background-gradient-start: var(--wild-sand);
	--background-gradient-end: var(--silver);

    /* Override some Bootstrap defaults */
    --bs-body-font-weight: 300;
    --bs-nav-link-font-weight: 300;
}

html {
    height: 100%;
}

html:focus-within {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-image: linear-gradient(to bottom, var(--background-gradient-start) 20%, var(--background-gradient-end));
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: var(--default-font), sans-serif !important;
    min-height: 100vh;
    text-rendering: optimizeSpeed;
}

a {
    transition: 0.3s ease-in-out !important;
    font-weight: 500;
}

.disabled a {
    font-weight: 400;
}

h1 {
    word-wrap: break-word;
}

blockquote {
    padding-left: 0.5em;
}

blockquote::before {
    content: open-quote;
    vertical-align: -0.4em;
    line-height: 0.1em;
    font-size: 2.5em;
}

blockquote::after {
    content: close-quote;
    vertical-align: -0.4em;
    line-height: 0.1em;
    font-size: 2.5em;
}

blockquote p {
    display: inline;
}

section {
    padding-bottom: 10px;
}

code {
    font-family: var(--code-font), cursive;
}

.date:before {
    font-family: 'icons';
    font-weight: 900;
    content: "\e953";
}

.theme-toggle:before {
	font-family: 'icons';
	font-weight: 900;
	content: "\e9d5";
}

.read-time:before {
	font-family: 'icons';
	font-weight: 900;
	content: "\e94f";
}

.copy-btn {
	border-color: whitesmoke !important;
}

.copy-btn:active {
	animation: copy-flash 0.5s ease-out;
}

@keyframes copy-flash {
	50% {
		border-color: whitesmoke !important;
		background: whitesmoke;
	}
}

.stroked {
	position: relative;
	z-index: 0;
}

.stroked::before {
	content: "";
	position: absolute;
	top: 90%;
	right: 0;
	height: 160px;
	bottom: 0;
	left: 0;
	width: 100vw;
	/*margin-left:  calc(-50vw + 50%);*/
	background: linear-gradient(82deg,var(--gradient-start) 0%, var(--gradient-end) 100%);
	box-sizing: border-box;
	z-index: -1;
	transform: skewY(-7deg);
}

.stroked-odd {
	position: relative;
	z-index: 0;
}

.stroked-odd::before {
	content: "";
	position: absolute;
	top: 90%;
	right: 0;
	height: 160px;
	bottom: 0;
	left: 0;
	width: 100vw;
	background: linear-gradient(82deg,var(--gradient-start) 0%,var(--gradient-end) 100%);
	box-sizing: border-box;
	z-index: -1;
	transform: skewY(7deg);
}

/* Template defined css */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* Fixes white background/white icon for markdown editors */
.editor-toolbar {
	background: rgb(36, 90, 170) !important;
}

.editor-toolbar button.active, .editor-toolbar button:hover {
    background: rgb(36, 90, 170) !important;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/*region Skilltable.razor */
.table-container {
	overflow-x: auto;
}

.skill-table {
	margin-top: 20px;
	width: 100%;
}

.skill-table td:first-of-type {
	width:10%;
}

.skill-table td {
	width: 30%;
	border-top: 1px var(--bs-light) solid;
	vertical-align: top;
	min-width: 100px;
}

.skill-table td div {
	display: inline-block;
	margin-right: 8px;
	margin-top: 12px;
	margin-bottom: 12px;
}
/*endregion */

/*#region IntroductionCard.razor */
.introduction-background {
	background-repeat: no-repeat;
	background-size: cover;
}

.introduction-container {
	height: 438px;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
	grid-template-rows: 0.5fr 1fr 1fr 1fr;
	gap: 10px;
	grid-template-areas:
    ". . . . ."
    ". . profile-picture . ."
    ". profile-text profile-text profile-text ."
    ". profile-text profile-text profile-text .";
}

.profile-picture {
	grid-area: profile-picture;
	width: 175px;
	height: 175px;
	border-radius: 50%;
	border: white;
	margin: auto;
	box-shadow: 0 0 0 4px white;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
}

.profile-text {
	margin: auto;
	grid-area: profile-text;
	font-size: clamp(1.0rem, 0.6479rem + 1vw, 1.4rem);
	line-height: clamp(1.5em, 0.6479rem + 1.1268vw, 2.25em);
	text-align: center;
}
/*#endregion */

/*region NavMenu.razor */
.barcode {
	text-decoration: none;
	font-weight: 400;
	font-size: 2.5rem;
}

::deep .navbar-nav li {
	padding-left: 1rem;
	white-space: nowrap;
}
/*endregion */

/*region Profile.razor */
.profile-card {
	display: inline-block;
	box-shadow: 0 3px 7px -1px rgba(0, 0, 0, 0.1);
	width: 100%;
	border-radius: 8px;
}

.profile-name {
	padding: 20px;
	font-size: 1.25em;
	line-height: 1.5em;
}

.profile-name:first-child {
	background: var(--tag-background);
}

.profile-image {
	padding: 30px;
	background: var(--tag-background);
}

.profile-image img {
	width: 100%;
	margin: auto;
	border-radius: 50vw;
	display: block;
}

.profile-keypoints {
	background-color: var(--tag-background);
	padding-top: 10px;
	padding-left: 2.5em;
	padding-right: 1.5em;
	list-style: none;
	margin-bottom: 0;
}

.profile-keypoints li {
	padding-bottom: 0.6em;
	letter-spacing: 0.05em;
	display: flex;
}

/* As the MarkupComponent is a base class we have to use deep */
::deep .profile-keypoints li p {
	display: inline;
}

.item-draggable {
	cursor: grab;
}
/*#endregion */

/*region TabbedNavigation.razor */
.nav>.nav-item>button {
	border: 0;
	background: transparent !important;
	color: var(--bs-body-color) !important;
}
/*#endregion */

/*#region ShortBlogPost.razor */
.blog-card {
	display: flex;
	flex-direction: column;
	box-shadow: 0 3px 7px -1px rgba(0, 0, 0, 0.1);
	margin: 1rem auto 1.6%;
	line-height: 1.4;
	border-radius: 5px;
	overflow: hidden;
	z-index: 0;
	transform: scale(1.0);
	transition: transform 0.35s;
	content-visibility: auto;
	contain-intrinsic-size: 300px;
}

.blog-card:hover {
	transform: scale(1.05);
	transition: 1s ease;
	box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}

.blog-card a {
	color: inherit;
}

.blog-card .meta {
	position: relative;
	z-index: 0;
	height: 200px;
}

.blog-card .details,
.blog-card .details ul {
	margin: auto;
	padding: 0;
	list-style: none;
}

.blog-card .details {
	position: absolute;
	top: 0;
	bottom: 0;
	left: -100%;
	margin: auto;
	transition: left 0.5s;
	background: rgba(0, 0, 0, 0.6);
	color: var(--bs-white);
	padding: 10px;
	width: 100%;
	font-size: 0.9rem;
}

.blog-card .details a {
	-webkit-text-decoration: dotted underline;
	text-decoration: dotted underline;
}

.blog-card .details ul li {
	display: inline-block;
}

.blog-card .details li:before {
	margin-right: 10px;
}

.blog-card .details li ul:before {
	margin-right: 10px;
}

.blog-card .details .tags li {
	margin-right: 2px;
}

.blog-card .details .tags ul:before {
	font-family: 'icons';
	font-weight: 900;
	content: "\e936";
}

.blog-card .description {
	padding: 1rem;
	background: var(--background);
	position: relative;
	z-index: 1;
}

.blog-card .description .header {
	display: flex;
	justify-content: space-between;
}

.blog-card .description .read-more {
	text-align: right;
}

.blog-card .description .read-more a {
	display: inline-block;
	position: relative;
}

.blog-card .description .read-more a:before {
	font-family: 'icons';
	content: '\ea42';
	display: inline-block;
	font-weight: 900;
	text-decoration: none;
	margin-right: -5px;
	opacity: 0;
	transition: margin 0.3s, opacity 0.3s;
	vertical-align: bottom;
}

.blog-card .description .read-more a:hover:before {
	margin-right: 8px;
	opacity: 1;
	display: inline-block;
}

.blog-card p {
	position: relative;
	margin: 1rem 0 0;
}

.blog-card p:first-of-type {
	margin-top: 1.25rem;
}

.blog-card p:first-of-type:before {
	content: "";
	position: absolute;
	height: 5px;
	width: 35px;
	top: -0.75rem;
	border-radius: 3px;
}

.blog-card:hover .details {
	left: 0;
}

.goto-tag {
	color: white !important;
}

.goto-tag:hover {
	color: #D7D7D7 !important;
}

@media (min-width: 640px) {
	.blog-card {
		flex-direction: row;
		max-width: 1200px;
	}
	.blog-card .meta {
		flex-basis: 30%;
		height: auto;
	}
	.blog-card .description {
		flex-basis: 70%;
	}
	.blog-card .description:before {
		transform: skewX(-3deg);
		content: "";
		background: var(--background);
		width: 30px;
		position: absolute;
		left: -10px;
		top: 0;
		bottom: 0;
		z-index: -1;
	}
	.blog-card.alt {
		flex-direction: row-reverse;
	}
	.blog-card.alt .description:before {
		left: inherit;
		right: -10px;
		transform: skew(3deg);
	}
	.blog-card.alt .details {
		padding-left: 25px;
	}
}

.schedule {
	background-color: #28a745;
}

.draft {
	background-color: #ff8700;
}
/*#endregion */

/*region SearchInput.razor */
.search-bar {
	border: 2px solid;
	display: flex;
	border-radius: 100vh;
	overflow: hidden;
	height: 40px;
	padding: 3px;
	width: 40px;
	position: relative;
	transition: width 300ms ease-in-out;
}

.search-bar-input {
	flex-grow: 1;
	padding: 0 .5em;
	border: 0;
	opacity: 0;
	background: transparent;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	cursor: pointer;
	font-weight: 400;
	color: var(--bs-navbar-color);
}

.search-bar-input:focus {
	outline: 0;
}
.search-bar-button {
	border: 0;
	border-radius: 100vh;
	margin-left: auto;
	width: 30px;
	height: 30px;
	cursor: pointer;
	background: transparent;
	/*
		TODO: That is really ugly
		The problem is that every other button is behind nav-
	 */
	color: var(--bs-navbar-color);
}

.search-bar:focus-within {
	width: 170px;
}

.search-bar:focus-within .search-bar-input {
	cursor: initial;
	opacity: 1;
	z-index: initial;
	max-width: 130px;
}
/*#endregion */

/*#region ReadingIndicator.razor */
.progress-container {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 1000;
	opacity: 0;
	transition: opacity 1.5s;
}

.progress-container.visible {
	opacity: 1;
}

@keyframes fadeOut {
	to {
		opacity: 0;
	}
}

.progress-circle {
	width: 50px;
	height: 50px;
}

.progress-bg {
	fill: none;
	stroke: #f3f3f3;
	stroke-width: 4;
}

.progress-bar {
	fill: none;
	stroke: #4caf50;
	stroke-width: 4;
	stroke-linecap: round;
	transform-origin: center;
	transform: rotate(-90deg);
	stroke-dasharray: 100, 100;
	stroke-dashoffset: 100;
}

[data-bs-theme='light'] .progress-bg {
	stroke: #444444;
}
/*#endregion */

/*region ShowBlogPostPage.razor */
.blog-container {
	background: var(--background);
	width: clamp(60%, 2vw, 90%);
	box-shadow: 0 3px 7px -1px rgba(0, 0, 0, 0.1);
	border-radius: 5px;
	padding: 20px;
}

.blogpost-tag:before {
	font-family: 'icons';
	font-weight: 900;
	content: "\e936";
}

.blogpost-content {
	padding-top: 20px;
	overflow-x: hidden;
}

.blogpost-content img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media only screen and (max-width: 700px) {
	.blog-outer-box .blog-container {
		width: 90%;
	}
}

@media only screen and (min-width: 700px) and (max-width: 1024px) {
	.blog-outer-box .blog-container {
		width: 80%;
	}
}
/*#endregion */

/*region ShortCodeDialog.razor */
.markdown-scrollable {
	overflow: auto;
	max-height: 100%;
}
/*#endregion */
