/**
 * AEGEO — Auth pages (Login / Sign Up).
 * Native AEGEO look (olive/sand palette, theme fonts). Σκόπιμα προσωρινό
 * εικαστικό — θα αντικατασταθεί όταν έρθει το τελικό design.
 */

/* Καθαρό κόκκινο για error states + πράσινο για valid (το --Brown είναι καφέ). */
.auth-page {
	--auth-error: #d92d20;
	--auth-error-bg: rgba(217, 45, 32, 0.08);
	--auth-valid: #3d9a63;
	--auth-valid-bg: rgba(61, 154, 99, 0.1);
}

.auth-main {
	position: relative;
	background: var(--Off-White);
}

/* Compact olive band στην κορυφή — ώστε το (fixed) header logo + menu links να
   διαβάζονται στο scroll-top. Πιο μικρό από το κανονικό hero των άλλων σελίδων. */
.auth-main::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 150px;
	background: linear-gradient(180deg, var(--Sand) 0%, #c9b99f 100%); /* palette: πράσινο → Sand */
	border-bottom: 1px solid rgba(216, 203, 184, 0.35);
	box-shadow: 0 6px 18px rgba(43, 43, 43, 0.12);
	z-index: 0;
}

@media (max-width: 767px) {
	.auth-main::before {
		height: 92px;
	}
}

.auth-wrap {
	/* Καθαρό top clearance ώστε το fixed header + desktop mega menu να ΜΗΝ πέφτουν
	   πάνω στα sections (το mega menu είναι d-none κάτω από 768px). */
	padding-top: 175px;
	padding-bottom: clamp(3rem, 8vw, 7rem);
	min-height: 60vh;
	position: relative;
	z-index: 1;
}

@media (max-width: 767px) {
	.auth-wrap {
		padding-top: 110px;
	}
}

.auth-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(1.5rem, 4vw, 4rem);
	align-items: stretch;
	max-width: 1100px;
	margin: 0 auto;
}

.auth-grid--single {
	grid-template-columns: minmax(0, 560px);
	justify-content: center;
}

/* ---------- Card / form ---------- */
.auth-card {
	background: #fff;
	border: 1px solid rgba(78, 90, 79, 0.12);
	border-radius: 4px;
	padding: clamp(1.5rem, 4vw, 3rem);
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.auth-form {
	width: 100%;
}

.auth-title {
	font-family: var(--fontMain);
	color: var(--Deep-Olive);
	font-size: var(--step-1);
	margin: 0 0 0.4rem;
}

.auth-subtitle,
.auth-account {
	font-family: var(--fontSecondary);
	color: var(--Charcoal);
	font-size: var(--step--2);
	margin: 0 0 1.6rem;
}

.auth-account-email {
	display: block;
	font-weight: 600;
	color: var(--Deep-Olive);
}

/* ---------- Fields ---------- */
.auth-field {
	margin-bottom: 1.25rem;
}

.auth-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.auth-field label {
	display: block;
	font-family: var(--fontSecondary);
	font-size: var(--step--2);
	color: var(--Deep-Olive);
	margin-bottom: 0.4rem;
	letter-spacing: 0.5px;
}

.auth-field input[type="email"],
.auth-field input[type="text"],
.auth-field input[type="tel"],
.auth-field input[type="password"] {
	width: 100%;
	font-family: var(--fontSecondary);
	font-size: 16px;
	color: var(--Charcoal);
	background: #fff;
	border: 1px solid rgba(78, 90, 79, 0.3);
	border-radius: 3px;
	padding: 13px 15px;
	transition: border-color var(--transition3s), box-shadow var(--transition3s);
}

.auth-field input:focus {
	outline: none;
	border-color: var(--Deep-Olive);
	box-shadow: 0 0 0 3px rgba(78, 90, 79, 0.12);
}

.auth-field.has-error input {
	border-color: var(--auth-error);
	box-shadow: 0 0 0 3px var(--auth-error-bg);
}

/* Live valid → πράσινο border (νικάει το focus ring γιατί ορίζεται αργότερα). */
.auth-field.is-valid input {
	border-color: var(--auth-valid);
	box-shadow: 0 0 0 3px var(--auth-valid-bg);
}

/* --- Gender select + Date-of-birth: ΙΔΙΟ look με τα υπόλοιπα inputs --- */
.auth-field select,
.auth-field input[type="date"] {
	width: 100%;
	box-sizing: border-box;
	font-family: var(--fontSecondary);
	font-size: 16px;
	color: var(--Charcoal);
	background-color: #fff;
	border: 1px solid rgba(78, 90, 79, 0.3);
	border-radius: 3px;
	padding: 13px 15px;
	padding-right: 42px;
	background-repeat: no-repeat;
	background-position: right 15px center;
	cursor: pointer;
	transition: border-color var(--transition3s), box-shadow var(--transition3s);
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}
.auth-field select:focus,
.auth-field input[type="date"]:focus {
	outline: none;
	border-color: var(--Deep-Olive);
	box-shadow: 0 0 0 3px rgba(78, 90, 79, 0.12);
}
/* Custom βελάκι (αφού κόψαμε το native με appearance:none). */
.auth-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%234E5A4F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* Εικονίδιο ημερολογίου δεξιά. */
.auth-field input[type="date"] {
	position: relative;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%234E5A4F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}
.auth-field input[type="date"]::-webkit-datetime-edit {
	color: var(--Charcoal);
}
/* Το native calendar-icon → αόρατο ΑΛΛΑ απλωμένο σε ΟΛΟ το field → click οπουδήποτε ανοίγει το picker. */
.auth-field input[type="date"]::-webkit-calendar-picker-indicator {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	opacity: 0;
	cursor: pointer;
}

/* intl-tel-input (phone) — wrapper full-width, ίδιο look με τα άλλα πεδία */
.auth-field .iti {
	width: 100%;
	display: block;
}

.iti__dropdown-content {
	font-family: var(--fontSecondary);
}

/* password eye */
.auth-input-wrap {
	position: relative;
}

.auth-input-wrap input {
	padding-right: 48px;
}

.auth-eye {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 46px;
	border: 0;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--Deep-Olive);
	opacity: 0.65;
	transition: opacity var(--transition3s);
}

.auth-eye:hover {
	opacity: 1;
}

.auth-eye::before {
	content: "";
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5c-7 0-10 7-10 7s3 7 10 7 10-7 10-7-3-7-10-7zm0 11a4 4 0 110-8 4 4 0 010 8zm0-6a2 2 0 100 4 2 2 0 000-4z'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5c-7 0-10 7-10 7s3 7 10 7 10-7 10-7-3-7-10-7zm0 11a4 4 0 110-8 4 4 0 010 8zm0-6a2 2 0 100 4 2 2 0 000-4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.auth-eye.is-on::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M2 4.27 3.28 3 21 20.72 19.73 22l-3.3-3.3A11.9 11.9 0 0 1 12 19C5 19 2 12 2 12a13 13 0 0 1 3.6-4.43L2 4.27zM12 7a4 4 0 0 1 4 4 4 4 0 0 1-.2 1.24l-5-5A4 4 0 0 1 12 7z'/%3E%3C/svg%3E");
	        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M2 4.27 3.28 3 21 20.72 19.73 22l-3.3-3.3A11.9 11.9 0 0 1 12 19C5 19 2 12 2 12a13 13 0 0 1 3.6-4.43L2 4.27zM12 7a4 4 0 0 1 4 4 4 4 0 0 1-.2 1.24l-5-5A4 4 0 0 1 12 7z'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.auth-submit {
	width: 100%;
	margin-top: 0.5rem;
	padding: 14px 20px;
	font-size: var(--step--1);
	cursor: pointer;
}

.auth-submit[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ---------- Links ---------- */
.auth-link {
	background: none;
	border: 0;
	padding: 0;
	font-family: var(--fontSecondary);
	font-size: var(--step--2);
	color: var(--Clay);
	text-decoration: underline;
	cursor: pointer;
}

.auth-link:hover {
	color: var(--Brown);
}

.auth-forgot,
.auth-alt {
	margin-top: 1.25rem;
	font-family: var(--fontSecondary);
	font-size: var(--step--2);
	color: var(--Charcoal);
}

.auth-account .auth-link {
	display: inline-block;
	margin-top: 0.3rem;
}

/* ---------- Password rules ---------- */
.auth-rules {
	list-style: none;
	margin: 0.6rem 0 0;
	padding: 0;
	font-family: var(--fontSecondary);
	font-size: 0.85rem;
}

.auth-rules li {
	position: relative;
	padding-left: 22px;
	margin-bottom: 4px;
	color: var(--Warm-Stone);
	transition: color var(--transition3s);
}

.auth-rules li::before {
	content: "○";
	position: absolute;
	left: 0;
	top: 0;
}

.auth-rules li.is-valid {
	color: var(--Sage);
}

.auth-rules li.is-valid::before {
	content: "✓";
	color: var(--Sage);
}

/* ---------- Checkboxes ---------- */
.auth-checks {
	margin: 1.5rem 0 0.5rem;
}

.auth-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-family: var(--fontSecondary);
	font-size: var(--step--2);
	color: var(--Charcoal);
	margin-bottom: 0.85rem;
	cursor: pointer;
}

.auth-check input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	flex: 0 0 auto;
	cursor: pointer;
	position: relative;
	top: 3px;
	background: #fff;
	border: 1.5px solid rgba(78, 90, 79, 0.5);
	border-radius: 3px;
	transition: border-color var(--transition3s), background var(--transition3s), box-shadow var(--transition3s);
}

.auth-check input[type="checkbox"]:checked {
	background: var(--Deep-Olive);
	border-color: var(--Deep-Olive);
}

/* Custom checkmark */
.auth-check input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.auth-check input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--Deep-Olive);
	outline-offset: 2px;
}

/* Υποχρεωτικά checkboxes (Aegeo Rewards + Terms) που έμειναν ατσεκάριστα στο
   submit → κόκκινο ΣΤΟ ΙΔΙΟ ΤΟ border (όχι ξεχωριστό outline). Το promo όχι. */
.auth-checks.has-error input[name="accept_rewards"]:not(:checked),
.auth-checks.has-error input[name="accept_terms"]:not(:checked) {
	border-color: var(--auth-error);
	box-shadow: 0 0 0 3px var(--auth-error-bg);
}

/* ---------- Errors / notices ---------- */
.auth-error {
	display: none;
	font-family: var(--fontSecondary);
	font-size: 0.8rem;
	color: var(--auth-error);
	margin-top: 0.35rem;
}

.auth-field.has-error .auth-error,
.auth-checks.has-error .auth-error {
	display: block;
}

.auth-notice {
	display: none;
	font-family: var(--fontSecondary);
	font-size: var(--step--2);
	margin-top: 1rem;
	padding: 12px 15px;
	border-radius: 3px;
	border: 1px solid transparent;
}

.auth-notice.is-visible {
	display: block;
}

.auth-notice.is-info {
	background: rgba(140, 154, 139, 0.15);
	border-color: var(--Sage);
	color: var(--Deep-Olive);
}

.auth-notice.is-error {
	background: var(--auth-error-bg);
	border-color: var(--auth-error);
	color: var(--auth-error);
}

.auth-notice.is-success {
	background: rgba(140, 154, 139, 0.2);
	border-color: var(--Sage);
	color: var(--Deep-Olive);
}

/* ---------- Promo aside ---------- */
.auth-aside {
	border-radius: 4px;
	padding: clamp(1.75rem, 4vw, 3rem);
	display: flex;
	flex-direction: column;
	color: var(--Clay); /* palette: Sand-bg → κείμενο Clay (ήταν Off-White) */
}

.auth-aside-title {
	font-family: var(--fontMain);
	font-size: var(--step-1);
	margin: 0 0 1.75rem;
	color: var(--Clay);
}

.auth-aside-title span {
	color: var(--Brown);
}

.auth-bullets {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1 1 auto;
}

.auth-bullets li {
	display: flex;
	gap: 14px;
	margin-bottom: 1.4rem;
}

.auth-bullet-dot {
	flex: 0 0 auto;
	width: 12px;
	height: 12px;
	margin-top: 7px;
	border-radius: 50%;
	background: var(--Clay);
}

.auth-bullet-body strong {
	display: block;
	font-family: var(--fontSecondary);
	font-weight: 600;
	color: var(--Brown);
	font-size: var(--step--2);
	margin-bottom: 3px;
}

.auth-bullet-body span {
	font-family: var(--fontSecondary);
	color: rgba(124, 80, 41, 0.85); /* Brown με διαφάνεια — ευανάγνωστο σε Sand */
	font-size: 0.9rem;
	line-height: 1.5;
}

.auth-aside-cta {
	margin-top: 1.5rem;
	align-self: center;
}

/* palette: Sand-bg → το .button (λευκό, hover→sand) χανόταν. Olive theme. */
.auth-aside .button {
	color: var(--Deep-Olive);
	background-color: rgba(78, 90, 79, 0.06);
	border: 1px solid rgba(78, 90, 79, 0.25);
}
.auth-aside .button:hover {
	color: var(--Off-White) !important;
	background-color: var(--Deep-Olive);
	border: 1px solid var(--Deep-Olive);
}

/* ---------- State helpers ---------- */
.is-hidden {
	display: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.auth-grid {
		grid-template-columns: 1fr;
		max-width: 560px;
	}

	.auth-aside {
		order: -1;
	}
}

@media (max-width: 575px) {
	.auth-row {
		grid-template-columns: 1fr;
	}
}
