/**
 * Unstoppable Memberships — frontend styles.
 * Lightweight, theme-agnostic, mobile-first.
 *
 * @package Unstoppable_Memberships
 */

.umem-pricing,
.umem-account,
.umem-form,
.umem-checkout,
.umem-restricted,
.umem-login-wrap {
	box-sizing: border-box;
}

.umem-pricing *,
.umem-account *,
.umem-checkout * {
	box-sizing: border-box;
}

/* Buttons ---------------------------------------------------------------- */
.umem-button {
	display: inline-block;
	padding: 10px 20px;
	border: 0;
	border-radius: 6px;
	background: #2563eb;
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease;
}

.umem-button:hover,
.umem-button:focus {
	background: #1d4ed8;
	color: #fff;
}

.umem-button[disabled],
.umem-button.is-disabled {
	background: #9ca3af;
	cursor: not-allowed;
}

.umem-button--ghost {
	background: transparent;
	color: #2563eb;
	border: 1px solid #2563eb;
}

.umem-button--ghost:hover {
	background: #eff4ff;
	color: #1d4ed8;
}

/* Pricing table ---------------------------------------------------------- */
.umem-pricing {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 240px, 1fr ) );
	gap: 20px;
	margin: 24px 0;
}

.umem-plan {
	position: relative;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 28px 24px;
	background: #fff;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.06 );
	display: flex;
	flex-direction: column;
}

.umem-plan-badge {
	position: absolute;
	top: -11px;
	left: 24px;
	background: #2563eb;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 12px;
	border-radius: 10px;
}

.umem-plan-name {
	margin: 0 0 8px;
	font-size: 20px;
}

.umem-plan-price {
	font-size: 30px;
	font-weight: 700;
	margin-bottom: 4px;
	color: #111827;
}

.umem-plan-price .umem-plan-interval {
	font-size: 14px;
	font-weight: 400;
	color: #6b7280;
}

.umem-plan-desc {
	color: #4b5563;
	font-size: 14px;
	margin: 12px 0;
}

.umem-plan-trial {
	font-size: 13px;
	color: #059669;
	margin-bottom: 12px;
}

.umem-plan .umem-button {
	margin-top: auto;
	text-align: center;
}

/* Forms ------------------------------------------------------------------ */
.umem-form {
	max-width: 420px;
	margin: 20px 0;
}

.umem-form-row {
	margin-bottom: 16px;
}

.umem-form-row label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}

.umem-form-row input[type="text"],
.umem-form-row input[type="email"],
.umem-form-row input[type="password"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 15px;
}

.umem-form-row input:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba( 37, 99, 235, 0.15 );
}

.umem-errors {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	border-radius: 6px;
	padding: 12px 14px;
	margin-bottom: 16px;
	font-size: 14px;
}

.umem-errors ul {
	margin: 0;
	padding-left: 18px;
}

/* Account ---------------------------------------------------------------- */
.umem-account {
	margin: 24px 0;
}

.umem-account-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 20px;
}

.umem-account-title {
	margin: 0;
}

.umem-account-section {
	margin-bottom: 32px;
}

.umem-account-subtitle {
	border-bottom: 2px solid #e5e7eb;
	padding-bottom: 8px;
	margin-bottom: 16px;
}

.umem-sub-list {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 260px, 1fr ) );
	gap: 16px;
}

.umem-sub-card {
	border: 1px solid #e5e7eb;
	border-left: 4px solid #2563eb;
	border-radius: 8px;
	padding: 18px;
	background: #fff;
}

.umem-sub-card.is-cancelled,
.umem-sub-card.is-expired { border-left-color: #dc2626; }
.umem-sub-card.is-trial   { border-left-color: #d97706; }
.umem-sub-card.is-paused  { border-left-color: #2c5d8f; }

.umem-sub-card-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.umem-sub-name {
	font-weight: 700;
	font-size: 16px;
}

.umem-sub-meta {
	list-style: none;
	margin: 0;
	padding: 0;
}

.umem-sub-meta li {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	padding: 4px 0;
	border-bottom: 1px solid #f3f4f6;
}

.umem-sub-meta li:last-child {
	border-bottom: 0;
}

.umem-sub-meta-label {
	color: #6b7280;
}

/* Badges (frontend) ------------------------------------------------------ */
.umem-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
	background: #f3f4f6;
	color: #4b5563;
}

.umem-badge--is-active,
.umem-badge--completed,
.umem-badge--succeeded { background: #dcfce7; color: #166534; }

.umem-badge--is-trial,
.umem-badge--pending { background: #fef3c7; color: #92400e; }

.umem-badge--is-cancelled,
.umem-badge--is-expired,
.umem-badge--failed { background: #fee2e2; color: #991b1b; }

.umem-badge--is-paused { background: #e0ecfb; color: #1e4d7b; }

/* Tables ----------------------------------------------------------------- */
.umem-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.umem-table th,
.umem-table td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid #e5e7eb;
}

.umem-table thead th {
	background: #f9fafb;
	font-weight: 600;
}

/* Restricted message ----------------------------------------------------- */
.umem-restricted {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 28px;
	text-align: center;
	background: #f9fafb;
	margin: 20px 0;
}

.umem-restricted-message {
	font-size: 16px;
	color: #374151;
	margin-bottom: 16px;
}

/* Notices ---------------------------------------------------------------- */
.umem-notice {
	background: #f3f4f6;
	border-radius: 6px;
	padding: 12px 14px;
	color: #4b5563;
}

.umem-logout-link {
	font-size: 14px;
}

/* Checkout --------------------------------------------------------------- */
.umem-checkout {
	max-width: 480px;
	margin: 24px 0;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 28px;
	background: #fff;
}

.umem-checkout-summary {
	display: flex;
	justify-content: space-between;
	font-size: 18px;
	font-weight: 600;
	padding: 12px 0;
	border-bottom: 2px solid #e5e7eb;
	margin-bottom: 20px;
}

@media screen and ( max-width: 600px ) {
	.umem-account-header {
		flex-direction: column;
		align-items: flex-start;
	}
}
