body {
	background-color: #125;
	font-family: monospace, monospace;
	margin: 0;
}

button {
  background: #346;
  border-radius: 3px;
  color: #FFF;
  cursor: pointer;
  font-family: monospace, monospace;
  padding: 6px 16px;
	
	&:not(:hover):not(.highlighted) {
		background: transparent;
		border-color: transparent;
	};
}

.hidden {
	display: none !important;
}

/* BUTTON PANEL */
#button-panel {
	box-sizing: border-box;
	cursor: default;
	left: 0;
	line-height: 0;
	padding: 16px;
	pointer-events: none;
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 1;
	
	img {
		cursor: pointer;
		pointer-events: all;
		transition: transform 0.3s ease-out;
		
		&.right {
	    background: radial-gradient(#125, transparent);
	    border-radius: 50%;
			float: right;
		}
		
		&.rotate:hover {
			transform: rotate(90deg);
		}
	}
}

/* MAIN PANEL */
#main-panel {
	height: 100vh;
	overflow: hidden;
	position: relative;
	
	/* Switchable panels */
	> div {
		height: 100%;
		position: absolute;
		transition: left 0.3s;
		top: 0;
		width: 100%;
		
		&.opened {
			left: 0 !important;
		}
	}
	
	/* Digital sections */
	.digital-section {
		.digits {
			font-family: 'segment7', sans-serif;
		}
		
		&.dils {
			position: relative;
			
			> .digits {
				font-size: 2000%;
			}
			
			> .text {
				font-size: 400%;
				margin: -0.4em 0 0.6em;
			}
		}
		
		&.werses {
			display: inline-block;
			margin-right: 1em;
			opacity: 0.6;
			
			> .digits {
				font-size: 1000%;
			}
			
			> .text {
				font-size: 200%;
			}
		}
		
		&.blicks {
			display: inline-block;
			opacity: 0.36;
			
			> .digits {
				font-size: 500%;
			}
			
			> .text {
				font-size: 100%;
			}
		}
	}
	
	/* Minor sections wrapper */
	.minor-sections-wrapper {
		position: relative;
		
		&::before {
			background-color: #FFF;
			border-radius: 50%;
			content: '';
			display: block;
			height: 0.4em;
			margin-bottom: 3em;
			opacity: 0.6;
			width: 100%;
		}
	}

	/* Show description button */
	> button {
	  bottom: 16px;
		left: calc(50% - 70px);
		position: absolute;
		width: 140px;
	}
}

/* CLOCK PANEL */
#clock-panel {
	align-items: center;
	display: flex;
	justify-content: center;
	left: -100%;
	
	/* Digital clock */
	#digital-clock {
		color: #FFF;
		font-size: 10px;
		text-align: center;
	}

	/* Analog clock */
	#analog-clock {
		height: 400px;
		margin-left: 100px;
		position: relative;
		width: 400px;
	
		canvas {
			left: 0;
			position: absolute;
			top: 0;
		}
	}
	
	#digital-clock.hidden + #analog-clock {
		margin-left: 0 !important;
	}
}

/* TIMER PANEL */
#timer-panel {
	align-items: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	left: 100%;
	
	/* Digital timer */
	#digital-timer {
		color: #FFF;
		font-size: 10px;
		margin-bottom: 5em;
		text-align: center;
	}
	
	.timer-buttons {
		position: relative;
		
		> button {
			width: 100px;
		}
	}
}

/* DESCRIPTION PANEL */
#description-panel {
	color: #FFF;
	line-height: 1.5;
	padding: 0 20px;
	
	header, footer {
		background: rgba(255, 255, 255, 0.1);
		margin: 0 -20px;
	}
	
	b {
		font-family: 'Courier New', monospace;
		letter-spacing: -1px;
	}
	
	/* Info header */
	header {
		border-bottom: 0.5px dashed #FFF;
		border-top: 1px solid #FFF;
		padding: 0 20px;

		h1, h2 {
			margin: 0;
			padding-top: 20px;
			text-align: center;
		}
	
		h1 {
			letter-spacing: 2px;
		}
	
		h2 {
			opacity: 0.8;
		}
	
		.explanation {
			opacity: 0.4;
			padding-bottom: 4px;
			text-align: center;
		}
		
		&:not(:first-child) {
			margin-top: 100px;
		}
	}
	
	/* Info footer */
	footer {
		border-top: 0.5px dashed #FFF;
		display: flex;
		justify-content: center;
		margin-top: 100px;
		padding: 16px 20px;
		position: relative;
		text-align: center;
		
		> a {
			color: white;
			cursor: pointer;
			opacity: 0.6;
			padding: 6px 16px;
			position: absolute;
			text-decoration: none;
			top: -40px;
			transition: filter 0.3s, opacity 0.3s;
			
			#contact-copied {
				color: #0F0;
				display: inline-block;
        font-size: 0.8em;
        left: 100%;
				position: absolute;
        text-transform: uppercase;
        top: 8px;
			}
			
			&:hover {
				filter: drop-shadow(0 0 6px #FFF);
				opacity: 1;
			};
		}
	}
	
	/* Info section */
	.info-section {
		color: #FFF;
		display: flex;
		justify-content: space-around;
		opacity: 0.6;
		
		p {
			max-width: 800px;
		}

		b {
			font-size: 200%;
			padding-right: 6px;
		}
		
		.base-day-1, .base-dil-1, .base-wers-1, .base-blick-1 {
			display: inline-block;
			min-width: 80px;
		}
		
		.graphic-clock-face {
			background: rgba(0, 255, 0, 0.3);
			border-radius: 50%;
		}
		
		.animated {
			cursor: pointer;
			transition: filter 0.3s;
			
			.shrink, .grow {
				display: inline-block;
				line-height: 1.2;
				overflow: hidden;
				transition: font-size 0.3s;
				vertical-align: text-bottom;
			}
			
			.grow {
				font-size: 0;
			}
			
			&:hover {
				.shrink {
					font-size: 0;
				}
				
				.grow {
					font-size: inherit;
				}
				
				&.good {
					filter: drop-shadow(0 0 6px #0F0);
				}
				
				&.bad {
					filter: drop-shadow(0 0 6px #F00);
				}
			}
		}
		
		&.plain-text {
			padding: 30px 0;
		
			i {
				display: inline-block;
				min-width: 320px;
			}	
		}
		
		&.with-main-columns > div {
			font-size: 1.5em;
			line-height: 1;
		}
	
		&.with-columns {
			justify-content: space-between;
			
			div {
				width: 48%;
				text-align: center;
			}
		}
	
		&.with-border {
			border-bottom: 0.5px dashed #FFF;
			margin-top: 30px;
			padding-bottom: 30px;
		}
	}
}

/* SETTINGS PANEL */
#settings-panel {
  background: #346;
	box-sizing: border-box;
	color: #FFF;
	height: 100%;
	line-height: 16px;
	padding: 16px 20px;
	position: fixed;
	right: -320px;
	top: 0;
	transition: right 0.3s ease-out;
	width: 320px;
	
	/* Flag panel */
	#flag-panel {
		cursor: default;
		opacity: 0;
		transition: opacity 0.2s;
		
		img {
			cursor: pointer;
			filter: saturate(0.1);
			transition: filter 0.3s ease-out;
	
			&:hover, &.selected {
				filter: saturate(1);
			};
	
			&.selected {
				cursor: default;
				pointer-events: none;
			};
		}
	}
	
	/* Tab panel */
	#tab-panel {
		cursor: default;
		margin-top: 1em;
		
		button {
			border: 1px solid #FFF;
			opacity: 0.6;
			transition: background 0.3s, border 0.3s, opacity 0.3s;
			
			&:hover {
				opacity: 1;
			}
		
			&.opened {
				background: #FFF;
				color: #346;
				opacity: 1;
				pointer-events: none;
			}
		}
	}
	
	/* Tab settings panel */
	#tab-settings-panel {
		height: calc(100% - 90px);
		overflow: hidden;
		position: relative;
	
		/* Switchable panels */
		> div {
			position: absolute;
			transition: left 0.3s;
			top: 0;
			width: 100%;
			
			&:first-of-type {
				left: -100%;
			}
			
			&:last-of-type {
				left: 100%;
			}
	
			&.opened {
				left: 0 !important;
			}
		}
		
		/* Settings with checkboxes */
		p {
			display: flex;
			opacity: 0.8;
		
			&.header {
				border-bottom: 0.5px dashed #FFF;
				border-top: 1px solid #FFF;
				opacity: 1;
				font-weight: bold;
				padding: 1em 0;
				text-transform: uppercase;
			}
			
			&:first-of-type:not(.header) {
				border-top: 1px solid #FFF;
				padding-top: 1em;
			}
		
			input {
		    height: 16px;
				margin: 0 16px 0 0;
		    width: 16px;
			}
		}
	}
	
	/* Opened panel */
	&.opened {
		right: 0;
		
		#flag-panel {
			opacity: 1;
		}
	}
}

/* MOBILE BROWSERS */
@supports (height: 100dvh) {
  #main-panel {
    height: 100dvh !important;
  }
}

/* SCREENS < 1200px */
@media screen and (max-width: 1200px) {
	#description-panel {
		.result {
			display: block;
		}
	}
}

/* SCREENS < 1024px */
@media screen and (max-width: 1024px) {
	#clock-panel #analog-clock {
		margin-left: 20px;
	}
	
	#description-panel {
		.info-section.with-main-columns > div {
			font-size: 1em;
		}
		
		.day-procent {
			display: block;
		}
	}
}

/* SCREENS < 768px */
@media screen and (max-width: 768px) {
	
	/* Clock panel */
	#clock-panel {
		flex-direction: column;
		justify-content: center;
		
		#digital-clock {
			font-size: 8px;
			line-height: 1;
		}
	
		#analog-clock {
			margin-left: 0;
			transform: scale(0.8);
		}
	}
	
	/* Timer panel */
	#timer-panel {
		#digital-timer {
			font-size: 8px;
			line-height: 1;
		}
	}
	
	/* Description panel */
	#description-panel {		
		.info-section.plain-text {
			border-top: 0.5px dashed #FFF;
			padding: 0 !important;
		}
		
		header + .info-section.plain-text {
			border-top: none !important;
		}
		
		.info-section.with-columns, .info-section.with-main-columns {
			flex-direction: column;
			
			> div {
				border-top: 0.5px dashed #FFF;
				width: 100% !important;
			}
		}
		
		.info-section.with-border {
			border-bottom: none !important;
			margin-top: 0 !important;
			padding-bottom: 0 !important;
		}
		
		.result, .day-procent {
			display: inline !important;
		}
	}
}

/* SCREENS < 600px */
@media screen and (max-width: 600px) {
	#description-panel {		
		.info-section.plain-text i {
			font-weight: 600;
      margin-right: 10px;
			min-width: unset;
		}
		
		.result {
			display: block !important;
		}
		
		footer > a {
			top: -60px;
			
			i {
				display: block !important;
			}
		}
	}
}

/* SCREENS < 480px */
@media screen and (max-width: 480px) {
	body {
		font-size: 0.8em;
	}
}
