/* Meeting Scheduler — front-end styles.
   All rules are scoped under .msched so the plugin coexists with any theme. */

.msched {
	--ms-ink: #1f2933;
	--ms-muted: #616e7c;
	--ms-line: #d9dee4;
	--ms-bg: #ffffff;
	--ms-panel: #f5f7f9;
	--ms-accent: #0b5394;      /* drawing-set blue */
	--ms-yes: #1e7e34;
	--ms-yes-bg: #e6f4ea;
	--ms-maybe: #b7791f;
	--ms-maybe-bg: #fdf3e0;
	--ms-no: #b02a37;
	--ms-no-bg: #fbe9eb;
	--ms-best: #fff8e1;
	max-width: 860px;
	margin: 0 auto;
	color: var(--ms-ink);
	font-size: 16px;
	line-height: 1.5;
}

.msched *, .msched *::before, .msched *::after { box-sizing: border-box; }

.msched-card {
	background: var(--ms-bg);
	border: 1px solid var(--ms-line);
	border-radius: 10px;
	padding: 28px;
	margin: 0 0 24px;
	box-shadow: 0 1px 3px rgba(31, 41, 51, 0.06);
}

.msched-heading { margin: 0 0 6px; font-size: 1.5em; line-height: 1.25; }
.msched-sub { margin: 0 0 20px; color: var(--ms-muted); }
.msched-section-title { margin: 26px 0 6px; font-size: 1.05em; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ms-accent); }
.msched-mt0 { margin-top: 0; }
.msched-meta { margin: 2px 0; color: var(--ms-muted); }
.msched-desc { margin: 12px 0 0; white-space: pre-line; }
.msched-hint { color: var(--ms-muted); font-size: 0.9em; margin: 0 0 10px; }
.msched-req { color: var(--ms-no); }
.msched-hidden { display: none !important; }

.msched-label { display: block; margin: 14px 0 4px; font-weight: 600; font-size: 0.92em; }

.msched-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--ms-line);
	border-radius: 6px;
	background: var(--ms-bg);
	color: var(--ms-ink);
	font: inherit;
}
.msched-input:focus { outline: 2px solid var(--ms-accent); outline-offset: 1px; border-color: var(--ms-accent); }
.msched-input-dt { width: auto; min-width: 190px; }

.msched-check { display: block; margin: 8px 0; cursor: pointer; }
.msched-check input { margin-right: 8px; }

/* Slot rows on the create form */
.msched-slot-row { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; flex-wrap: wrap; }
.msched-slot-sep { color: var(--ms-muted); }

/* Buttons */
.msched-btn {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 6px;
	border: 1px solid transparent;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.msched-btn-primary { background: var(--ms-accent); color: #fff; }
.msched-btn-primary:hover { background: #093f70; color: #fff; }
.msched-btn-primary:disabled { opacity: 0.6; cursor: default; }
.msched-btn-ghost { background: var(--ms-panel); color: var(--ms-ink); border-color: var(--ms-line); }
.msched-btn-ghost:hover { border-color: var(--ms-accent); color: var(--ms-accent); }
.msched-btn-mini { padding: 4px 10px; font-size: 0.8em; background: var(--ms-panel); border-color: var(--ms-line); color: var(--ms-ink); }
.msched-btn-mini:hover { border-color: var(--ms-accent); color: var(--ms-accent); }
.msched-btn-icon { background: none; border: none; cursor: pointer; font-size: 1em; color: var(--ms-muted); padding: 4px; }
.msched-btn-icon:hover { color: var(--ms-no); }
.msched-btn:focus-visible, .msched-btn-icon:focus-visible, .msched-choice:focus-visible { outline: 2px solid var(--ms-accent); outline-offset: 2px; }

.msched-actions { margin-top: 22px; }

/* Messages */
.msched-msg { margin-top: 12px; font-size: 0.92em; min-height: 1.2em; }
.msched-msg-ok { color: var(--ms-yes); }
.msched-msg-err { color: var(--ms-no); }

/* Banner */
.msched-banner {
	padding: 12px 16px;
	border-radius: 6px;
	margin: 0 0 18px;
	font-weight: 600;
}
.msched-banner-closed { background: var(--ms-yes-bg); color: var(--ms-yes); border: 1px solid #bfe3c8; }

/* Voting rows */
.msched-vote-list { margin-top: 8px; }
.msched-vote-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 4px;
	border-bottom: 1px solid var(--ms-line);
	flex-wrap: wrap;
}
.msched-vote-when { display: flex; flex-direction: column; }
.msched-vote-date { font-weight: 600; }
.msched-vote-time { color: var(--ms-muted); font-size: 0.92em; }
.msched-vote-choices { display: flex; gap: 6px; }

.msched-choice {
	padding: 8px 14px;
	border-radius: 20px;
	border: 1px solid var(--ms-line);
	background: var(--ms-bg);
	font: inherit;
	font-size: 0.88em;
	cursor: pointer;
	transition: all 0.12s ease;
}
.msched-choice-yes.is-active   { background: var(--ms-yes-bg);   border-color: var(--ms-yes);   color: var(--ms-yes);   font-weight: 700; }
.msched-choice-maybe.is-active { background: var(--ms-maybe-bg); border-color: var(--ms-maybe); color: var(--ms-maybe); font-weight: 700; }
.msched-choice-no.is-active    { background: var(--ms-no-bg);    border-color: var(--ms-no);    color: var(--ms-no);    font-weight: 700; }

/* Results table */
.msched-table-wrap { overflow-x: auto; margin-top: 6px; }
.msched-table { border-collapse: collapse; width: 100%; font-size: 0.92em; }
.msched-table th, .msched-table td {
	border: 1px solid var(--ms-line);
	padding: 8px 10px;
	text-align: center;
	vertical-align: middle;
	white-space: nowrap;
}
.msched-th-name, .msched-td-name { text-align: left; font-weight: 600; }
.msched-th-date { display: block; font-weight: 700; }
.msched-th-time { display: block; color: var(--ms-muted); font-weight: 400; font-size: 0.88em; }
.msched-best { background: var(--ms-best); }
.msched-best-flag, .msched-final-flag {
	display: inline-block;
	margin-top: 4px;
	padding: 1px 8px;
	border-radius: 10px;
	font-size: 0.72em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.msched-best-flag  { background: #f6c453; color: #5c4400; }
.msched-final-flag { background: var(--ms-yes); color: #fff; }

.msched-tally-row td { background: var(--ms-panel); }
.msched-tally { display: inline-block; margin: 0 4px; font-weight: 600; }
.msched-tally-yes { color: var(--ms-yes); }
.msched-tally-maybe { color: var(--ms-maybe); }
.msched-tally-no { color: var(--ms-no); }

.msched-cell-yes   { background: var(--ms-yes-bg);   color: var(--ms-yes);   font-weight: 700; }
.msched-cell-maybe { background: var(--ms-maybe-bg); color: var(--ms-maybe); font-weight: 700; }
.msched-cell-no    { background: var(--ms-no-bg);    color: var(--ms-no); }

.msched-admin-row td { background: var(--ms-panel); }

/* Share strip */
.msched-share-strip { margin-top: 20px; }
.msched-copy-row { display: flex; gap: 8px; margin-bottom: 12px; }
.msched-copy-row .msched-input { flex: 1; font-size: 0.88em; color: var(--ms-muted); }

@media (max-width: 640px) {
	.msched-card { padding: 18px; }
	.msched-vote-row { align-items: flex-start; flex-direction: column; }
	.msched-vote-choices { width: 100%; }
	.msched-choice { flex: 1; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.msched * { transition: none !important; }
}
