@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');

@import url('./styles/reset.css');
@import url('./styles/variables.css');

* {
	-webkit-tap-highlight-color: transparent;
}

body {
	background-color: var(--gom-color-background-primary);
	color: var(--gom-color-text-primary);
	font-family: var(--gom-font-family);
	font-style: normal;
	overflow-y: auto;
	display: flex;

	@media (max-width: 768px) {
		flex-direction: column;
	}
}

p {
	line-height: 24px;
}

input[type='radio'] {
	accent-color: var(--gom-color-accent);
}

input[type='checkbox'] {
	appearance: none;
	-webkit-appearance: none;
	width: 28px;
	height: 14px;
	background-color: #858585;
	border-radius: 50px;
	position: relative;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

input[type='checkbox']::before {
	content: '';
	position: absolute;
	width: 10px;
	height: 10px;
	background-color: #3b3b3b;
	border-radius: 50%;
	top: 2px;
	left: 2px;
	transition: transform 0.3s ease;
}

input[type='checkbox']:checked {
	background-color: var(--gom-color-accent);
}

input[type='checkbox']:checked::before {
	transform: translateX(14px);
}

h1 {
	font-size: 1.7rem;
	margin-bottom: 20px;
	color: var(--gom-color-title);
}

a {
	color: var(--gom-color-accent);

	&:hover {
		color: #e8ffa8;
	}
}

h2 {
	font-size: 1.4rem;
	color: var(--gom-color-title);
	margin-top: 20px;
	margin-bottom: 10px;
	position: relative;

	&::after {
		content: '';
		position: absolute;
		left: 0;
		bottom: -0.7rem;
		width: 100%;
		height: 1px;
		background-color: var(--gom-color-highlight);
	}
}

.container {
	display: flex;
	width: 100%;

	@media (min-width: 768px) {
		height: 100vh;
		overflow-y: auto;
	}
}

#content {
	width: 100%;

	> div {
		max-width: 960px;
		padding: 2rem;
		margin: 0 auto;
		box-sizing: border-box;

		@media (max-width: 768px) {
			padding: 7rem 1rem 2rem 1rem;

			&.not-found-container {
				padding: 0 1rem;
			}
		}
	}
}

.not-found-container {
	display: flex;
	height: 100%;
	flex-direction: column;
	justify-content: space-evenly;
	align-items: center;
	text-align: center;

	.main-container {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		gap: 2rem;

		@media (max-width: 768px) {
			height: 100vh;
		}
	}

	.logo-container {
		position: absolute;
		top: 30px;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0.5rem;

		h1 {
			font-size: 20px;
			font-weight: bold;
			letter-spacing: 1px;
		}
	}

	h1 {
		margin: 0;
	}

	p {
		color: var(--gom-color-text-secondary);
	}

	.code-container {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;

		span {
			font-size: 40px !important;
			font-weight: bold;
			color: #efefef;
		}
	}

	ion-icon {
		font-size: 40px;
		--gom-ionicon-stroke-width: 45px;
		color: #efefef;
	}

	.title-container {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 0.7rem;
		margin-bottom: 1rem;
	}
}

#sidebar {
	.header-top {
		display: none;
		width: 100%;
		position: fixed;
		top: 0;
		z-index: 1000;

		transition: transform 0.3s ease, opacity 0.3s ease;

		@media (max-width: 768px) {
			opacity: 1;
			display: flex;
		}

		.content {
			background-color: var(--gom-color-background-secondary);
			padding: 1.4rem 1rem;
			flex-direction: row;
			gap: 1rem;
			justify-content: space-between;
			align-items: center;
			display: flex;
			width: 100%;
			border-bottom: 1px solid var(--gom-color-highlight);

			.logo-container {
				display: flex;
				flex-direction: row;
				gap: 0.7rem;
				align-items: center;

				> div {
					display: flex;
					flex-direction: column;
				}

				h1 {
					font-size: 17px;
					font-weight: bold;
					letter-spacing: 1px;
					margin: 0;
				}

				span {
					color: var(--gom-color-text-secondary);
					font-size: 14px;
					white-space: nowrap;
				}
			}

			.buttons-container {
				display: flex;
				flex-direction: row;
				gap: 1rem;
				align-items: center;
			}

			ion-icon {
				font-size: 20px;
			}

			#toggle-sidebar {
				ion-icon {
					font-size: 24px;
				}
			}

			button {
				border: 0;
				background: none;
				margin-top: 5px;
				cursor: pointer;
			}

			a {
				border: 1px solid;
				border-color: var(--gom-color-highlight);
				padding: 0.4rem;
				display: flex;
				align-items: center;
				background: none;
				border-radius: 12px;
				cursor: pointer;
				color: white;

				&:hover {
					background-color: #1a222a;
				}
			}
		}
	}

	#sidebar-overlay {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background-color: #000000ad;
		display: none;
		z-index: 1000;
		transition: opacity 0.3s ease;
	}

	&.mobile {
		#sidebar-overlay {
			display: block;
		}

		.sidebar-container {
			transform: translateX(0);
			opacity: 1;
		}

		.header-top {
			transform: translateX(-100%);
			opacity: 0;
		}
	}
}

.sidebar-container {
	border-right: 1px solid var(--gom-color-highlight);
	background-color: var(--gom-color-background-secondary);
	width: 240px;
	height: 100vh;
	box-sizing: border-box;
	overflow-y: auto;
	display: flex;
	flex-direction: column;

	@media (max-width: 768px) {
		position: fixed;
		z-index: 1010;
		transition: transform 0.3s ease, opacity 0.3s ease;
		transform: translateX(-100%);
		opacity: 0;
	}
}

.sidebar-container nav {
	overflow-y: auto;
	padding: 1rem;
	margin-top: 0.5rem;

	ul {
		position: relative;

		&:not(:last-child) {
			margin-bottom: 2rem;

			&::after {
				content: '';
				position: absolute;
				bottom: -1rem;
				left: 0;
				width: 100%;
				border-bottom: 1px solid var(--gom-color-highlight);
			}
		}

		li {
			font-weight: bold;
			font-size: 14px;
			color: var(--gom-color-title);

			&:not(:last-child) {
				margin-bottom: 1rem;
			}
		}

		ul {
			li {
				cursor: pointer;
				padding: 0.5rem;
				margin: 0 0.7rem;
				font-weight: 400;
				font-size: 16px;
				text-transform: capitalize;
				border-radius: 7px;

				&:not(:last-child) {
					margin-bottom: 4px;
				}

				&:hover {
					background-color: var(--gom-color-highlight);
				}

				&.active {
					color: var(--gom-color-accent);
					background-color: var(--gom-color-highlight);
					position: relative;
					font-weight: bold;
				}

				&.active:hover {
					background-color: var(--gom-color-highlight);
				}

				&.active::before {
					background: var(--gom-color-accent);
					border-radius: 5px;
					content: '';
					height: 24px;
					left: -10px;
					position: absolute;
					top: 4px;
					width: 4px;
				}
			}
		}
	}
}

.sidebar-container header {
	padding: 1.5rem 1rem;
	background-color: var(--gom-color-background-secondary);
	border-bottom: 1px solid var(--gom-color-highlight);
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	position: sticky;
	top: 0;
	overflow: hidden;
	z-index: 1;

	ion-icon {
		font-size: 20px;
	}

	a {
		border: 1px solid;
		border-color: var(--gom-color-highlight);
		padding: 0.4rem;
		display: flex;
		align-items: center;
		background: none;
		border-radius: 12px;
		cursor: pointer;
		color: white;

		&:hover {
			background-color: var(--gom-color-highlight);
			border-color: var(--gom-color-highlight-focus);
		}
	}

	.logo-container {
		display: flex;
		flex-direction: row;
		gap: 0.7rem;
		align-items: center;

		> div {
			display: flex;
			flex-direction: column;
		}

		h1 {
			font-size: 17px;
			font-weight: bold;
			letter-spacing: 1px;
			margin: 0;
		}

		span {
			color: var(--gom-color-text-secondary);
			font-size: 14px;
			white-space: nowrap;
		}
	}
}

.component-setting {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--gom-color-highlight);
	border-radius: 10px;
	overflow-x: auto;
	display: block;

	tr {
		background-color: var(--gom-color-background-primary);

		&:nth-child(odd) {
			background-color: #1f232b;
		}

		th:first-child,
		td:first-child {
			position: sticky;
			left: 0;
			z-index: 3;
		}

		td:first-child {
			background-color: inherit;
		}

		td:not(:last-child) {
			border-right: 1px solid #272b35;
		}
	}

	th,
	td {
		white-space: nowrap;
		padding: 10px 20px;
		text-align: left;
	}

	th {
		background-color: var(--gom-color-highlight);
		width: 100%;
	}

	td input[type='text'] {
		padding: 5px;
		background-color: #191e22;
		color: #ffffff;
		border: 1px solid var(--gom-color-highlight);
		border-radius: 5px;

		&:hover {
			border-color: #39404e;
		}

		&:focus {
			border-color: #39404e;
			outline: none;
		}
	}
}

.component-container {
	display: flex;
	flex-direction: column;
	gap: 1rem;

	header {
		display: flex;
		flex-direction: column;
		gap: 0.2rem;

		h1 {
			margin-bottom: 0;
			text-transform: capitalize;
		}

		.tag-code-container {
			color: #dd6c75;
			font-size: 14px;
			margin-top: 5px;
			background-color: var(--gom-color-highlight);
			width: max-content;
			padding: 0.2rem;
			letter-spacing: 1px;
		}

		.tag-highlight {
			color: #979a9b;
		}
	}
}

.component-tabs-container {
	display: flex;
	flex-direction: row;
	gap: 1rem;
	position: relative;
	margin-top: 1rem;
	margin-bottom: 1rem;

	&::after {
		content: '';
		position: absolute;
		bottom: -0.8rem;
		left: 0;
		width: 100%;
		border-bottom: 1px solid var(--gom-color-highlight);
	}
}

.tab-button {
	cursor: pointer;
	border-radius: 7px;
	border: 0;
	padding: 0.4rem 0.6rem;
	font-size: 15px;
	width: max-content;
	background: none;
	position: relative;

	&:hover {
		background-color: var(--gom-color-highlight);
	}

	&.active {
		font-weight: bold;
		color: var(--gom-color-accent);

		&::after {
			content: '';
			position: absolute;
			bottom: -0.7rem;
			left: 0;
			width: 100%;
			border-bottom: 4px solid var(--gom-color-accent);
			border-radius: 10px;
			z-index: 1;
		}
	}
}

.live-preview-tab-content {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.documentation-tab-content {
	display: none;
	flex-direction: column;
}

.introduction-container {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	text-align: left;
	font-size: 16px;

	p {
		margin-bottom: 14px;
	}
}

.website-examples-container {
	display: flex;
	flex-direction: row;
	gap: 1.5rem;
}

.website-card-container {
	display: flex;
	flex-direction: row;
	gap: 0.7rem;
	border-radius: 7px;
	border: 1px solid;
	border-color: var(--gom-color-highlight);
	padding: 0.6rem 2rem 0.6rem 0.8rem;
	align-items: center;
	text-decoration: none;
	color: var(--gom-color-title);
	position: relative;
	background-color: var(--gom-color-background-secondary);

	&:hover {
		background-color: var(--gom-color-highlight);
		border-color: var(--gom-color-highlight-focus);
		color: var(--gom-color-title);
	}

	img {
		width: 32px;
		height: 32px;
	}

	> div {
		display: flex;
		flex-direction: column;
	}

	ion-icon {
		position: absolute;
		top: 10px;
		right: 10px;
		color: var(--gom-color-text-secondary);
		width: 14px;
		height: 14px;
	}
}

.website-description {
	color: #959595;
	font-size: 14px;
	margin-top: 2px;
}

.doc-container {
	> div {
		display: flex;
		flex-direction: row;
		gap: 1rem;
	}
}

pre {
	background-color: #191e22;
	border: 1px solid var(--gom-color-highlight);
	border-radius: 10px;
	padding: 8px;

	code {
		white-space: pre;
		display: block;
		padding: 8px;
		font-size: 14.5px;
		letter-spacing: 0.5px;
		overflow: auto;

		.angle {
			color: #b3b3b4;
		}
		.tag {
			color: #e06c75;
		}
		.attr {
			color: #98c379;
		}
		.value {
			color: #dab877;
		}
	}
}

.badge-item,
.slot-badge {
	padding: 0 3px;
	font-size: 14px;
	letter-spacing: 0.5px;
	border-radius: 3px;
	border: 1px solid var(--gom-color-highlight);
}

.slot-badge {
	color: #c26fbd;
}

#progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	background: var(--gom-color-accent);
	width: 0;
	z-index: 9999;
	transition: width 0.3s ease;
}
