/* ============================================================
   IFAD Account + Checkout — storefront pages (no WooCommerce).
   Brand navy #0E0E31, radius 5, Nunito Sans (inherited).
   ============================================================ */

:root { --ifad-navy: #0e0e31; --ifad-line: #e5e5ea; --ifad-muted: #6b6b76; --ifad-soft: #f6f6f8; }

.ifad-account,
.ifad-checkout { padding: 42px 0 72px; }

/* ---------------- Brand button ----------------
   The theme's .ifad-btn lives in single-product.css, which isn't loaded on
   these virtual pages — redefine it here (font: inherit keeps Nunito Sans). */
.ifad-account .ifad-btn,
.ifad-checkout .ifad-btn,
.ifad-auth .ifad-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 150px;
	padding: 13px 22px;
	background: #fff;
	border: 1px solid var(--ifad-navy);
	border-radius: 5px;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--ifad-navy);
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.ifad-account .ifad-btn:hover,
.ifad-checkout .ifad-btn:hover,
.ifad-auth .ifad-btn:hover { background: var(--ifad-navy); color: #fff; }
.ifad-account .ifad-btn--primary,
.ifad-checkout .ifad-btn--primary,
.ifad-auth .ifad-btn--primary { background: var(--ifad-navy); color: #fff; }
.ifad-account .ifad-btn--primary:hover,
.ifad-checkout .ifad-btn--primary:hover,
.ifad-auth .ifad-btn--primary:hover { background: #1b1b4d; }

/* ---------------- Notices ---------------- */
.ifad-notice { margin: 0 0 18px; padding: 12px 16px; border-radius: 5px; font-size: 14px; line-height: 1.4; border: 1px solid transparent; }
.ifad-notice--error { background: #fdeaea; border-color: #f5c6c6; color: #a11414; }
.ifad-notice--success { background: #eef7ee; border-color: #cde6cf; color: #1a7f37; }

/* ---------------- Shared fields ---------------- */
.ifad-field { display: block; margin: 0 0 14px; }
.ifad-field > span { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ifad-navy); }
.ifad-field input,
.ifad-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 13px;
	border: 1px solid var(--ifad-line);
	border-radius: 5px;
	background: #fff;
	font: inherit;
	font-size: 14px;
	color: var(--ifad-navy);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.ifad-field input:focus,
.ifad-field textarea:focus { outline: none; border-color: var(--ifad-navy); box-shadow: 0 0 0 3px rgba(14, 14, 49, .08); }
.ifad-field input:disabled { background: var(--ifad-soft); color: var(--ifad-muted); }
.ifad-field-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.ifad-field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 16px; }
.ifad-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ifad-muted); cursor: pointer; }
.ifad-check input { accent-color: var(--ifad-navy); }

/* ---------------- Auth (guest) ---------------- */
.ifad-auth {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	max-width: 940px;
	margin: 8px auto 0;
	background: #fff;
	border: 1px solid var(--ifad-line);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 18px 50px rgba(8, 8, 26, .08);
}
.ifad-auth__brand { background: var(--ifad-navy); color: #fff; display: flex; align-items: center; }
.ifad-auth__brand-inner { padding: 46px 40px; }
.ifad-auth__brand-title { margin: 0 0 14px; font-size: 30px; line-height: 1.2; font-weight: 600; color: #fff; }
.ifad-auth__brand-text { margin: 0 0 22px; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .82); }
.ifad-auth__perks { list-style: none; margin: 0; padding: 0; }
.ifad-auth__perks li { position: relative; padding: 0 0 0 26px; margin: 0 0 12px; font-size: 14px; color: rgba(255, 255, 255, .9); }
.ifad-auth__perks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; }

.ifad-auth__forms { padding: 40px 40px 44px; }
.ifad-auth__tabs { display: flex; gap: 4px; margin: 0 0 24px; border-bottom: 1px solid var(--ifad-line); }
.ifad-auth__tab {
	appearance: none;
	background: none;
	border: 0;
	padding: 10px 4px 14px;
	margin-right: 24px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: var(--ifad-muted);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}
.ifad-auth__tab.is-active { color: var(--ifad-navy); border-bottom-color: var(--ifad-navy); }
.ifad-auth__form { display: none; }
.ifad-auth__form.is-active { display: block; }
.ifad-auth__forgot { font-size: 13px; color: var(--ifad-muted); text-decoration: none; }
.ifad-auth__forgot:hover { color: var(--ifad-navy); }
.ifad-auth__submit { width: 100%; margin-top: 6px; }
.ifad-auth__fineprint { margin: 14px 0 0; font-size: 12px; color: var(--ifad-muted); line-height: 1.5; }

/* ---------------- Account (logged-in) ---------------- */
.ifad-account__head { margin: 0 0 26px; }
.ifad-account__title { margin: 0 0 4px; font-size: 30px; font-weight: 600; color: var(--ifad-navy); }
.ifad-account__hello { margin: 0; color: var(--ifad-muted); font-size: 15px; }

.ifad-account__layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 34px; align-items: start; }
.ifad-account__nav { display: flex; flex-direction: column; border: 1px solid var(--ifad-line); border-radius: 8px; overflow: hidden; }
.ifad-account__nav-link {
	padding: 13px 18px;
	font-size: 14px;
	font-weight: 500;
	color: var(--ifad-navy);
	text-decoration: none;
	border-bottom: 1px solid var(--ifad-line);
	transition: background .15s ease, color .15s ease;
}
.ifad-account__nav-link:last-child { border-bottom: 0; }
.ifad-account__nav-link:hover { background: var(--ifad-soft); }
.ifad-account__nav-link.is-active { background: var(--ifad-navy); color: #fff; }
.ifad-account__nav-logout { color: #a11414; }
.ifad-account__nav-logout:hover { background: #fdeaea; color: #a11414; }

.ifad-account__main { min-width: 0; }
.ifad-account__lead { margin: 0 0 24px; font-size: 15px; line-height: 1.6; color: var(--ifad-muted); }
.ifad-account__lead a { color: var(--ifad-navy); font-weight: 600; }
.ifad-account__subtitle { margin: 0 0 16px; font-size: 20px; font-weight: 600; color: var(--ifad-navy); }

.ifad-account__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 0 0 30px; }
.ifad-account__card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px 18px;
	border: 1px solid var(--ifad-line);
	border-radius: 8px;
	text-decoration: none;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.ifad-account__card:hover { border-color: var(--ifad-navy); box-shadow: 0 6px 18px rgba(8, 8, 26, .07); }
.ifad-account__card strong { font-size: 26px; font-weight: 700; color: var(--ifad-navy); line-height: 1; }
.ifad-account__card span { font-size: 13px; color: var(--ifad-muted); }

.ifad-account__form { max-width: 560px; }
.ifad-account__empty { padding: 40px 0; text-align: center; }
.ifad-account__empty p { margin: 0 0 18px; color: var(--ifad-muted); font-size: 15px; }

/* ---------------- Orders table ---------------- */
.ifad-orders-table-wrap { overflow-x: auto; border: 1px solid var(--ifad-line); border-radius: 8px; }
.ifad-orders-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ifad-orders-table th,
.ifad-orders-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--ifad-line); color: var(--ifad-navy); }
.ifad-orders-table th { background: var(--ifad-soft); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--ifad-muted); }
.ifad-orders-table tbody tr:last-child td { border-bottom: 0; }
.ifad-order-pill { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; }

/* ---------------- Checkout ---------------- */
.ifad-checkout__title { margin: 0 0 24px; font-size: 30px; font-weight: 600; color: var(--ifad-navy); }
.ifad-checkout__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 34px; align-items: start; }
.ifad-checkout__summary { border: 1px solid var(--ifad-line); border-radius: 8px; padding: 22px; background: var(--ifad-soft); }
.ifad-checkout__items { list-style: none; margin: 0 0 14px; padding: 0; }
.ifad-checkout__item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ifad-line); font-size: 14px; }
.ifad-checkout__item-name { color: var(--ifad-navy); }
.ifad-checkout__item-price { font-weight: 600; color: var(--ifad-navy); white-space: nowrap; }
.ifad-checkout__total { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 4px; font-size: 16px; color: var(--ifad-navy); }
.ifad-checkout__total strong { font-size: 20px; font-weight: 700; }
.ifad-checkout__fineprint { margin: 12px 0 18px; font-size: 12.5px; line-height: 1.5; color: var(--ifad-muted); }
.ifad-checkout__place { width: 100%; }

/* ---------------- Responsive ---------------- */
@media ( max-width: 820px ) {
	.ifad-auth { grid-template-columns: 1fr; }
	.ifad-auth__brand { display: none; }
	.ifad-account__layout { grid-template-columns: 1fr; gap: 22px; }
	.ifad-checkout__grid { grid-template-columns: 1fr; }
}
@media ( max-width: 520px ) {
	.ifad-field-2 { grid-template-columns: 1fr; }
	.ifad-orders-table thead { display: none; }
	.ifad-orders-table,
	.ifad-orders-table tbody,
	.ifad-orders-table tr,
	.ifad-orders-table td { display: block; width: 100%; box-sizing: border-box; }
	.ifad-orders-table tr { border-bottom: 1px solid var(--ifad-line); padding: 6px 0; }
	.ifad-orders-table td { border: 0; display: flex; justify-content: space-between; gap: 16px; padding: 8px 16px; }
	.ifad-orders-table td::before { content: attr(data-label); font-weight: 600; color: var(--ifad-muted); }
}

/* ---------------- Breadcrumbs (account + checkout) ---------------- */
.ifad-account-crumbs { margin: 0 0 20px; font-size: 14px; color: var(--ifad-muted); text-align: left; }
.ifad-account-crumbs a { color: var(--ifad-muted); text-decoration: none; }
.ifad-account-crumbs a:hover { color: var(--ifad-navy); }
.ifad-account-crumbs .sep { margin: 0 6px; opacity: .6; }
.ifad-account-crumbs .current { color: var(--ifad-navy); }
/* Top breathing room so the content doesn't butt against the header.
   Scoped to the account content shell only — NOT every .ifad-container
   (the header/topbar reuse that class). */
.ifad-account-shell { padding-top: 45px; }

/* ---------------- Checkout item spec ---------------- */
.ifad-checkout__item-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ifad-checkout__item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ifad-checkout__item-meta .ifad-cart-item__spec { font-size: 12px; color: var(--ifad-muted); }
.ifad-checkout__item-meta .ifad-cart-item__cert { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ifad-navy); text-decoration: none; }

/* Account pjax nav — fade the content while the next view loads. */
.woocommerce.is-loading { opacity: .45; pointer-events: none; transition: opacity .12s ease; }

/* ---------------- Mobile (account + auth) ---------------- */
@media ( max-width: 700px ) {
	/* Login / register: stack the brand panel above the forms. */
	.ifad-auth { grid-template-columns: 1fr; max-width: 460px; box-shadow: 0 10px 30px rgba(8, 8, 26, .08); }
	.ifad-auth__brand-inner { padding: 28px 24px; }
	.ifad-auth__brand-title { font-size: 24px; }
	.ifad-auth__forms { padding: 26px 22px 30px; }

	/* Forms: name fields and any 2-up rows stack. */
	.ifad-field-2 { grid-template-columns: 1fr; }
	.ifad-account__form { max-width: none; }

	.ifad-account__title { font-size: 24px; }
	.ifad-account__cards { grid-template-columns: repeat(2, 1fr); }
	.ifad-account__layout { grid-template-columns: 1fr; gap: 22px; }
}
@media ( max-width: 420px ) {
	.ifad-account__cards { grid-template-columns: 1fr; }
}
