/**
 * Public-facing styles for Genex Subscription.
 */

/* ===================== Subscription Box (Product Page) ===================== */
.genex-subscription-box {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 15px;
	margin: 15px 0;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #f9fafb;
}
.genex-subscription-box label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.15s;
}
.genex-subscription-box label:hover {
	background: #e5e7eb;
}
.genex-subscription-box input[type="radio"]:checked + span,
.genex-subscription-box label:has(input:checked) {
	background: #e0f2fe;
	font-weight: 500;
}

/* ===================== Subscription Status Badges ===================== */
.genex-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: capitalize;
}
.genex-status-active { background: #dcfce7; color: #16a34a; }
.genex-status-paused { background: #fef3c7; color: #d97706; }
.genex-status-cancelled { background: #fecaca; color: #dc2626; }
.genex-status-failed { background: #fde68a; color: #92400e; }
.genex-status-pending { background: #e0e7ff; color: #4338ca; }
.genex-status-expired { background: #f3f4f6; color: #6b7280; }
.genex-status-skipped { background: #f3e8ff; color: #7c3aed; }
.genex-status-completed { background: #dcfce7; color: #16a34a; }

/* ===================== Subscriptions Table (My Account) ===================== */
.genex-subs-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
}
.genex-subs-table thead th {
	background: #f9fafb;
	padding: 12px 14px;
	text-align: left;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	border-bottom: 2px solid #e5e7eb;
}
.genex-subs-table tbody td {
	padding: 12px 14px;
	font-size: 13px;
	color: #374151;
	border-bottom: 1px solid #f3f4f6;
}
.genex-subs-table tbody tr:hover {
	background: #f9fafb;
}

/* ===================== Subscription Detail ===================== */
.genex-sub-detail {
	margin-top: 15px;
}
.genex-detail-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}
.genex-detail-table th {
	text-align: left;
	padding: 10px 14px;
	background: #f9fafb;
	font-size: 13px;
	font-weight: 500;
	color: #6b7280;
	width: 35%;
	border-bottom: 1px solid #e5e7eb;
}
.genex-detail-table td {
	padding: 10px 14px;
	font-size: 13px;
	color: #374151;
	border-bottom: 1px solid #f3f4f6;
}

/* ===================== Action Buttons ===================== */
.genex-sub-actions {
	display: flex;
	gap: 10px;
	margin-top: 15px;
	flex-wrap: wrap;
}
.genex-action-btn {
	cursor: pointer;
	transition: opacity 0.15s;
}
.genex-action-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
.genex-cancel-btn {
	color: #dc2626 !important;
	border-color: #fecaca !important;
}
.genex-cancel-btn:hover {
	background: #fef2f2 !important;
}

/* ===================== Payment Methods ===================== */
.genex-payment-methods {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 10px;
}
.genex-pm-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 18px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
}
.genex-pm-info {
	display: flex;
	gap: 15px;
	align-items: center;
}
.genex-pm-brand {
	font-weight: 600;
	color: #111827;
	text-transform: uppercase;
	font-size: 13px;
}
.genex-pm-last4 {
	font-family: monospace;
	font-size: 14px;
	color: #374151;
	letter-spacing: 1px;
}
.genex-pm-exp {
	font-size: 12px;
	color: #9ca3af;
}
.genex-pm-actions {
	display: flex;
	gap: 8px;
}
.genex-pm-default {
	border-color: #22c55e;
	background: #f0fdf4;
}
.genex-pm-default-badge,
.genex-card-default-badge {
	display: inline-block;
	background: #22c55e;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.genex-saved-card-default {
	border: 2px solid #22c55e;
	border-radius: 6px;
	background: #f0fdf4;
}

/* ===================== Response Messages ===================== */
.genex-success {
	background: #dcfce7;
	color: #16a34a;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
}
.genex-error {
	background: #fecaca;
	color: #dc2626;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
}

/* ===================== No Subscriptions ===================== */
.genex-no-subs {
	color: #6b7280;
	font-size: 14px;
	margin-bottom: 15px;
}

/* ===================== Checkout: Saved Card Selection ===================== */
.genex-checkout-saved-cards {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 12px;
}
.genex-saved-card-option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.genex-saved-card-option:hover {
	border-color: #93c5fd;
	background: #f0f9ff;
}
.genex-saved-card-option input[type="radio"] {
	margin: 0;
	accent-color: #0E7490;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}
.genex-saved-card-option input[type="radio"]:checked ~ .genex-card-info {
	font-weight: 500;
}
/* Highlight selected card */
.genex-saved-card-option:has(input:checked) {
	border-color: #0E7490;
	background: #ecfeff;
}
.genex-card-info {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.genex-card-brand {
	font-weight: 600;
	font-size: 13px;
	color: #111827;
	text-transform: uppercase;
	min-width: 50px;
}
.genex-card-number {
	font-family: monospace;
	font-size: 14px;
	color: #374151;
	letter-spacing: 0.5px;
}
.genex-card-expiry {
	font-size: 12px;
	color: #9ca3af;
}
.genex-new-card-option .genex-card-brand {
	text-transform: none;
	font-size: 14px;
	color: #0E7490;
}
#genex-new-card-wrapper {
	margin-top: 4px;
}

/* ===================== Add Card Section ===================== */
.genex-add-card-section h4 {
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 10px;
	color: #111827;
}
