/**
 * Three60 Age Gate - Frontend Styles
 *
 * Letvægts, responsiv og tilgængelig styling af aldersbekræftelses-overlayet.
 */

:root {
	--three60-ag-bg: #111827;
	--three60-ag-text: #ffffff;
	--three60-ag-btn-yes-bg: #16a34a;
	--three60-ag-btn-yes-color: #ffffff;
	--three60-ag-btn-no-bg: #374151;
	--three60-ag-btn-no-color: #d1d5db;
}

/* Lås baggrunds-scroll når Age Gate er aktiv */
html.three60-ag-active,
body.three60-ag-active {
	overflow: hidden !important;
	height: 100% !important;
	touch-action: none !important;
}

/* Skjul overlay omgående hvis alderen er verificeret */
html.three60-ag-passed #three60-agegate-overlay {
	display: none !important;
}

/* Fuldskærms-overlay */
.three60-ag-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 2147483640;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	animation: three60AgFadeIn 0.25s ease-out forwards;
}

/* Uigennemsigtig/sløret baggrund */
.three60-ag-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.88);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

/* Modal container */
.three60-ag-container {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 480px;
	padding: 20px;
	box-sizing: border-box;
}

/* Kort med indhold */
.three60-ag-card {
	background-color: var(--three60-ag-bg);
	color: var(--three60-ag-text);
	border-radius: 16px;
	padding: 36px 28px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
	text-align: center;
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-sizing: border-box;
}

/* Logo */
.three60-ag-logo-wrapper {
	margin-bottom: 20px;
}

.three60-ag-logo {
	max-height: 70px;
	max-width: 180px;
	width: auto;
	height: auto;
	display: inline-block;
	object-fit: contain;
}

/* Header og typografi */
.three60-ag-header {
	margin-bottom: 16px;
}

.three60-ag-headline {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 1.5rem;
	line-height: 1.3;
	font-weight: 700;
	margin: 0 0 8px 0;
	color: inherit;
}

.three60-ag-question {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 1.25rem;
	line-height: 1.4;
	font-weight: 600;
	margin: 0;
	color: inherit;
	opacity: 0.95;
}

/* Beskrivelse */
.three60-ag-body {
	margin-bottom: 28px;
}

.three60-ag-description {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 0.95rem;
	line-height: 1.5;
	margin: 0;
	color: inherit;
	opacity: 0.8;
}

/* Fødselsdato formular & felter */
.three60-ag-dob-form {
	margin-top: 8px;
}

.three60-ag-dob-fields {
	display: grid;
	grid-template-columns: 1fr 1fr 1.3fr;
	gap: 10px;
	margin-bottom: 20px;
}

.three60-ag-dob-field {
	display: flex;
	flex-direction: column;
	text-align: center;
}

.three60-ag-dob-field label {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 0.78rem;
	font-weight: 600;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	opacity: 0.85;
}

.three60-ag-dob-field input {
	width: 100%;
	height: 48px;
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 1.15rem;
	font-weight: 600;
	color: inherit;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	padding: 8px;
	box-sizing: border-box;
	transition: border-color 0.15s ease, background-color 0.15s ease;
	-moz-appearance: textfield;
}

.three60-ag-dob-field input::-webkit-outer-spin-button,
.three60-ag-dob-field input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.three60-ag-dob-field input:focus {
	outline: 2px solid #3b82f6;
	outline-offset: 1px;
	border-color: #3b82f6;
	background: rgba(255, 255, 255, 0.15);
}

/* Fejlbesked */
.three60-ag-error {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 0.88rem;
	font-weight: 500;
	line-height: 1.4;
	color: #fca5a5;
	background-color: rgba(239, 68, 68, 0.15);
	border: 1px solid rgba(239, 68, 68, 0.35);
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 18px;
	text-align: center;
}

/* Knapper / Handlinger */
.three60-ag-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.three60-ag-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: 12px 24px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
	box-sizing: border-box;
}

.three60-ag-btn:focus-visible {
	outline: 3px solid #3b82f6;
	outline-offset: 3px;
}

/* Primær godkend-knap (Ja) */
.three60-ag-btn-primary {
	background-color: var(--three60-ag-btn-yes-bg);
	color: var(--three60-ag-btn-yes-color);
}

.three60-ag-btn-primary:hover {
	opacity: 0.92;
	transform: translateY(-1px);
}

.three60-ag-btn-primary:active {
	transform: translateY(0);
}

/* Sekundær afvis-knap (Nej) */
.three60-ag-btn-secondary {
	background-color: var(--three60-ag-btn-no-bg);
	color: var(--three60-ag-btn-no-color);
}

.three60-ag-btn-secondary:hover {
	opacity: 0.92;
	transform: translateY(-1px);
}

.three60-ag-btn-secondary:active {
	transform: translateY(0);
}

/* Udfadningsanimation ved lukning */
.three60-ag-closing {
	animation: three60AgFadeOut 0.25s ease-in forwards !important;
}

@keyframes three60AgFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes three60AgFadeOut {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}

/* Respekter reduced motion */
@media (prefers-reduced-motion: reduce) {
	.three60-ag-overlay,
	.three60-ag-closing,
	.three60-ag-btn {
		animation: none !important;
		transition: none !important;
		transform: none !important;
	}
}
