/* ============================================================
   Mito Loyalty Points — Frontend & Admin Styles
   ============================================================ */

/* ── Variables ───────────────────────────────────────────── */
:root {
	--mito-primary:   #2d5740;
	--mito-primary-h: #1e3a2f;
	--mito-accent:    #f5a623;
	--mito-error:     #c0392b;
	--mito-success:   #27ae60;
	--mito-info:      #2980b9;
	--mito-border:    #e0e0e0;
	--mito-bg:        #f8f9fa;
	--mito-radius:    12px;
	--mito-shadow:    0 8px 24px rgba(0,0,0,.10);
}

/* ── Wrapper ──────────────────────────────────────────────── */
.mito-loyalty-wrap {
	max-width: 560px;
	margin: 32px auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Claim Card ───────────────────────────────────────────── */
.mito-claim-card {
	background: #fff;
	border-radius: var(--mito-radius);
	box-shadow: var(--mito-shadow);
	padding: 40px 36px;
	text-align: center;
	margin-bottom: 24px;
}

.mito-claim-icon {
	font-size: 52px;
	line-height: 1;
	margin-bottom: 12px;
}

.mito-claim-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--mito-primary);
	margin: 0 0 8px;
}

.mito-claim-subtitle {
	color: #666;
	margin: 0 0 20px;
	font-size: 15px;
}

/* ── Code Display ─────────────────────────────────────────── */
.mito-code-display {
	background: var(--mito-bg);
	border: 1px solid var(--mito-border);
	border-radius: 8px;
	padding: 12px 16px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

.mito-code-label {
	color: #555;
	font-size: 14px;
}

.mito-code-value {
	font-family: "Courier New", monospace;
	font-size: 16px;
	font-weight: 700;
	color: var(--mito-primary);
	background: none;
	border: none;
	padding: 0;
	letter-spacing: 2px;
}

/* ── Balance Strip ────────────────────────────────────────── */
.mito-balance-strip {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #edf8f0;
	border: 1px solid #b2dfcc;
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 20px;
	font-size: 14px;
	color: var(--mito-primary);
	font-weight: 600;
}

.mito-balance-icon {
	font-size: 20px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.mito-btn {
	display: inline-block;
	padding: 13px 28px;
	background: linear-gradient(135deg, var(--mito-primary), #3d7a57);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	text-decoration: none;
	transition: background .2s, transform .1s, box-shadow .2s;
	box-shadow: 0 4px 12px rgba(45,87,64,.30);
	width: 100%;
	text-align: center;
	box-sizing: border-box;
}

.mito-btn:hover {
	background: linear-gradient(135deg, var(--mito-primary-h), #2d5740);
	box-shadow: 0 6px 16px rgba(45,87,64,.40);
	color: #fff;
}

.mito-btn:active {
	transform: scale(.98);
}

.mito-btn:disabled {
	opacity: .55;
	cursor: not-allowed;
}

.mito-btn-secondary {
	background: linear-gradient(135deg, #555, #333);
	box-shadow: 0 4px 12px rgba(0,0,0,.20);
}

.mito-btn-secondary:hover {
	background: linear-gradient(135deg, #333, #111);
}

/* ── Alerts ───────────────────────────────────────────────── */
.mito-alert {
	border-radius: 8px;
	padding: 14px 16px;
	margin-bottom: 16px;
	font-size: 14px;
	line-height: 1.6;
	text-align: left;
}

.mito-alert-info {
	background: #e8f4fd;
	border: 1px solid #bde0f9;
	color: var(--mito-info);
}

.mito-alert-success {
	background: #eafaf1;
	border: 1px solid #a9dfbf;
	color: var(--mito-success);
}

.mito-alert-error {
	background: #fdecea;
	border: 1px solid #f5c6cb;
	color: var(--mito-error);
}

/* ── Claim note ───────────────────────────────────────────── */
.mito-claim-note {
	margin-top: 12px;
	font-size: 12px;
	color: #999;
}

.mito-register-link {
	margin-top: 12px;
	font-size: 13px;
	color: #666;
}

/* ── Manual code entry ────────────────────────────────────── */
.mito-manual-entry {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 4px;
}

.mito-code-input {
	width: 100%;
	padding: 14px 16px;
	font-size: 18px;
	font-family: "Courier New", monospace;
	letter-spacing: 3px;
	text-align: center;
	border: 2px solid var(--mito-border);
	border-radius: 8px;
	outline: none;
	text-transform: uppercase;
	transition: border-color .2s, box-shadow .2s;
	box-sizing: border-box;
}

.mito-code-input:focus {
	border-color: var(--mito-primary);
	box-shadow: 0 0 0 3px rgba(45,87,64,.15);
}

/* ── Points Summary Card ──────────────────────────────────── */
.mito-points-summary {
	background: #fff;
	border-radius: var(--mito-radius);
	box-shadow: var(--mito-shadow);
	padding: 28px 32px;
	text-align: center;
}

.mito-points-summary h3 {
	margin: 0 0 16px;
	color: var(--mito-primary);
	font-size: 18px;
}

.mito-points-display {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 8px;
	margin-bottom: 8px;
}

.mito-points-count {
	font-size: 56px;
	font-weight: 800;
	color: var(--mito-primary);
	line-height: 1;
}

.mito-points-label {
	font-size: 18px;
	color: #888;
	font-weight: 500;
}

.mito-points-value {
	color: #666;
	font-size: 14px;
	margin-bottom: 16px;
}

/* ── Checkout: compact points notice (top of billing section) ── */
.mito-checkout-notice {
	display: flex;
	align-items: center;
	gap: 14px;
	background: linear-gradient(135deg, #f0fdf4, #e6f7ee);
	border: 1px solid #a7d7b8;
	border-radius: 10px;
	padding: 14px 18px;
	margin-bottom: 24px;
}

.mito-checkout-notice__icon {
	font-size: 28px;
	line-height: 1;
	flex-shrink: 0;
}

.mito-checkout-notice__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mito-checkout-notice__title {
	font-size: 14px;
	font-weight: 700;
	color: var(--mito-primary);
	line-height: 1.3;
}

.mito-checkout-notice__sub {
	font-size: 12px;
	color: #5a7a66;
}

.mito-checkout-notice__badge {
	background: var(--mito-primary);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 20px;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ── Checkout: redeem toggle card (before Place Order) ─────── */
.mito-redeem-section {
	background: #fff;
	border: 1.5px solid #b2dfcc;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 16px;
	box-shadow: 0 2px 8px rgba(45,87,64,.06);
}

.mito-redeem-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e8f3ed;
}

.mito-redeem-icon {
	font-size: 20px;
	line-height: 1;
}

.mito-redeem-heading {
	font-size: 15px;
	font-weight: 700;
	color: var(--mito-primary);
	margin: 0;
}

/* Balance pill */
.mito-redeem-balance-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
}

.mito-redeem-pts {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #edf8f0;
	border: 1px solid #b2dfcc;
	border-radius: 20px;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 700;
	color: var(--mito-primary);
}

.mito-redeem-sep {
	color: #ccc;
	font-size: 10px;
}

.mito-redeem-val {
	font-size: 12px;
	color: #666;
}

/* Toggle row */
.mito-redeem-toggle-label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	background: #f7fdf9;
	border: 1px solid #d4edda;
	border-radius: 8px;
	cursor: pointer;
	transition: background .15s, border-color .15s;
	margin-bottom: 0;
}

.mito-redeem-toggle-label:hover {
	background: #ecf9f0;
	border-color: #a7d7b8;
}

.mito-redeem-toggle-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	min-width: 18px;
	accent-color: var(--mito-primary);
	cursor: pointer;
	margin: 0;
}

.mito-redeem-toggle-text {
	flex: 1;
	font-size: 13px;
	font-weight: 600;
	color: #333;
	line-height: 1.4;
}

.mito-redeem-toggle-text strong {
	color: var(--mito-primary);
}

/* Savings highlight on the right of the toggle */
.mito-redeem-toggle-savings {
	font-size: 13px;
	font-weight: 700;
	color: var(--mito-success);
	white-space: nowrap;
}

/* Applied confirmation strip */
.mito-redeem-applied {
	display: none;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 9px 14px;
	background: #eafaf1;
	border: 1px solid #a9dfbf;
	border-radius: 8px;
	font-size: 13px;
	color: var(--mito-success);
	font-weight: 600;
}

.mito-redeem-applied--visible {
	display: flex;
}

.mito-redeem-tick {
	font-size: 15px;
}

/* Footer note */
.mito-redeem-note {
	margin: 10px 0 0;
	font-size: 11px;
	color: #999;
	text-align: center;
}

/* ── Order confirmation: loyalty used section ──────────────── */
.mito-order-loyalty {
	margin-top: 24px;
	padding: 16px 20px;
	background: #f4fbf6;
	border: 1px solid #b2dfcc;
	border-radius: 10px;
}

.mito-order-loyalty-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--mito-primary);
	margin: 0 0 12px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.mito-order-loyalty-title::before {
	content: '🎁';
	font-size: 16px;
}

/* ── Admin order loyalty meta ─────────────────────────────── */
.mito-admin-order-loyalty {
	margin-top: 8px;
	padding: 8px 12px;
	background: #f4fbf6;
	border: 1px solid #b2dfcc;
	border-radius: 6px;
	font-size: 13px;
	color: #333;
}

.mito-admin-order-discount {
	margin-left: 6px;
	color: var(--mito-success);
	font-weight: 600;
}

/* ── Order confirmation ───────────────────────────────────── */
.mito-order-loyalty {
	margin-top: 24px;
}

/* ── Admin: Stat Cards ────────────────────────────────────── */
.mito-admin-stats {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin: 16px 0 28px;
}

.mito-stat-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 10px;
	padding: 20px 24px;
	text-align: center;
	min-width: 140px;
	flex: 1;
	box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.mito-stat-card .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: var(--mito-primary);
	margin-bottom: 8px;
}

.mito-stat-value {
	font-size: 30px;
	font-weight: 800;
	color: var(--mito-primary);
	line-height: 1.1;
}

.mito-stat-label {
	font-size: 12px;
	color: #888;
	margin-top: 4px;
}

/* ── Admin: Type Badges ───────────────────────────────────── */
.mito-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: capitalize;
}

.mito-badge-claim  { background: #eafaf1; color: #1e7e34; }
.mito-badge-redeem { background: #fff3cd; color: #856404; }
.mito-badge-adjust { background: #e8f4fd; color: #0c5460; }
.mito-badge-refund { background: #fdecea; color: #721c24; }

/* ── Progress Steps ───────────────────────────────────────── */
.mito-progress {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 28px;
	max-width: 500px;
	padding: 0 8px;
}

.mito-progress-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.mito-progress-step span {
	font-size: 11px;
	color: #aaa;
	font-weight: 500;
	letter-spacing: .02em;
	text-transform: uppercase;
}

.mito-progress-dot {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #e8e8e8;
	color: #aaa;
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .3s, color .3s;
}

.mito-progress-step.active .mito-progress-dot {
	background: var(--mito-primary);
	color: #fff;
	box-shadow: 0 0 0 4px rgba(45,87,64,.18);
}

.mito-progress-step.active span {
	color: var(--mito-primary);
	font-weight: 700;
}

.mito-progress-step.done .mito-progress-dot {
	background: var(--mito-success);
	color: #fff;
}

.mito-progress-step.done span {
	color: var(--mito-success);
}

.mito-progress-line {
	flex: 1;
	height: 2px;
	background: #e8e8e8;
	margin: 0 4px;
	margin-bottom: 17px;
	transition: background .3s;
}

/* ── Spinner ──────────────────────────────────────────────── */
.mito-spin-wrap {
	display: flex;
	justify-content: center;
	margin-bottom: 16px;
}

.mito-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid #e8e8e8;
	border-top-color: var(--mito-primary);
	border-radius: 50%;
	animation: mito-spin 0.75s linear infinite;
}

@keyframes mito-spin {
	to { transform: rotate(360deg); }
}

/* ── Step icon ────────────────────────────────────────────── */
.mito-step-icon {
	font-size: 52px;
	line-height: 1;
	margin-bottom: 12px;
}



.mito-step-icon img, .mito-loyality-btn img {
	height:100px !important;
}

/* ── Points preview (claim step) ──────────────────────────── */
.mito-points-preview {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: linear-gradient(135deg, #f0fdf4, #e6f7ee);
	border: 1px solid #a7d7b8;
	border-radius: 12px;
	padding: 20px 24px;
	margin-bottom: 20px;
	gap: 4px;
}

.mito-pts-earned {
	font-size: 52px;
	font-weight: 800;
	color: var(--mito-primary);
	line-height: 1;
}

.mito-pts-label {
	font-size: 14px;
	color: #5a7a66;
	font-weight: 500;
}

.mito-pts-value {
	font-size: 13px;
	color: #888;
	margin-top: 2px;
}

/* ── Success animation ────────────────────────────────────── */
.mito-success-animation {
	position: relative;
	display: flex;
	justify-content: center;
	margin-bottom: 16px;
}

.mito-checkmark {
	width: 72px;
	height: 72px;
}

.mito-checkmark-svg {
	width: 72px;
	height: 72px;
}

.mito-checkmark-circle {
	stroke: var(--mito-success);
	stroke-width: 2;
	stroke-dasharray: 166;
	stroke-dashoffset: 166;
	stroke-linecap: round;
	animation: mito-stroke 0.6s cubic-bezier(.65,0,.45,1) forwards;
}

.mito-checkmark-check {
	stroke: var(--mito-success);
	stroke-width: 2.5;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	stroke-linecap: round;
	stroke-linejoin: round;
	animation: mito-stroke 0.4s cubic-bezier(.65,0,.45,1) 0.55s forwards;
}

@keyframes mito-stroke {
	100% { stroke-dashoffset: 0; }
}

.mito-success-title {
	color: var(--mito-success);
}

.mito-success-msg {
	color: #555;
	font-size: 15px;
	line-height: 1.6;
	margin-bottom: 16px;
}

/* ── New balance display ──────────────────────────────────── */
.mito-new-balance-wrap {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 8px;
	background: #eafaf1;
	border: 1px solid #a9dfbf;
	border-radius: 10px;
	padding: 16px 20px;
	margin-bottom: 4px;
}

.mito-new-balance-label {
	font-size: 13px;
	color: #5a7a66;
	font-weight: 500;
}

.mito-new-balance-count {
	font-size: 40px;
	font-weight: 800;
	color: var(--mito-primary);
	line-height: 1;
}

.mito-new-balance-unit {
	font-size: 16px;
	color: #5a7a66;
}

/* ── Confetti ─────────────────────────────────────────────── */
.mito-confetti {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 200px;
	height: 100px;
	pointer-events: none;
	overflow: visible;
}

.mito-confetti-piece {
	position: absolute;
	top: 0;
	display: block;
	animation: mito-confetti-fall 1s ease-in forwards;
	opacity: 0;
}

@keyframes mito-confetti-fall {
	0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
	100% { transform: translateY(120px) rotate(360deg); opacity: 0; }
}

/* ── History page ─────────────────────────────────────────── */
.mito-history-wrap {
	max-width: 820px;
	/*margin: 32px auto; */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mito-history-login-prompt {
	text-align: center;
	background: #fff;
	border-radius: var(--mito-radius);
	box-shadow: var(--mito-shadow);
	padding: 48px 36px;
}

.mito-history-icon {
	font-size: 48px;
	margin-bottom: 12px;
}

.mito-history-header {
	background: #fff;
	border-radius: var(--mito-radius);
	box-shadow: var(--mito-shadow);
	padding: 28px 32px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

.mito-history-title {
	font-size: 22px;
	font-weight: 700;
	color: var(--mito-primary);
	margin: 0;
}

.mito-history-balance {
	display: flex;
	align-items: baseline;
	gap: 6px;
	background: linear-gradient(135deg, #f0fdf4, #e6f7ee);
	border: 1px solid #a7d7b8;
	border-radius: 10px;
	padding: 10px 18px;
}

.mito-history-balance-pts {
	font-size: 32px;
	font-weight: 800;
	color: var(--mito-primary);
	line-height: 1;
}

.mito-history-balance-label {
	font-size: 14px;
	color: #5a7a66;
	font-weight: 600;
}

.mito-history-balance-value {
	font-size: 13px;
	color: #888;
	margin-left: 4px;
}

.mito-history-empty {
	text-align: center;
	background: #fff;
	border-radius: var(--mito-radius);
	box-shadow: var(--mito-shadow);
	padding: 48px 36px;
	color: #666;
}

.mito-history-table-wrap {
	background: #fff;
	border-radius: var(--mito-radius);
	box-shadow: var(--mito-shadow);
	overflow: hidden;
}

.mito-history-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.mito-history-table thead tr {
	background: var(--mito-primary);
	color: #fff;
}

.mito-history-table thead th {
	padding: 12px 16px;
	font-weight: 600;
	text-align: left;
	font-size: 13px;
	letter-spacing: .3px;
}

.mito-history-table tbody tr {
	border-bottom: 1px solid #f0f0f0;
	transition: background .12s;
}

.mito-history-table tbody tr:last-child {
	border-bottom: none;
}

.mito-history-table tbody tr:hover {
	background: #f7fdf9;
}

.mito-history-table tbody td {
	padding: 12px 16px;
	vertical-align: middle;
}

/* Transaction type badge */
.mito-tx-badge {
	display: inline-block;
	border-radius: 20px;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 700;
	text-transform: capitalize;
}

.mito-tx-claim  { background: #eafaf1; color: #1e7e34; }
.mito-tx-redeem { background: #fff3cd; color: #856404; }
.mito-tx-adjust { background: #e8f4fd; color: #0c5460; }
.mito-tx-refund { background: #fdecea; color: #721c24; }

.mito-tx-code {
	font-family: 'Courier New', Courier, monospace;
	font-size: 13px;
	color: #444;
	letter-spacing: .5px;
}

.mito-tx-points {
	font-weight: 700;
	font-size: 15px;
}

.mito-tx-credit { color: var(--mito-success); }
.mito-tx-debit  { color: var(--mito-error); }

.mito-tx-date {
	color: #777;
	font-size: 13px;
	white-space: nowrap;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
	.mito-claim-card,
	.mito-points-summary {
		padding: 28px 20px;
	}

	.mito-points-count {
		font-size: 44px;
	}

	.mito-admin-stats {
		flex-direction: column;
	}

	.mito-redeem-input-row {
		flex-wrap: wrap;
	}

	.mito-progress-step span {
		font-size: 9px;
	}

	.mito-progress-dot {
		width: 26px;
		height: 26px;
		font-size: 11px;
	}

	.mito-pts-earned,
	.mito-new-balance-count {
		font-size: 40px;
	}

	.mito-history-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.mito-history-table thead {
		display: none;
	}

	.mito-history-table tbody tr {
		display: block;
		padding: 12px 16px;
		border-bottom: 1px solid #eee;
	}

	.mito-history-table tbody td {
		display: flex;
		justify-content: space-between;
		padding: 4px 0;
	}

	.mito-history-table tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #555;
		font-size: 12px;
		text-transform: uppercase;
		letter-spacing: .3px;
	}
}
