/*
 * Module: Ραντεβού — booking sheet, order card, Έγινε sheet
 * ==================================================================
 * Only module-specific pieces; buttons, chips, modals, inputs come from
 * mcms-global.css. Tokens only (--mcms-*), except the tag colors, which
 * come with each tag from the server (rantevou palette).
 *
 * SECTIONS
 *   1. Small pieces: tag chip, dot, parts chip, muted text
 *   2. Order card + head chip
 *   3. Booking sheet: mini month
 *   4. Booking sheet: day panel, notes, time chips, warnings
 *   5. Έγινε sheet
 *   6. Appointment sheet (MCMS.rantevou.entry)
 * ================================================================== */

/* ==================================================================
   1. SMALL PIECES
   ================================================================== */
.mcms-rv-tag {
	display: inline-flex;
	align-items: center;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: var(--mcms-text-xs);
	font-weight: 700;
	line-height: 1.5;
	white-space: nowrap;
	flex-shrink: 0;
}

.mcms-rv-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
	background: var(--mcms-line-strong);
}

.mcms-rv-parts {
	display: inline-flex;
	align-self: flex-start;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: var(--mcms-text-xs);
	font-weight: 700;
	line-height: 1.5;
	white-space: nowrap;
}
.mcms-rv-parts--ok   { background: var(--mcms-brand-soft);   color: var(--mcms-brand-strong); }
.mcms-rv-parts--ord  { background: var(--mcms-warning-soft); color: var(--mcms-warning); }
.mcms-rv-parts--wait { background: var(--mcms-danger-soft);  color: var(--mcms-danger); }

/* A car without a plate: icon + make/model (R.vehicleFace), like the order's top bar. */
.mcms-rv-car {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
	max-width: 100%;
	font-size: var(--mcms-text-xs);
	font-weight: 700;
	color: var(--mcms-text-muted);
	white-space: nowrap;
}

.mcms-rv-car svg {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	color: var(--mcms-brand-strong);
}

.mcms-rv-car__text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* On a card the customer's name comes first: the car takes at most 40% of the line. */
.mcms-rvc-entry__who .mcms-rv-car,
.mcms-rvc-orderrow__top .mcms-rv-car {
	flex: 0 1 auto;
	max-width: 40%;
}

/* Inside a top-bar style chip (appointment sheet) it reads like the order page. */
.mcms-ctx__chip .mcms-rv-car {
	font-size: var(--mcms-text-sm);
	color: var(--mcms-text);
	padding: 0 4px;
}

.mcms-rv-muted {
	color: var(--mcms-text-muted);
	font-weight: 400;
	font-size: var(--mcms-text-sm);
}

/* ==================================================================
   2. ORDER CARD + HEAD CHIP
   ================================================================== */
.mcms-wrap .mcms-rv-card {
	margin-top: 8px;
	overflow: hidden;
	scroll-margin-top: 90px;
}

.mcms-rv-card.is-late {
	border-color: rgba(138, 83, 0, .45);
}

.mcms-rv-card__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px var(--mcms-pad);
}

.mcms-rv-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	border-radius: 10px;
	background: var(--mcms-brand-softer);
	color: var(--mcms-brand-strong);
}

.mcms-rv-card__icon svg {
	width: 20px;
	height: 20px;
}

.mcms-rv-card__main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-align: left;
}

.mcms-rv-card__label {
	font-size: var(--mcms-text-xs);
	font-weight: 700;
	color: var(--mcms-text-muted);
}

.mcms-rv-card.is-late .mcms-rv-card__label {
	color: var(--mcms-warning);
}

.mcms-rv-card__when {
	font-size: var(--mcms-text-md);
	font-weight: 700;
	line-height: 1.3;
}

.mcms-rv-card__note {
	font-size: var(--mcms-text-sm);
	color: var(--mcms-text-muted);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.mcms-rv-card__actions {
	display: flex;
	gap: 8px;
	padding: 10px var(--mcms-pad);
	border-top: 1px solid var(--mcms-line);
	background: var(--mcms-surface-muted);
}

.mcms-wrap .mcms-rv-card__actions .mcms-btn:not(.mcms-btn--icon) {
	flex: 1;
}

.mcms-rv-card__actions .mcms-btn svg {
	width: 18px;
	height: 18px;
}

/* No appointment: the whole card is one button. */
.mcms-wrap .mcms-rv-card__book {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 12px var(--mcms-pad);
	border: 0;
	background: var(--mcms-surface);
	color: var(--mcms-text);
	font: inherit;
	cursor: pointer;
}

.mcms-wrap .mcms-rv-card__book:hover:not(:disabled) {
	background: var(--mcms-surface-muted);
}

.mcms-wrap .mcms-rv-card__book:disabled {
	cursor: not-allowed;
	opacity: .6;
}

.mcms-rv-card__book .mcms-rv-card__when {
	color: var(--mcms-brand-strong);
}

/* The active appointment's text opens its sheet. */
.mcms-wrap .mcms-rv-card__open {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--mcms-text);
	font: inherit;
	cursor: pointer;
}

.mcms-wrap .mcms-rv-card__open:hover .mcms-rv-card__when {
	color: var(--mcms-brand-strong);
}

/* Closed appointments: one line each, tap = its sheet. */
.mcms-wrap .mcms-rv-card__past {
	width: 100%;
	margin: 0;
	border-left: 0;
	border-right: 0;
	border-bottom: 0;
	background: var(--mcms-surface);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.mcms-wrap .mcms-rv-card__past:hover {
	background: var(--mcms-surface-muted);
}

.mcms-rv-card__past .mcms-row__chevron {
	display: inline-flex;
}

.mcms-rv-card__past {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px var(--mcms-pad);
	border-top: 1px solid var(--mcms-line);
	font-size: var(--mcms-text-sm);
	color: var(--mcms-text-muted);
}

.mcms-rv-card__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
	background: var(--mcms-line-strong);
}

.mcms-rv-card__past-when {
	flex: 1;
}

.mcms-rv-card__past-status {
	font-weight: 700;
}

.mcms-rv-card__past--den_irthe .mcms-rv-card__dot { background: var(--mcms-danger); }
.mcms-rv-card__past--den_irthe .mcms-rv-card__past-status { color: var(--mcms-danger); }
.mcms-rv-card__past--egine .mcms-rv-card__dot { background: var(--mcms-brand); }
.mcms-rv-card__past--egine .mcms-rv-card__past-status { color: var(--mcms-brand-strong); }

/* Head chip: jumps to the card. */
.mcms-wrap button.mcms-rv-headchip {
	gap: 4px;
	margin: 0;
	border: 0;
	background: var(--mcms-brand-soft);
	color: var(--mcms-brand-strong);
	font-family: var(--mcms-font);
	cursor: pointer;
}

.mcms-wrap button.mcms-rv-headchip.is-late {
	background: var(--mcms-warning-soft);
	color: var(--mcms-warning);
}

.mcms-rv-headchip svg,
.mcms-rv-rowchip svg {
	width: 13px;
	height: 13px;
}

/* Order rows: the active appointment's day. */
.mcms-rv-rowchip {
	background: var(--mcms-brand-soft);
	color: var(--mcms-brand-strong);
}

.mcms-rv-rowchip.is-soon {
	background: var(--mcms-warning-soft);
	color: var(--mcms-warning);
}

.mcms-rv-rowchip.is-past {
	background: var(--mcms-surface-muted);
	color: var(--mcms-text-muted);
	border: 1px solid var(--mcms-line);
}

.mcms-rv-menu {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* ==================================================================
   3. BOOKING SHEET: MINI MONTH
   ================================================================== */
@media (min-width: 640px) {
	.mcms-modal--rv-book .mcms-modal__panel {
		max-width: 560px;
	}
}

.mcms-rv-book {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.mcms-rv-month__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 4px;
}

.mcms-rv-month__title {
	font-size: var(--mcms-text-md);
	font-weight: 700;
}

.mcms-wrap .mcms-rv-month__nav {
	min-height: 36px;
	width: 40px;
	border-color: transparent;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	color: var(--mcms-text-muted);
}

.mcms-rv-month__wd,
.mcms-rv-month__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 2px;
	text-align: center;
}

.mcms-rv-month__wd span {
	padding: 2px 0 4px;
	font-size: 11px;
	font-weight: 700;
	color: var(--mcms-text-muted);
}

.mcms-wrap .mcms-rv-day {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--mcms-radius-sm);
	background: transparent;
	color: var(--mcms-text);
	font: inherit;
	cursor: pointer;
}

.mcms-wrap .mcms-rv-day:hover:not(:disabled) {
	background: var(--mcms-brand-softer);
}

.mcms-rv-day.is-blank {
	cursor: default;
}

.mcms-rv-day__num {
	font-size: var(--mcms-text-sm);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.mcms-rv-day__count {
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	color: var(--mcms-brand-strong);
}

.mcms-rv-day__count.is-full {
	color: var(--mcms-danger);
}

.mcms-rv-day__bar {
	width: 14px;
	height: 3px;
	border-radius: 2px;
	background: var(--mcms-danger);
}

.mcms-wrap .mcms-rv-day.is-today {
	box-shadow: inset 0 0 0 1.5px var(--mcms-brand-strong);
}

.mcms-wrap .mcms-rv-day.is-closed {
	background: var(--mcms-surface-muted);
}

.mcms-rv-day.is-closed .mcms-rv-day__num,
.mcms-rv-day.is-past .mcms-rv-day__num {
	color: var(--mcms-text-muted);
	font-weight: 500;
}

.mcms-wrap .mcms-rv-day:disabled {
	cursor: default;
	opacity: .55;
}

.mcms-wrap .mcms-rv-day.is-selected,
.mcms-wrap .mcms-rv-day.is-selected:hover {
	background: var(--mcms-brand-strong);
	opacity: 1;
}

.mcms-rv-day.is-selected .mcms-rv-day__num,
.mcms-rv-day.is-selected .mcms-rv-day__count {
	color: var(--mcms-on-brand);
}

.mcms-rv-day.is-selected .mcms-rv-day__bar {
	background: var(--mcms-on-brand);
}

/* ==================================================================
   4. BOOKING SHEET: DAY PANEL, NOTES, TIME CHIPS, WARNINGS
   ================================================================== */
.mcms-rv-daypanel {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-height: 64px;
	padding: 10px 12px;
	border: 1px solid var(--mcms-line);
	border-radius: var(--mcms-radius-md);
	background: var(--mcms-surface-muted);
	transition: opacity var(--mcms-ease);
}

.mcms-rv-daypanel.is-loading {
	opacity: .5;
}

.mcms-rv-daypanel__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

.mcms-rv-daypanel__title {
	font-size: var(--mcms-text-md);
	font-weight: 700;
}

.mcms-rv-daypanel__count {
	font-size: var(--mcms-text-xs);
	font-weight: 700;
	color: var(--mcms-text-muted);
}

.mcms-rv-daypanel__row {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	min-width: 0;
}

.mcms-rv-daypanel__row.is-self {
	font-weight: 700;
}

.mcms-rv-daypanel__time {
	width: 52px;
	flex-shrink: 0;
	font-weight: 700;
}

.mcms-rv-daypanel__what {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mcms-rv-note {
	align-self: flex-start;
	max-width: 100%;
	white-space: normal;       /* long notes wrap onto more lines (some themes set nowrap on buttons) */
	overflow-wrap: anywhere;
	padding: 4px 8px;
	border-radius: 6px;
	font-size: var(--mcms-text-xs);
	font-weight: 700;
}
.mcms-rv-note--simeiosi    { background: #E8EEF9; color: var(--mcms-info); }
.mcms-rv-note--periorismos { background: var(--mcms-danger-soft); color: var(--mcms-danger); }
.mcms-rv-note--kleista     { background: #EEF0EC; color: #3A4038; }

.mcms-rv-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.mcms-wrap .mcms-rv-time {
	min-height: 36px;
	padding: 0 11px;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

/* Taken: grey, but still selectable (two cars at 09:00 is normal). */
.mcms-wrap .mcms-rv-time.is-taken:not([aria-pressed="true"]) {
	background: var(--mcms-surface-muted);
	color: var(--mcms-text-muted);
	border-style: dashed;
}

.mcms-wrap .mcms-rv-tagchip {
	gap: 6px;
}

.mcms-rv-warnings {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mcms-rv-warning {
	padding: 9px 12px;
	border-radius: var(--mcms-radius-sm);
	font-size: 13px;
	font-weight: 600;
}
.mcms-rv-warning--warning { background: var(--mcms-warning-soft); color: var(--mcms-warning); }
.mcms-rv-warning--danger  { background: var(--mcms-danger-soft);  color: var(--mcms-danger); }

/* ==================================================================
   5. ΕΓΙΝΕ SHEET
   ================================================================== */
.mcms-rv-done {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mcms-rv-done__items {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--mcms-line);
	border-radius: var(--mcms-radius-md);
	overflow: hidden;
}

.mcms-wrap .mcms-rv-done__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 12px;
	border-top: 1px solid var(--mcms-line);
	cursor: pointer;
}

.mcms-wrap .mcms-rv-done__item:first-child {
	border-top: 0;
}

.mcms-rv-done__item .mcms-check__input {
	width: 22px;
	height: 22px;
	margin-top: 1px;
	flex-shrink: 0;
	accent-color: var(--mcms-brand-strong);
}

.mcms-rv-done__item.is-placed {
	cursor: default;
	opacity: .7;
}

.mcms-rv-done__item-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mcms-rv-done__item-title {
	font-size: var(--mcms-text-sm);
	font-weight: 600;
	overflow-wrap: anywhere;
}

.mcms-rv-done__outcome {
	padding: 10px 12px;
	border-radius: var(--mcms-radius-sm);
	background: var(--mcms-surface-muted);
	color: var(--mcms-text-muted);
	font-size: 13px;
	font-weight: 600;
}

.mcms-rv-done__outcome.is-complete {
	background: var(--mcms-brand-soft);
	color: var(--mcms-brand-strong);
}

.mcms-rv-done__money {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	border: 1px solid var(--mcms-line);
	border-radius: var(--mcms-radius-md);
}

.mcms-rv-done__money-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.mcms-rv-done__money-value {
	font-size: var(--mcms-text-lg);
	font-weight: 800;
}

.mcms-rv-done__pay {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* ==================================================================
   6. APPOINTMENT SHEET (calendar + order page)
   ================================================================== */
.mcms-rvc-sheet {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.mcms-rvc-sheet__when {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mcms-rvc-sheet__when-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.mcms-rvc-sheet__day {
	font-size: var(--mcms-text-md);
	font-weight: 700;
}

.mcms-rvc-status {
	border: 1px solid var(--mcms-line);
	background: var(--mcms-surface-muted);
	color: var(--mcms-text-muted);
}

.mcms-rvc-status--egine     { background: var(--mcms-brand-soft); color: var(--mcms-brand-strong); border-color: transparent; }
.mcms-rvc-status--den_irthe { background: var(--mcms-danger-soft); color: var(--mcms-danger); border-color: transparent; }

.mcms-rvc-sheet__chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.mcms-rvc-sheet__title {
	font-size: var(--mcms-text-md);
	font-weight: 700;
}

.mcms-wrap .mcms-rvc-sheet__order {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--mcms-line);
	border-radius: var(--mcms-radius-md);
	color: var(--mcms-text);
}

.mcms-wrap .mcms-rvc-sheet__order:hover {
	background: var(--mcms-surface-muted);
	color: var(--mcms-text);
}

.mcms-rvc-sheet__order-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.mcms-rvc-sheet__order-title {
	font-weight: 700;
}

.mcms-rvc-sheet__open {
	font-weight: 600;
	color: var(--mcms-brand-strong);
	white-space: nowrap;
}

.mcms-rvc-sheet__items {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--mcms-line);
	border-radius: var(--mcms-radius-md);
	overflow: hidden;
}

.mcms-rvc-sheet__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 12px;
	border-top: 1px solid var(--mcms-line);
}

.mcms-rvc-sheet__item:first-child {
	border-top: 0;
}

.mcms-rvc-sheet__item-title {
	flex: 1;
	min-width: 0;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.mcms-rvc-sheet__item.is-labour .mcms-rvc-sheet__item-title {
	font-weight: 400;
	color: var(--mcms-text-muted);
}

.mcms-rvc-sheet__item .mcms-rv-parts:not([class*="--"]) {
	background: var(--mcms-surface-muted);
	color: var(--mcms-text-muted);
}

.mcms-rvc-sheet__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.mcms-rvc-sheet__note {
	padding: 10px 12px;
	border-radius: var(--mcms-radius-sm);
	background: var(--mcms-surface-muted);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

/* «Αποστολή υπενθύμισης»: one line + button. Amber until one is sent. */
.mcms-rvc-sheet__remind {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 8px 8px 12px;
	border-radius: var(--mcms-radius-sm);
	background: var(--mcms-warning-soft);
	color: var(--mcms-warning);
	font-weight: 600;
}

.mcms-rvc-sheet__remind.is-sent {
	background: var(--mcms-brand-softer);
	color: var(--mcms-brand-strong);
}

.mcms-rvc-sheet__remind-text {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 0;
	font-size: var(--mcms-text-sm);
}

.mcms-rvc-sheet__remind-text svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.mcms-wrap .mcms-rvc-sheet__remind .mcms-btn {
	min-height: 38px;
	flex-shrink: 0;
}

.mcms-wrap .mcms-rv-menu .mcms-btn svg {
	width: 18px;
	height: 18px;
}

.mcms-wrap .mcms-rvc-sheet__chain {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid var(--mcms-line);
	border-radius: var(--mcms-radius-sm);
	background: var(--mcms-surface);
	color: var(--mcms-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.mcms-rvc-sheet__chain .mcms-row__chevron {
	margin-left: auto;
}

.mcms-rvc-sheet__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--mcms-line);
}

.mcms-rvc-sheet__actions .mcms-btn svg {
	width: 18px;
	height: 18px;
}

.mcms-rvc-sheet__actions-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.mcms-wrap .mcms-rvc-sheet__actions-row .mcms-btn {
	padding: 0 6px;
}
