/**
 * Auth Form Styles
 */

/* Gradient background */
.houselist-auth-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 0% 100%, rgba(255, 200, 200, 0.45) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(255, 220, 160, 0.45) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.9) 0%, transparent 60%),
        #fafafa;
}

/* Main wrapper */
#houselist-mem-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Logo section */
.houselist-auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.houselist-auth-logo img {
    height: 44px;
    width: auto;
    margin: 0 auto 0.5rem;
    display: block;
}

.houselist-auth-logo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.houselist-auth-logo-tagline {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0.15rem 0 0;
}

/* Form card */
.houselist-auth-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Message states — used by auth.js setMsg() */
.houselist-mem-message {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

.houselist-mem-message.is-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.houselist-mem-message.is-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Form animations */
.houselist-mem-form-container {
    animation: houselist-mem-fadeIn 0.3s ease-in-out;
}

@keyframes houselist-mem-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Message animations */
#houselist-mem-messages {
    animation: houselist-mem-slideDown 0.3s ease-in-out;
}

@keyframes houselist-mem-slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logged in message animation */
.houselist-mem-logged-in-message {
    animation: houselist-mem-fadeIn 0.5s ease-in-out;
}

/* Input focus effects */
#houselist-mem-wrapper input:focus {
    outline: none;
}

/* Button loading state */
#houselist-mem-wrapper button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Smooth transitions */
#houselist-mem-wrapper input,
#houselist-mem-wrapper button,
#houselist-mem-wrapper a {
    transition-property: color, background-color, border-color, opacity, box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Custom scrollbar for messages */
#houselist-mem-messages::-webkit-scrollbar {
    width: 6px;
}

#houselist-mem-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#houselist-mem-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#houselist-mem-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Google divider background matches card */
.houselist-auth-card .houselist-auth-divider-text {
    background: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #houselist-mem-wrapper {
        padding: 1.5rem 1rem;
    }

    .houselist-auth-card {
        padding: 1.5rem;
        border-radius: 0.75rem;
    }
}

/* Print styles */
@media print {
    #houselist-mem-wrapper {
        display: none;
    }
}

/* =============================================
   Password Strength Indicator
   ============================================= */

.houselist-pw-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.houselist-pw-bars {
    display: flex;
    gap: 4px;
    flex: 1;
}

.houselist-pw-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    transition: background 0.2s ease;
}

/* Filled bar colours per strength level */
.houselist-pw-bar.houselist-pw-weak   { background: #ef4444; }
.houselist-pw-bar.houselist-pw-fair   { background: #f97316; }
.houselist-pw-bar.houselist-pw-good   { background: #eab308; }
.houselist-pw-bar.houselist-pw-strong { background: #22c55e; }

.houselist-pw-label {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 38px;
    text-align: right;
}

.houselist-pw-label.houselist-pw-weak   { color: #ef4444; }
.houselist-pw-label.houselist-pw-fair   { color: #f97316; }
.houselist-pw-label.houselist-pw-good   { color: #ca8a04; }
.houselist-pw-label.houselist-pw-strong { color: #16a34a; }

/* =============================================
   Password requirement popup — beside the field
   ============================================= */
.houselist-pw-hint {
	display: none;
	margin-top: 8px;
	background: #1f2937;
	color: #ffffff;
	font-size: 0.8rem;
	line-height: 1.45;
	padding: 10px 12px;
	border-radius: 8px;
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.20);
}
.houselist-pw-hint--show {
	display: block;
}
.houselist-pw-hint__arrow {
	display: none;
}

/* On wider screens, float it to the right of the password field with an arrow. */
@media (min-width: 720px) {
	.houselist-pw-hint {
		position: absolute;
		top: 50%;
		left: calc(100% + 14px);
		transform: translateY(-50%);
		margin-top: 0;
		width: 232px;
		z-index: 30;
	}
	.houselist-pw-hint__arrow {
		display: block;
		position: absolute;
		top: 50%;
		right: 100%;
		transform: translateY(-50%);
		border: 7px solid transparent;
		border-right-color: #1f2937;
	}
}

/* =============================================
   Role Selection Cards (buyer / agent)
   ============================================= */

.houselist-auth-role-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.houselist-auth-role-fieldset legend {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.75rem;
    display: block;
}

.houselist-auth-role-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Each card is the <label> wrapping a hidden radio */
.houselist-auth-role-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 0.75rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #ffffff;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    user-select: none;
}

.houselist-auth-role-card:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

/* Hide the native radio */
.houselist-auth-role-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Icon */
.houselist-auth-role-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: color 0.2s ease;
}

.houselist-auth-role-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
}

.houselist-auth-role-desc {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
}

/* Selected state — triggered by JS adding is-selected, or CSS :has() where supported */
.houselist-auth-role-card.is-selected,
.houselist-auth-role-card:has(input[type="radio"]:checked) {
    border-color: #111827;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.houselist-auth-role-card.is-selected .houselist-auth-role-icon,
.houselist-auth-role-card:has(input[type="radio"]:checked) .houselist-auth-role-icon {
    color: #111827;
}

/* =============================================
   CAPTCHA Container
   ============================================= */

.houselist-auth-captcha {
    margin: 0.5rem 0;
}

/* Constrain reCAPTCHA iframe width on small screens */
@media (max-width: 480px) {
    .houselist-auth-captcha .g-recaptcha,
    .houselist-auth-captcha iframe {
        transform: scale(0.88);
        transform-origin: 0 0;
    }
}

/* =============================================
   Google OAuth Button
   ============================================= */

.houselist-auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.625rem 1rem;
    background: #ffffff;
    border: 1.5px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    font-family: inherit;
    margin-bottom: 0;
}

.houselist-auth-google-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* OR divider */
.houselist-auth-divider-text {
    background: #ffffff;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ===== Ported inline styles (CodeCanyon: no inline CSS) ===== */
.houselist-auth-hidden {
    display: none;
}

.houselist-auth-2fa-code {
    letter-spacing: 0.5em;
}
