/**
 * Identity Hub — Frontend styles
 * Loaded from assets/css/identity-hub.css (separate file, cache-busted by filemtime).
 */

/* ---------------------------------------------------------------------
 * "You are already signed in / registered" status card (matches screenshot)
 * ------------------------------------------------------------------- */
.ih-wrap {
    background-color: white;
    border: 1px solid #E2D7CA;
    border-radius: 16px;
    padding: 30px;
}
.ih-status-card,
.ih-login-status {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: #fff;
	border: 1px solid #ece6d8;
	border-radius: 10px;
	padding: 18px 26px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ih-status-card .ih-title,
.ih-login-status .ih-title {
	margin: 0;
	font-size: 22px;
	text-align: left;
	flex: 1;
}

.ih-status-card .ih-btn,
.ih-login-status .ih-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	background: #dc3545;
	color: #fff;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background 0.3s ease;
}

.ih-status-card .ih-btn:hover,
.ih-login-status .ih-btn:hover {
	background: #bb2d3b;
	color: #fff;
}

/* Responsive: stack and center on small screens */
@media (max-width: 768px) {
	.ih-status-card,
	.ih-login-status {
		flex-direction: column;
		text-align: center;
	}
	.ih-status-card .ih-title,
	.ih-login-status .ih-title {
		text-align: center;
		order: 1;
	}
	.ih-status-card .ih-btn,
	.ih-login-status .ih-btn {
		order: 2;
		width: 100%;
		max-width: 250px;
	}
}

/* ---------------------------------------------------------------------
 * Honeypot field (bots fill it, humans never see it)
 * ------------------------------------------------------------------- */
.ih-hp {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------------------------------------------------------------------
 * Base card / typography
 * ------------------------------------------------------------------- */
.ih-card {
	font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #333;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.ih-wrap { padding: 40px 20px; }

.ih-card--register,
.ih-card--login { max-width: 680px; margin: 0 auto; }

.ih-title {
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 500;
	font-size: 30px;
	line-height: 1.2;
	margin: 0 0 6px;
	color: #2b2b2b;
}

.ih-sub { font-size: 14px; color: #777; margin: 0 0 4px; }

.ih-section {
	color: #b88a3e;
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 600;
	margin: 26px 0 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid #efe7d6;
}

/* ---------------------------------------------------------------------
 * Form fields
 * ------------------------------------------------------------------- */
.ih-form { margin-top: 18px; }
.ih-field { margin-bottom: 18px; }
.ih-field--half { max-width: 50%; }

.ih-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #3a3a3a;
	margin-bottom: 6px;
}

.ih-field input,
.ih-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	border: 1px solid #d9d2c4;
	border-radius: 6px;
	font-size: 14px;
	background: #fff;
	color: #222;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.ih-field input:focus,
.ih-field select:focus {
	outline: none;
	border-color: #3a9c54;
	box-shadow: 0 0 0 3px rgba(58, 156, 84, 0.15);
}
/* Focus is always green, even if the field is currently flagged invalid. */
.ih-field.ih-invalid input:focus,
.ih-field.ih-invalid select:focus,
.ih-field:has(.ih-err--active) input:focus,
.ih-field:has(.ih-err--active) select:focus {
	border-color: #3a9c54;
	box-shadow: 0 0 0 3px rgba(58, 156, 84, 0.15);
}

.ih-field.ih-invalid input,
.ih-field.ih-invalid select { border-color: #cf3a3a; }

.ih-field.ih-valid input,
.ih-field.ih-valid select { border-color: #3a9c54; }

.ih-err {
	display: block;
	color: #cf3a3a;
	font-size: 12px;
	margin-top: 5px;
	min-height: 14px;
}

.ih-field:has(.ih-err--active) input,
.ih-field:has(.ih-err--active) select { border-color: #cf3a3a; }

.ih-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ih-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

/* Password visibility toggle */
.ih-pass-wrap { position: relative; }
.ih-pass-wrap input { padding-right: 40px; }

.ih-eye {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	font-size: 15px;
	opacity: 0.55;
	padding: 4px;
	z-index: 2;
	line-height: 1;
}
.ih-eye:hover { opacity: 0.9; }

/* Password strength meter */
.ih-meter {
	height: 5px;
	border-radius: 4px;
	background: #eee;
	margin-top: 8px;
	overflow: hidden;
}
.ih-meter > span {
	display: block;
	height: 100%;
	width: 0;
	transition: width 0.2s, background 0.2s;
}

.ih-row-between {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 8px 0 22px;
	flex-wrap: wrap;
	gap: 8px;
}

.ih-check {
	font-size: 13px;
	color: #555;
	display: flex;
	align-items: center;
	gap: 7px;
}

.ih-link {
	color: #b88a3e;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}
.ih-link:hover { text-decoration: underline; }

.ih-btn {
	background: #7a1f1f;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 13px 26px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.15s;
}
.ih-btn:hover { background: #641818; }
.ih-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ih-foot { margin-top: 22px; font-size: 13px; color: #666; }

/* ---------------------------------------------------------------------
 * Notices
 * ------------------------------------------------------------------- */
.ih-notice {
	border-radius: 6px;
	padding: 12px 14px;
	margin: 14px 0;
	font-size: 14px;
}
.ih-notice p { margin: 4px 0; }
.ih-notice--error   { background: #fdecec; border: 1px solid #f3c9c9; color: #8a2222; }
.ih-notice--success { background: #eaf6ec; border: 1px solid #bfe2c5; color: #1a6b2a; }
.ih-notice--warning { background: #fff8e1; border: 1px solid #f3e0a0; color: #000; }

/* ---------------------------------------------------------------------
 * Profile page layout
 * ------------------------------------------------------------------- */
.ih-profile-section {
	background: #FFFDF6;
	padding: clamp(32px, 7vw, 96px) clamp(16px, 10vw, 208px);
	box-sizing: border-box;
	width: 100%;
}

.ih-profile-layout {
	display: grid;
	grid-template-columns: 1fr 400px;
	gap: 36px;
	align-items: start;
	max-width: 1200px;
	margin: 0 auto;
}

.ih-profile-layout .ih-card {
	background: #fff;
	border: 1px solid #ece6d8;
	border-radius: 14px;
	padding: clamp(24px, 4vw, 44px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ih-profile-formcard { max-width: none; margin: 0; }

/* Bare mode — when [ih_profile chrome="bare"] is dropped inside the
   Ponca Account Profile block, the block supplies the card box, so the
   form card itself drops its own border/shadow/padding/radius and fills
   the full width of the block card on a clean (transparent) background. */
.ponca-pf .ih-profile-formcard,
.ponca-pf .ih-card.ih-card--register.ih-profile-formcard {
	border: 0;
	box-shadow: none;
	border-radius: 0;
	padding: 0;
	margin: 0;
	background: transparent;
	max-width: 100%;
	width: 100%;
	color: inherit;
}
/* Inner form spans the whole card and is not capped/centered. */
.ponca-pf .ih-profile-formcard .ih-form {
	margin-top: 18px;
	width: 100%;
	max-width: 100%;
}
.ponca-pf .ih-profile-formcard .ih-grid-2 { grid-template-columns: 1fr 1fr; }
.ponca-pf .ih-profile-formcard .ih-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.ponca-pf .ih-profile-formcard .ih-field--half { max-width: 50%; }
@media (max-width: 782px) {
	.ponca-pf .ih-profile-formcard .ih-grid-2,
	.ponca-pf .ih-profile-formcard .ih-grid-3 { grid-template-columns: 1fr; }
	.ponca-pf .ih-profile-formcard .ih-field--half { max-width: 100%; }
}

/* ---------------------------------------------------------------------------
   Standalone Change Password page  [ih_change_password]
   Single-column card matching the figma. In bare mode (inside the Ponca
   Change Password block) the block supplies the card box.
--------------------------------------------------------------------------- */
.ih-pass-section {
	background: #FFFDF6;
	padding: clamp(32px, 7vw, 96px) clamp(16px, 10vw, 208px);
	box-sizing: border-box;
	width: 100%;
}
.ih-pass-layout {
	max-width: 900px;
	margin: 0 auto;
}
.ih-pass-layout .ih-card {
	background: #fff;
	border: 1px solid #ece6d8;
	border-radius: 14px;
	padding: clamp(24px, 4vw, 44px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.ih-pass-formcard { max-width: none; margin: 0; }

/* Bare mode for the Change Password block. */
.ponca-pf .ih-pass-formcard,
.ponca-pf .ih-card.ih-card--register.ih-pass-formcard {
	border: 0;
	box-shadow: none;
	border-radius: 0;
	padding: 0;
	margin: 0;
	background: transparent;
	max-width: 100%;
	width: 100%;
	color: inherit;
}
.ponca-pf .ih-pass-formcard .ih-form { width: 100%; max-width: 100%; }

/* ---------------------------------------------------------------------------
   Standalone Delete Account page  [ih_delete_account]
   Single-column card matching the figma. In bare mode (inside the Ponca
   Delete Account block) the block supplies the card box.
--------------------------------------------------------------------------- */
.ih-delete-section {
	background: #FFFDF6;
	padding: clamp(32px, 7vw, 96px) clamp(16px, 10vw, 208px);
	box-sizing: border-box;
	width: 100%;
}
.ih-delete-layout {
	max-width: 900px;
	margin: 0 auto;
}
.ih-delete-layout .ih-card {
	background: #fff;
	border: 1px solid #ece6d8;
	border-radius: 14px;
	padding: clamp(24px, 4vw, 44px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.ih-delete-formcard { max-width: none; margin: 0; }
.ih-delete-warning { font-size: 15.6px; line-height: 1.5; color: #6E6B6D; margin-bottom: 8px; }

/* Bare mode for the Delete Account block. */
.ponca-pf .ih-delete-formcard,
.ponca-pf .ih-card.ih-card--register.ih-delete-formcard {
	border: 0;
	box-shadow: none;
	border-radius: 0;
	padding: 0;
	margin: 0;
	background: transparent;
	max-width: 100%;
	width: 100%;
	color: inherit;
}
.ponca-pf .ih-delete-formcard .ih-form { width: 100%; max-width: 100%; }

/* Delete button keeps the same red CTA styling as other primary buttons. */
.ih-btn--danger { background: #7E1504; }
.ih-btn--danger:hover { background: #641103; }

/* Secondary CTA (e.g. "Resend Code") — outline style so it doesn't compete with the primary action. */
.ih-btn--secondary {
	background: transparent;
	color: #7a1f1f;
	border: 1px solid #7a1f1f;
	margin-top: 10px;
}
.ih-btn--secondary:hover { background: rgba(122, 31, 31, 0.06); }
.ih-btn--secondary:disabled { opacity: 0.4; cursor: not-allowed; }
.ih-profile-sidecard { align-self: start; }
.ih-title--sm { font-size: 22px; }
.ih-profile-sidecard .ih-btn { width: 100%; }

.ih-field input:disabled {
	background: #f3f0ea;
	color: #888;
	cursor: not-allowed;
}

/* Busy submit button (double-submit guard) */
.ih-btn--busy {
	opacity: 0.65;
	pointer-events: none;
	position: relative;
}
.ih-btn--busy::after {
	content: "";
	display: inline-block;
	width: 13px;
	height: 13px;
	margin-left: 10px;
	vertical-align: -2px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ih-spin 0.7s linear infinite;
}
@keyframes ih-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
 * Responsive — tablets
 * ------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.ih-profile-layout { grid-template-columns: 1fr; gap: 24px; }
	.ih-profile-sidecard { max-width: 640px; }
}

/* ---------------------------------------------------------------------
 * Responsive — phones (profile page + all forms)
 * ------------------------------------------------------------------- */
@media (max-width: 768px) {
	.ih-wrap { padding: 20px 12px; }

	/* Profile section: kill the huge desktop padding + any overflow */
	.ih-profile-section {
		padding: 24px 14px;
		margin-left: 0 !important;
		margin-right: 0 !important;
		max-width: 100%;
		overflow-x: hidden;
	}
	.ih-profile-layout { gap: 18px; }
	.ih-profile-layout .ih-card {
		padding: 22px 16px;
		border-radius: 10px;
	}

	/* Typography scales down */
	.ih-title { font-size: 23px; }
	.ih-title--sm { font-size: 19px; }
	.ih-sub { font-size: 13px; }
	.ih-section { margin: 18px 0 12px; font-size: 11px; }

	/* All multi-column grids become single column */
	.ih-grid-2,
	.ih-grid-3 { grid-template-columns: 1fr; gap: 0; }
	.ih-field { margin-bottom: 14px; }
	.ih-field--half { max-width: 100%; }

	/* 16px input font prevents iOS Safari from auto-zooming on focus */
	.ih-field input,
	.ih-field select {
		font-size: 16px;
		padding: 12px;
	}

	/* Full-width tappable buttons */
	.ih-btn {
		width: 100%;
		padding: 15px 20px;
		font-size: 14px;
	}

	/* Remember-me / forgot-password stack vertically */
	.ih-row-between {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		margin: 6px 0 18px;
	}

	.ih-foot { text-align: center; }
}

/* ---------------------------------------------------------------------
 * Responsive — small phones
 * ------------------------------------------------------------------- */
@media (max-width: 420px) {
	.ih-profile-section { padding: 40px 16px; }
	.ih-profile-layout .ih-card { padding: 18px 12px; }
	.ih-title { font-size: 21px; }
	.ih-status-card,
	.ih-login-status { padding: 16px 14px; }
}

/* ---------------------------------------------------------------------
 * Login lockout — live countdown timer
 * ------------------------------------------------------------------- */
.ih-lockout {
	background: #fdecec;
	border: 1px solid #f3c9c9;
	border-radius: 10px;
	padding: 22px 18px;
	margin: 16px 0;
	text-align: center;
}

.ih-lockout__label {
	font-size: 14px;
	font-weight: 600;
	color: #8a2222;
	line-height: 1.5;
	margin-bottom: 12px;
}

.ih-lockout__timer {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 150px;
	padding: 12px 26px;
	background: #fff;
	border: 2px solid #cf3a3a;
	border-radius: 10px;
}

.ih-lockout__count {
	font-family: "Courier New", monospace;
	font-size: 34px;
	font-weight: 700;
	letter-spacing: 3px;
	color: #cf3a3a;
	line-height: 1;
	display: inline-block;
}

/* Pulse on every tick — gives the 5…4…3…2…1 effect */
.ih-lockout__count.ih-tick {
	animation: ih-tick-pulse 0.4s ease-out;
}

.ih-lockout__count--final {
	color: #8a1313;
}

@keyframes ih-tick-pulse {
	0%   { transform: scale(1.18); opacity: 0.6; }
	100% { transform: scale(1);    opacity: 1; }
}

.ih-lockout__done {
	font-size: 15px;
	font-weight: 700;
	color: #1a6b2a;
}

.ih-lockout--done {
	background: #eaf6ec;
	border-color: #bfe2c5;
}

@media (max-width: 480px) {
	.ih-lockout__count { font-size: 26px; }
	.ih-lockout__timer { min-width: 120px; padding: 10px 18px; }
}
