/* Manapandal website: base, calendar, forms and tables. Colours, fonts and radius come from the --mp-* variables that the plugin sets
   from Settings > Website (style Mangalam, Malligai or Minimal). Nothing here is specific to one hall. */
.mp { --mp-free: #1f6b3f; --mp-held: #8a5a00; --mp-held-alt: #a8700f; --mp-booked: #9a2b2b; color: var(--mp-ink, inherit); font-family: var(--mp-font-body, inherit); font-size: 1rem; line-height: 1.6; text-align: left; }
.mp *, .mp *::before, .mp *::after { box-sizing: border-box; }
.mp h2, .mp h3, .mp h4 { font-family: var(--mp-font-heading, inherit); color: var(--mp-primary, inherit); line-height: 1.25; letter-spacing: 0; }
.mp a { color: var(--mp-primary, inherit); text-underline-offset: 3px; }
.mp :focus-visible { outline: 3px solid var(--mp-primary, #7a1f2b); outline-offset: 2px; }
.mp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mp-app { max-width: 960px; margin: 0 auto 1.5em; }
.mp-loading { color: var(--mp-muted, #666); }
.mp-error { color: var(--mp-booked); font-weight: 600; }
.mp-note { margin: 8px 0 0; font-size: 0.875rem; color: var(--mp-muted, #666); }
.mp-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Buttons */
.mp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; font: inherit; font-weight: 700; text-decoration: none; color: var(--mp-on-action, #fff); background: var(--mp-action, #7a1f2b); border: 2px solid var(--mp-action, #7a1f2b); border-radius: var(--mp-radius-sm, 6px); cursor: pointer; transition: background-color .15s, color .15s; }
.mp a.mp-btn { color: var(--mp-on-action, #fff); }
.mp-btn:hover { background: var(--mp-primary-soft, #f3e6e8); color: var(--mp-primary, #7a1f2b); }
.mp a.mp-btn:hover { color: var(--mp-primary, #7a1f2b); }
.mp-btn--alt { background: var(--mp-accent, #b08a3e); border-color: var(--mp-accent, #b08a3e); color: var(--mp-on-accent, #1a1a1a); }
.mp a.mp-btn--alt { color: var(--mp-on-accent, #1a1a1a); }
.mp-btn--ghost, .mp a.mp-btn--ghost { background: transparent; color: var(--mp-primary, #7a1f2b); }
.mp-btn--ghost:hover { background: var(--mp-primary, #7a1f2b); }
.mp a.mp-btn--ghost:hover { color: var(--mp-on-primary, #fff); }
.mp-btn--text, .mp a.mp-btn--text { background: transparent; border-color: transparent; color: var(--mp-primary, #7a1f2b); text-decoration: underline; padding: 0 8px; }
.mp-btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.mp-btn:disabled { opacity: 0.6; cursor: wait; }
.mp-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Calendar */
.mp-monthbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mp-monthbar strong { font-family: var(--mp-font-heading, inherit); font-size: 1.125rem; color: var(--mp-primary, inherit); }
.mp-monthbar button { min-width: 44px; min-height: 44px; font-size: 1.5em; line-height: 1; background: var(--mp-primary, #7a1f2b); color: var(--mp-on-primary, #fff); border: 0; border-radius: var(--mp-radius-sm, 6px); cursor: pointer; }
.mp-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mp-weekday { padding: 4px 0; font-size: 0.8125rem; font-weight: 700; text-align: center; color: var(--mp-muted, #666); }
.mp-day { position: relative; display: block; min-height: 68px; padding: 4px; color: inherit; text-decoration: none; background: var(--mp-surface, #fff); border: 1px solid var(--mp-line, rgba(0, 0, 0, 0.14)); border-radius: var(--mp-radius-sm, 6px); }
.mp a.mp-day:hover { border-color: var(--mp-primary, #7a1f2b); background: var(--mp-primary-soft, #f3e6e8); }
.mp-day--blank { background: transparent; border: 0; }
.mp-day--past { opacity: 0.55; }
.mp-daynum { font-weight: 700; }
.mp-star { position: absolute; top: 2px; right: 5px; color: var(--mp-accent-ink, #7a5a14); }
.mp-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 0.875rem; }
.mp-mini .mp-day { min-height: 46px; }
/* Availability: each date is split into one part for each partial session (default: left Morning, right Evening). No letters; colour plus a pattern. */
.mp-parts { display: flex; gap: 2px; margin-top: 4px; }
.mp-part { display: block; flex: 1 1 0; min-width: 0; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 3px; text-decoration: none; cursor: default; font: inherit; }
.mp-part--free { background: var(--mp-free); }
.mp-part--booked { background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(255, 255, 255, 0.75) calc(50% - 1px), rgba(255, 255, 255, 0.75) calc(50% + 1px), transparent calc(50% + 1px)), var(--mp-booked); }
.mp-part--held { background: repeating-linear-gradient(135deg, var(--mp-held) 0 4px, var(--mp-held-alt, #a8700f) 4px 8px); }
a.mp-part { cursor: pointer; }
a.mp-part:hover, a.mp-part:focus-visible { box-shadow: 0 0 0 2px var(--mp-surface, #fff), 0 0 0 4px var(--mp-primary, #7a1f2b); }
.mp-day--today { border: 2px solid var(--mp-primary, #7a1f2b); padding: 3px; }
.mp-day--today .mp-daynum { color: var(--mp-primary, #7a1f2b); }
.mp-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 3px; vertical-align: -3px; }
.mp-calwrap { display: flex; flex-direction: column; }
.mp-callegend { order: 0; margin: 0 0 10px; }
.mp-calwhere { margin: 0; font-size: 0.9375rem; font-weight: 700; }
.mp-callegend .mp-legend { margin-top: 6px; }
.mp-calnote { min-height: 1.6em; margin: 8px 0 0; font-weight: 600; }
.mp-mini .mp-part { height: 20px; }
@media (max-width: 520px) { .mp-callegend { order: 2; margin: 10px 0 0; } .mp-calnote { order: 1; } }

/* Forms */
.mp-form { display: grid; gap: 14px; max-width: 600px; padding: 20px; background: var(--mp-surface, #fff); border: 1px solid var(--mp-line, rgba(0, 0, 0, 0.14)); border-radius: var(--mp-radius, 8px); }
.mp-field { display: grid; gap: 4px; font-weight: 600; }
.mp-field input, .mp-field select, .mp-field textarea { width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; font-weight: 400; color: var(--mp-ink, inherit); background: var(--mp-bg, #fff); border: 1px solid var(--mp-muted, #767676); border-radius: var(--mp-radius-sm, 6px); }
.mp-form fieldset { margin: 0; padding: 8px 12px 10px; border: 1px solid var(--mp-line, rgba(0, 0, 0, 0.14)); border-radius: var(--mp-radius-sm, 6px); }
.mp-form legend { padding: 0 6px; font-weight: 600; }
.mp-check { display: flex; align-items: center; gap: 8px; min-height: 36px; font-weight: 400; }
.mp-check input { width: 20px; height: 20px; min-height: 0; }
.mp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mp-quote { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin: 0; padding: 14px; background: var(--mp-surface, #fff); border: 1px solid var(--mp-line, rgba(0, 0, 0, 0.14)); border-radius: var(--mp-radius-sm, 6px); }
.mp-quote dt { font-weight: 600; }
.mp-quote dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.mp-out { display: grid; gap: 10px; }

/* Steps: on a phone the enquiry form shows one step at a time; on wider screens every step shows. */
.mp-steps, .mp-stepnav { display: none; }
.mp-step { display: grid; gap: 14px; border: 0; padding: 0; margin: 0; min-width: 0; }
@media (max-width: 640px) {
	.mp-form--steps .mp-step { display: none; }
	.mp-form--steps .mp-step.is-current { display: grid; }
	.mp-form--steps .mp-steps { display: block; margin: 0; font-weight: 700; color: var(--mp-primary, #7a1f2b); }
	.mp-form--steps .mp-stepbar { display: block; height: 6px; margin: 6px 0 0; background: var(--mp-line, #ddd); border-radius: 3px; overflow: hidden; }
	.mp-form--steps .mp-stepbar span { display: block; height: 100%; background: var(--mp-primary, #7a1f2b); transition: width .2s; }
	.mp-form--steps .mp-stepnav { display: flex; gap: 10px; }
	.mp-form--steps .mp-stepnav .mp-btn { flex: 1; }
	.mp-form--steps .mp-actions--final { display: none; }
	.mp-form--steps.is-last .mp-actions--final { display: flex; }
	.mp-form--steps.is-last .mp-stepnav .mp-next { display: none; }
	.mp-form { padding: 14px; }
}

/* Tables: names on the left, numbers right-aligned. */
.mp-table { width: 100%; border-collapse: collapse; background: var(--mp-surface, #fff); }
.mp-table th, .mp-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--mp-line, rgba(0, 0, 0, 0.14)); }
.mp-table thead th { font-size: 0.875rem; color: var(--mp-muted, #666); border-bottom-width: 2px; }
.mp-table th[scope="row"] { font-weight: 600; }
.mp-table th.mp-num, .mp-table td.mp-num { text-align: right; white-space: nowrap; }
.mp-table-wrap { overflow-x: auto; }
.mp-unit { font-size: 0.8125rem; color: var(--mp-muted, #666); font-weight: 400; }

/* My booking */
.mp-status { display: inline-block; padding: 2px 10px; font-size: 0.875rem; font-weight: 700; color: var(--mp-primary, #7a1f2b); background: var(--mp-primary-soft, #f3e6e8); border-radius: 999px; }
.mp-bookingview { display: grid; gap: 18px; }
.mp-bookingview h3 { margin: 0 0 6px; }
.mp-badge--paid { color: var(--mp-free); font-weight: 700; }
.mp-badge--late { color: var(--mp-booked); font-weight: 700; }
@media (max-width: 520px) {
	.mp-day { min-height: 54px; padding: 2px; }
	.mp-table th, .mp-table td { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { .mp-btn, .mp-stepbar span { transition: none; } }
