/* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>

 This file is part of a Moko Consulting project.

 SPDX-License-Identifier: GPL-3.0-or-later
 */

/* === Offline Page — Full-viewport background with centered overlay card === */

.moko-offline-wrap {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
	color: #fff;
	font-family: var(--body-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
	/* Background: offline_image set inline, or fall back to header background */
	background-color: var(--color-primary, #112855);
	background-image: var(--header-background-image, none);
	background-position: var(--header-background-position, center);
	background-attachment: var(--header-background-attachment, fixed);
	background-repeat: no-repeat;
	background-size: cover;
}

/* Dark theme: overlay to darken the background */
:root[data-bs-theme="dark"] .moko-offline-wrap {
	position: relative;
}

:root[data-bs-theme="dark"] .moko-offline-wrap::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 0;
}

/* === Centered Card Overlay === */
.moko-offline-card {
	width: 100%;
	max-width: 720px;
	background: var(--offline-card-bg, rgba(0, 0, 0, 0.6));
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-radius: 0.875rem;
	padding: 2.5rem 2rem;
	text-align: center;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

@media (min-width: 768px) {
	.moko-offline-card {
		padding: 3rem;
	}
}

@media (max-width: 575.98px) {
	.moko-offline-wrap {
		padding: 1rem 0.75rem;
	}

	.moko-offline-card {
		padding: 2rem 1.25rem;
	}
}

/* === Logo header area === */
.moko-offline-brand {
	display: block;
	text-align: center;
	text-decoration: none;
	color: #fff;
	margin-bottom: 1.5rem;
}

.moko-offline-brand:hover {
	color: var(--accent-color-primary, #3f8ff0);
}

.moko-offline-brand img {
	max-width: 100%;
	height: auto;
}

.moko-offline-brand .site-title {
	display: block;
	font-size: 2rem;
	font-weight: 700;
	font-family: 'Osaka', var(--body-font-family, sans-serif);
	color: var(--accent-color-secondary, #6fb3ff);
}

.moko-offline-brand .brand-tagline {
	display: block;
	opacity: 0.7;
	font-size: 0.9rem;
	margin-top: 0.25rem;
}

/* === Offline Message === */
.moko-offline-message {
	margin-bottom: 1.5rem;
}

.moko-offline-message h1 {
	font-size: 1.5rem;
	font-weight: 700;
	color: #fff;
	margin-bottom: 0.5rem;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.moko-offline-message p {
	color: rgba(255, 255, 255, 0.85);
	line-height: 1.6;
	margin: 0;
}

/* === Offline Module Position === */
.moko-offline-modules {
	margin-bottom: 1.5rem;
	text-align: left;
}

/* === Copyright Footer === */
.moko-offline-copyright {
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.45);
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.moko-offline-copyright a {
	color: rgba(255, 255, 255, 0.6);
	text-decoration: underline;
}

.moko-offline-copyright a:hover {
	color: #fff;
}

/* === Login Accordion (translucent on overlay) === */
.moko-offline-card .accordion {
	text-align: left;
}

.moko-offline-card .accordion-item {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.15);
}

.moko-offline-card .accordion-button {
	background: transparent;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.9rem;
	padding: 0.75rem 1rem;
}

.moko-offline-card .accordion-button:not(.collapsed) {
	background: rgba(255, 255, 255, 0.05);
	color: #fff;
	box-shadow: none;
}

.moko-offline-card .accordion-button::after {
	filter: invert(1) brightness(2);
}

.moko-offline-card .accordion-body {
	background: transparent;
	padding: 1rem;
}

/* === Form Controls (glass effect) === */
.moko-offline-card .form-control {
	background-color: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.moko-offline-card .form-control::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.moko-offline-card .form-control:focus {
	background-color: rgba(255, 255, 255, 0.15);
	border-color: var(--accent-color-primary, #3f8ff0);
	color: #fff;
	box-shadow: 0 0 0 0.25rem rgba(63, 143, 240, 0.25);
}

.moko-offline-card .form-label {
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.875rem;
}

.moko-offline-card .form-check-label {
	color: rgba(255, 255, 255, 0.7);
}

.moko-offline-card .form-check-input {
	background-color: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.3);
}

.moko-offline-card .form-check-input:checked {
	background-color: var(--accent-color-primary, #3f8ff0);
	border-color: var(--accent-color-primary, #3f8ff0);
}

/* === Button === */
.moko-offline-card .btn-primary {
	background-color: var(--color-primary, #112855);
	border-color: rgba(255, 255, 255, 0.15);
	color: #fff;
}

.moko-offline-card .btn-primary:hover {
	background-color: var(--accent-color-primary, #3f8ff0);
	border-color: var(--accent-color-primary, #3f8ff0);
}

/* === Links === */
.moko-offline-card a {
	color: var(--accent-color-primary, #3f8ff0);
}

.moko-offline-card a:hover {
	color: #fff;
}

/* === Joomla system messages === */
.moko-offline-messages {
	width: 100%;
	max-width: 720px;
	margin-bottom: 1rem;
}

/* === Skip Link === */
.skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.skip-link:focus {
	position: static;
	width: auto;
	height: auto;
	padding: 0.5rem 1rem;
}
