<template>
	<div class="warning-container">
		<div class="warning">
			<div
				class="logo"
				v-html="logo"
			/>

			<strong class="title">This website contains sexually explicit content</strong>

			<span class="copy agree">By entering, you agree to the following</span>

			<ul class="rules">
				<li class="rule">You are at least 18 years old, and legally permitted to view adult material in your jurisdiction.</li>
				<li class="rule">You are prepared see, hear and read erotic and sexual material, and do not regard such content as obscene or offensive.</li>
				<li class="rule">You understand that most sexual scenarios depicted on this website are fictional, performed by professional actors for the purpose of entertainment, and not representative of real-life interactions.</li>
				<li class="rule">Respect your sexual partners, communicate about each other's desires and limits, and take precautions to prevent sexually transmitted infections and unintended pregnancies.</li>
			</ul>

			<div class="actions">
				<a
					href="https://www.google.com"
					class="button leave"
					@click="$emit('leave')"
				><Icon icon="arrow-left16" />Leave</a>

				<button
					class="button enter queer"
					@click="$emit('enter', true)"
				>
					<span class="button-title">Enter</span>
					<span class="button-sub">I like gay, bi and trans content</span>
				</button>

				<button
					class="button enter straight"
					@click="$emit('enter', false)"
				>
					<span class="button-title">Enter</span>
					<span class="button-sub">I prefer straight content</span>
				</button>
			</div>

			<span class="preferences">You can adjust your content preferences after entering</span>
		</div>
	</div>
</template>

<script>
import logo from '../../img/logo.svg';

export default {
	data() {
		return {
			logo,
		};
	},
	emits: ['enter'],
};
</script>

<style lang="scss" scoped>
@import 'breakpoints';

.warning-container {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	z-index: 10;
	background: var(--darken-censor);
	overflow-y: auto;
}

.warning {
	color: var(--text-light);
	width: 50rem;
	max-height: 100%;
	max-width: 100%;
	margin: 1rem;
}

.logo {
	width: 8rem;
    display: flex;
	fill: var(--primary);
	margin: 1rem auto 0 auto;
}

.title,
.copy,
.rules {
	padding: 1rem;
}

.title {
	display: block;
	font-size: 2rem;
	margin: 0 0 1rem 0;
	color: var(--text-light);
}

.copy {
	display: block;
	padding: 0 1rem;
	font-weight: bold;
}

.rules {
	margin: 0 0 0 1rem;
	text-align: left;
	text-shadow: 0 0 3px var(--darken-extreme);
}

.rule {
	padding: .5rem 1rem;
	line-height: 1.5;
}

.preferences {
	color: var(--lighten);
	display: block;
	padding: .5rem 0 1rem 0;
	text-align: center;
	font-size: .9rem;
}

.actions {
	display: flex;
	text-align: center;
	padding: 1rem 0;
}

.button {
	display: inline-block;
	border: none;
	font-size: 1.5rem;
	padding: 0;
	background: none;
	border: solid 2px transparent;
	cursor: pointer;
	text-decoration: none;
	flex-basis: 0;

	&.leave {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		color: var(--lighten-strong);
		padding: 1rem;

		.icon {
			width: 1.5rem;
			height: 1.5rem;
			margin: 0 1rem 0 0;
			fill: var(--lighten);
		}
	}

	&.enter {
		flex-grow: 1;

		&:hover {
			.button-title,
			.button-sub {
				color: var(--text-light);
			}
		}
	}

	&.straight {
		border-color: var(--primary);
	}

	&.queer {
		border-image: linear-gradient(90deg, #f00, #f80, #ff0, #0f0, #00f, #a0f, #fff, #f8f, #0ff) 1;
	}

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

	&:hover {
		color: var(--text-light);

		.icon {
			fill: var(--text-light);
		}
	}
}

.button-title,
.button-sub {
	width: 100%;
	display: block;
	box-sizing: border-box;
}

.button-title {
	font-size: 1.5rem;
	padding: .5rem .5rem .15rem .5rem;
	color: var(--lighten-strong);
	font-weight: bold;
}

.button-sub {
	font-size: .75rem;
	padding: .15rem .5rem .75rem .5rem;
	color: var(--lighten);
}

@media(max-width: $breakpoint) {
	.title {
		font-size: 1.5rem;
	}
}

@media(max-width: $breakpoint-small) {
	.actions {
		flex-direction: column-reverse;

		.button {
			margin: 0 0 1rem 0;
		}
	}
}

@media(max-width: $breakpoint-micro) {
	.button.leave {
		padding: 1rem;
		flex-grow: 1;
	}
}
</style>
