/* MH RideShare — public, mobile-first. All colors come from admin-set CSS
   custom properties (see mh-rideshare.php inline style) so this file itself
   never hardcodes brand colors. */

.mh-app { max-width: 480px; margin: 0 auto; padding: 16px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--mh-text, #16241b); }
.mh-app * { box-sizing: border-box; }

.mh-card { background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.mh-h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 14px; color: var(--mh-secondary, #0f2c1f); }
.mh-muted { color: #666; font-size: 0.9rem; }

.mh-form .mh-field { margin-bottom: 14px; }
.mh-form label { display: block; font-size: 0.8rem; font-weight: 700; margin-bottom: 6px; }
.mh-form input, .mh-form select, .mh-form textarea {
	width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.15);
	font-size: 16px; /* prevents iOS zoom on focus */
}

.mh-avatar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mh-avatar-circle { width: 56px; height: 56px; border-radius: 50%; background: #f2f2f2; border: 1.5px dashed rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 1.4rem; flex-shrink: 0; }
.mh-avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

.mh-btn-primary, .mh-btn-outline {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: 12px 20px; border-radius: 12px; font-weight: 700; font-size: 0.95rem;
	border: none; cursor: pointer; text-decoration: none;
}
.mh-btn-primary { background: var(--mh-primary, #1f4a34); color: #fff; }
.mh-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.mh-btn-outline { background: transparent; border: 1.5px solid var(--mh-primary, #1f4a34); color: var(--mh-primary, #1f4a34); }
.mh-btn-block { width: 100%; }
.mh-btn-sm { min-height: 36px; padding: 8px 14px; font-size: 0.8rem; }

.mh-error { color: #a33; font-size: 0.85rem; margin: 8px 0; min-height: 1em; }
.mh-success { color: #1f6b3a; font-size: 0.9rem; margin: 8px 0; }
.mh-notice { background: #fdf5e3; border: 1px solid #ecd48f; color: #7a5b0a; border-radius: 12px; padding: 12px 14px; font-size: 0.85rem; margin: 12px 0; }

.mh-map { height: 220px; border-radius: 14px; margin-bottom: 14px; background: #e8e4d4; }

.mh-fare-box { background: var(--mh-secondary, #0f2c1f); color: #fff; border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.mh-fare-row { display: flex; justify-content: space-between; align-items: baseline; }
.mh-fare-row strong { color: var(--mh-accent, #f5a623); font-size: 1.4rem; }
.mh-fare-sub { font-size: 0.78rem; opacity: 0.75; margin-top: 4px; }

.mh-status-strip { display: flex; align-items: center; gap: 10px; background: var(--mh-bg, #f7f0de); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-weight: 600; font-size: 0.88rem; }
.mh-pulse { width: 8px; height: 8px; border-radius: 50%; background: #3fae5c; animation: mh-pulse 1.4s ease-in-out infinite; flex-shrink: 0; }
@keyframes mh-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .mh-pulse { animation: none; } }

.mh-req-card { background: var(--mh-bg, #f7f0de); border-radius: 12px; padding: 13px 15px; margin-bottom: 10px; }
.mh-req-top { display: flex; justify-content: space-between; font-weight: 700; font-size: 0.9rem; }
.mh-req-sub { font-size: 0.78rem; color: #666; margin-top: 4px; }
.mh-req-actions { display: flex; gap: 8px; margin-top: 10px; }
.mh-req-actions button { flex: 1; min-height: 40px; border: none; border-radius: 9px; font-weight: 700; font-size: 0.82rem; }
.mh-btn-accept { background: var(--mh-primary, #1f4a34); color: #fff; }
.mh-btn-decline { background: transparent; border: 1px solid rgba(0,0,0,0.15) !important; color: #666; }

.mh-earn-card { background: var(--mh-secondary, #0f2c1f); color: #fff; border-radius: 12px; padding: 15px; margin-bottom: 14px; }
.mh-earn-amt { font-size: 1.4rem; font-weight: 700; }
.mh-earn-lbl { font-size: 0.75rem; opacity: 0.7; margin-top: 4px; }

.mh-toggle-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mh-switch { width: 46px; height: 26px; border-radius: 999px; background: #ccc; position: relative; cursor: pointer; flex-shrink: 0; transition: background 0.2s; }
.mh-switch.on { background: var(--mh-primary, #1f4a34); }
.mh-switch::after { content: ''; position: absolute; width: 20px; height: 20px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: left 0.2s; }
.mh-switch.on::after { left: 23px; }

.mh-receipt { background: var(--mh-secondary, #0f2c1f); color: #fff; border-radius: 12px; padding: 16px; }
.mh-star-input { display: flex; gap: 6px; margin: 12px 0; }
.mh-star-input span { font-size: 1.9rem; cursor: pointer; color: #ddd; }
.mh-star-input span.filled { color: var(--mh-accent, #f5a623); }

.mh-badge { padding: 4px 10px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; }
.mh-badge-approved { background: #dcefdf; color: #1f6b3a; }
.mh-badge-pending { background: #fdeecb; color: #946a10; }

.mh-pm-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.08); font-size: 0.88rem; }
.mh-pm-row > span:first-child { flex: 1; }

.mh-stripe-element { padding: 12px 14px; border: 1px solid rgba(0,0,0,0.15); border-radius: 10px; background: #fff; }

.mh-review { border-bottom: 1px solid rgba(0,0,0,0.08); padding: 12px 0; }
.mh-stars { color: var(--mh-accent, #f5a623); }

/* ---------------------------------------------------------------------
   Book a Ride desktop layout. Mobile keeps the original single-column,
   sticky-bottom-button flow untouched; above 960px it becomes a proper
   two-column website layout instead of a narrow mobile card floating in
   empty space -- map/form on the left, a sticky trip summary + payment
   on the right.
--------------------------------------------------------------------- */
.mh-app-wide { max-width: 480px; } /* same as mobile default until the breakpoint below */
.mh-ride-layout { display: block; }
.mh-h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; color: var(--mh-secondary, #0f2c1f); }

.mh-payment-summary-row {
	display: flex; align-items: center; gap: 8px;
	background: var(--mh-bg, #f7f0de); border-radius: 10px; padding: 10px 12px; margin: 12px 0;
	font-size: 0.85rem;
}
.mh-payment-summary-label { color: #666; }
.mh-payment-summary-value { font-weight: 700; flex: 1; }
.mh-link-btn { background: none; border: none; color: var(--mh-primary, #1f4a34); font-weight: 700; font-size: 0.8rem; cursor: pointer; text-decoration: underline; padding: 0; }
.mh-account-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 0.85rem; }

.mh-add-payment-section { animation: mh-fade-in 0.3s ease; scroll-margin-top: 100px; }
@keyframes mh-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .mh-add-payment-section { animation: none; } }

@media (min-width: 960px) {
	.mh-app-wide { max-width: 1100px; }
	.mh-ride-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
	.mh-ride-summary { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
	.mh-map { height: 320px; }
	.mh-sticky-cta { position: static; background: none; padding-top: 0; margin-top: 10px; }
}

/* sticky bottom action bar on mobile for the primary CTA */
.mh-sticky-cta { position: sticky; bottom: 0; background: #fff; padding-top: 10px; margin-top: 6px; }

@media (min-width: 700px) {
	.mh-app { max-width: 640px; }
	#mh-book-ride-root { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
}
