/* ── Membership Summary Card ── */

.caeps-membership-summary {
	margin-bottom: 2em;
}

.caeps-membership-summary h3 {
	font-size: 1.05em;
	font-weight: 700;
	color: #101E30;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.75em;
}

.caeps-membership-card {
	display: flex;
	align-items: center;
	gap: 1em;
	padding: 1em 1.25em;
	border-radius: 8px;
	margin-bottom: 0.5em;
	border-left: 4px solid;
}

.caeps-membership-card--active {
	background: #f0f7f0;
	border-left-color: #2e7d32;
}

.caeps-membership-card--inactive {
	background: #fef3f2;
	border-left-color: #c00;
}

/* A scheduled successor tier (`delayed`) and a free-tier application awaiting
   verification are neither active nor expired. They were previously not
   rendered at all, so they had no styling; showing them in the red "inactive"
   treatment would read as a problem when nothing is wrong. Blue for "coming",
   amber for "waiting on us". */
.caeps-membership-card--scheduled {
	background: #f2f6fc;
	border-left-color: #1B5A8A;
}

.caeps-membership-card--pending {
	background: #fdf6e8;
	border-left-color: #b8860b;
}

.caeps-membership-card__plan {
	font-weight: 700;
	font-size: 1em;
	color: #101E30;
	min-width: 120px;
}

.caeps-membership-card__details {
	flex: 1;
	display: flex;
	gap: 1.25em;
	flex-wrap: wrap;
}

.caeps-membership-card__status {
	font-weight: 600;
	font-size: 0.9em;
	padding: 0.15em 0.6em;
	border-radius: 4px;
	background: rgba(0,0,0,0.06);
}

.caeps-membership-card--active .caeps-membership-card__status {
	color: #2e7d32;
	background: rgba(46,125,50,0.1);
}

.caeps-membership-card--inactive .caeps-membership-card__status {
	color: #c00;
	background: rgba(204,0,0,0.1);
}

.caeps-membership-card--scheduled .caeps-membership-card__status {
	color: #1B5A8A;
	background: rgba(27,90,138,0.1);
}

.caeps-membership-card--pending .caeps-membership-card__status {
	color: #8a6100;
	background: rgba(184,134,11,0.12);
}

.caeps-membership-card__date {
	font-size: 0.88em;
	color: #4B4C4D;
}

.caeps-membership-card__renew {
	background: #153F67;
	color: #fff !important;
	padding: 0.45em 1em;
	border-radius: 4px;
	font-size: 0.85em;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
}

.caeps-membership-card__renew:hover {
	background: #FCB316;
	color: #153F67 !important;
}

@media (max-width: 600px) {
	.caeps-membership-card {
		flex-direction: column;
		align-items: flex-start;
	}
	.caeps-membership-card__details {
		flex-direction: column;
		gap: 0.3em;
	}
}

/* ── My Info Tab ── */

.caeps-myinfo-form .caeps-myinfo-field {
	margin-bottom: 1.25em;
}

.caeps-myinfo-form label {
	font-weight: 600;
	margin-bottom: 0.3em;
	display: block;
}

.caeps-myinfo-form .required {
	color: #c00;
}

.caeps-myinfo-form input.input-text,
.caeps-myinfo-form textarea.input-text,
.caeps-myinfo-form select {
	width: 100%;
	max-width: 500px;
}

.caeps-myinfo-divider {
	margin: 1.5em 0;
	border: none;
	border-top: 1px solid #e0e0e0;
}

.caeps-myinfo-options {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	margin-top: 0.25em;
}

.caeps-myinfo-options label {
	font-weight: 400;
	display: flex;
	align-items: center;
	gap: 0.5em;
	cursor: pointer;
}

.caeps-myinfo-options input[type="radio"],
.caeps-myinfo-options input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: #153F67;
}

/* ── Addresses section (embedded in My Info) ── */

.caeps-myinfo-addresses {
	margin-top: 2.5em;
	padding-top: 1.5em;
	border-top: 1px solid #e5e5e5;
}

.caeps-myinfo-addresses__heading {
	margin: 0 0 0.4em;
	font-size: 1.05em;
	font-weight: 700;
	color: #101E30;
}

.caeps-myinfo-addresses .woocommerce-Address-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 0.5em;
}

.caeps-myinfo-addresses .woocommerce-Address-title h2,
.caeps-myinfo-addresses .woocommerce-Address-title h3 {
	margin: 0;
	font-size: 1em;
	font-weight: 600;
}

.caeps-myinfo-addresses .woocommerce-Address-title .edit {
	display: inline-block;
	padding: 5px 12px;
	font-size: 0.85em;
	font-weight: 500;
	line-height: 1.4;
	color: #153F67;
	background: transparent;
	border: 1px solid #153F67;
	border-radius: 3px;
	text-decoration: none;
	transition: background 0.12s ease;
}

.caeps-myinfo-addresses .woocommerce-Address-title .edit:hover,
.caeps-myinfo-addresses .woocommerce-Address-title .edit:focus {
	background: #153F67;
	color: #fff;
	outline: 0;
}

.caeps-myinfo-addresses address {
	display: block;
	margin: 0;
	font-style: normal;
	color: #555;
	line-height: 1.5;
}

.caeps-membership-card__badge {
	display: inline-block;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 999px;
	border: 1px solid transparent;
	cursor: help;
}

.caeps-membership-card__badge--warning {
	background: #fef3c7;
	color: #7c2d12;
	border-color: #f59e0b;
}

.caeps-affiliation-editor {
	margin: 16px 0 24px;
	padding: 14px 16px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
}

.caeps-affiliation-editor h3 {
	margin: 0 0 8px;
	font-size: 14px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #6b7280;
}

.caeps-affiliation-editor__readonly {
	margin: 0;
	font-size: 15px;
}

.caeps-affiliation-editor__field label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
	font-size: 13px;
}

.caeps-affiliation-editor__field input[type="text"] {
	width: 100%;
	max-width: 480px;
	padding: 8px 10px;
	font-size: 14px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
}

.caeps-affiliation-editor__hint {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #6b7280;
}

/* ── My Account › Memberships list (DTE-03) ── */

/* The theme gives this table equal fixed-width columns, which left the
   action buttons too narrow for their labels. Actions gets more room,
   taken from Status and Next Bill On, which hold a word each. Desktop
   only: on phones each cell is its own row. */
@media (min-width: 769px) {
	.woocommerce-account .my_account_memberships th.membership-actions {
		width: 24%;
	}
	.woocommerce-account .my_account_memberships th.membership-status {
		width: 12%;
	}
	.woocommerce-account .my_account_memberships th.membership-next-bill-on {
		width: 11%;
	}
}

/* A label that still needs two lines ("Turn renewal reminders back on")
   wraps tidily instead of turning into a tall pill. */
.woocommerce-account .my_account_memberships td.membership-actions .button {
	line-height: 1.3 !important;
	padding-top: 13px;
	padding-bottom: 13px;
	text-align: center;
}

/* The kept join date under this tier's start date. */
.woocommerce-account .my_account_memberships .caeps-member-since {
	display: inline-block;
	margin-top: 2px;
	font-size: 0.85em;
	line-height: 1.3;
	color: #6b7280;
}
