/* Preshift Catering front-end styles. Deliberately light so they sit under any theme. */

.pc-events-form { margin: 1.5em 0; }
.pc-events-form h3 { margin-bottom: .4em; }
.pc-events-form input[type="file"] { display: block; margin: .4em 0; max-width: 100%; }
.pc-events-form-hint { display: block; font-size: .85em; opacity: .7; margin-top: .25em; }
.pc-events-form-status { display: block; margin-top: .5em; font-weight: 600; }
.pc-events-form-status.pc-ok { color: #2e7d32; }
.pc-events-form-status.pc-err { color: #c62828; }
.pc-events-form-status.pc-uploading { color: #555; font-weight: 400; }

/* Lead-time warning shown at checkout */
#pc-lead-warning { margin-top: .6em; }

/* Checkout: the dietary textarea rendered cramped under the theme. Give it room. */
.woocommerce-checkout #_pc_dietary,
.woocommerce-checkout textarea[name="_pc_dietary"] {
	display: block;
	width: 100%;
	min-height: 80px;
	box-sizing: border-box;
}
.woocommerce-checkout .form-row textarea { max-width: 100%; }

/* Organisation orders (Customer Admin) */
.pc-org-filters { display: flex; flex-wrap: wrap; gap: .6em 1em; align-items: flex-end; margin-bottom: 1.2em; }
.pc-org-filters label { display: flex; flex-direction: column; font-size: .9em; gap: .2em; }
.pc-org-orders-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pc-org-orders-wrap table { min-width: 640px; }

/* ---- Portal: shared tokens ---- */
:root {
	--pc-accent: #e07a2f;
	--pc-done: #2e7d32;
	--pc-ink: #1f2430;
	--pc-muted: #6b7280;
	--pc-line: #e5e7eb;
}

/* ---- Status timeline ---- */
.pc-timeline-wrap { margin: 1.5em 0; }
.pc-timeline-wrap h2, .pc-details h2, .pc-notes h2 { font-size: 1.15em; margin: 0 0 .6em; }
.pc-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; counter-reset: none; }
.pc-timeline .pc-step { position: relative; flex: 1 1 0; min-width: 90px; text-align: center; padding-top: 26px; font-size: .82em; color: var(--pc-muted); }
.pc-timeline .pc-step::before { content: ""; position: absolute; top: 8px; left: 50%; width: 100%; height: 3px; background: var(--pc-line); z-index: 0; }
.pc-timeline .pc-step:last-child::before { display: none; }
.pc-timeline .pc-step-dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--pc-line); z-index: 1; }
.pc-timeline .pc-step.is-done { color: var(--pc-ink); }
.pc-timeline .pc-step.is-done::before { background: var(--pc-done); }
.pc-timeline .pc-step.is-done .pc-step-dot { border-color: var(--pc-done); background: var(--pc-done); }
.pc-timeline .pc-step.is-current { color: var(--pc-ink); font-weight: 700; }
.pc-timeline .pc-step.is-current .pc-step-dot { border-color: var(--pc-accent); background: var(--pc-accent); box-shadow: 0 0 0 4px rgba(224,122,47,.2); }
.pc-status-cancelled { padding: .6em .8em; background: #fdecea; border: 1px solid #f5c6c0; border-radius: 6px; color: #b71c1c; font-weight: 600; }

/* ---- Details card ---- */
.pc-details { margin: 1.5em 0; }
.pc-details-list { display: grid; grid-template-columns: 1fr 1fr; gap: .5em 1.5em; margin: 0; }
.pc-details-list .pc-detail { display: flex; flex-direction: column; border-bottom: 1px solid var(--pc-line); padding: .3em 0; }
.pc-details-list dt { font-size: .78em; text-transform: uppercase; letter-spacing: .03em; color: var(--pc-muted); margin: 0; }
.pc-details-list dd { margin: .1em 0 0; color: var(--pc-ink); }
.pc-events-file { margin-top: .8em; font-size: .9em; }
@media (max-width: 560px) { .pc-details-list { grid-template-columns: 1fr; } }

/* ---- Notes thread ---- */
.pc-notes { margin: 1.8em 0; }
.pc-notes-intro { color: var(--pc-muted); font-size: .9em; margin: 0 0 .8em; }
.pc-thread { list-style: none; margin: 0 0 1em; padding: 0; display: flex; flex-direction: column; gap: .6em; }
.pc-msg { max-width: 85%; padding: .6em .8em; border-radius: 12px; font-size: .92em; }
.pc-msg-meta { display: block; font-size: .74em; color: var(--pc-muted); margin-bottom: .2em; }
.pc-msg-body p { margin: 0; }
.pc-msg-customer { align-self: flex-end; background: #eef4ff; border: 1px solid #d6e3ff; }
.pc-msg-staff { align-self: flex-start; background: #f4f5f7; border: 1px solid var(--pc-line); }
.pc-thread-empty { color: var(--pc-muted); font-style: italic; }
.pc-note-form textarea { width: 100%; border: 1px solid var(--pc-line); border-radius: 8px; padding: .6em; font: inherit; }
.pc-note-submit { margin-top: .5em; }

/* ---- Kitchen board ---- */
.pc-kitchen-intro { color: var(--pc-muted); }
.pc-kitchen-date { margin: 1.2em 0 .3em; border-bottom: 2px solid var(--pc-ink); padding-bottom: .2em; }
.pc-kitchen-site { margin: .8em 0 .4em; color: var(--pc-muted); text-transform: uppercase; letter-spacing: .03em; font-size: .8em; }
.pc-kitchen-card { border: 1px solid var(--pc-line); border-radius: 10px; padding: .8em; margin-bottom: .7em; }
.pc-kitchen-head { display: flex; align-items: center; gap: .6em; font-weight: 600; }
.pc-kitchen-time { background: var(--pc-ink); color: #fff; border-radius: 6px; padding: .1em .5em; font-variant-numeric: tabular-nums; }
.pc-kitchen-status { margin-left: auto; font-size: .78em; color: var(--pc-muted); text-transform: uppercase; letter-spacing: .03em; }
.pc-kitchen-meta { margin: .5em 0 .2em; color: var(--pc-ink); }
.pc-kitchen-items { margin: .2em 0; color: var(--pc-muted); font-size: .92em; }
.pc-kitchen-dietary { margin: .3em 0; padding: .3em .5em; background: #fff6e5; border-left: 3px solid var(--pc-accent); font-size: .9em; }
.pc-kitchen-breach { margin: .3em 0; padding: .3em .5em; background: #fdecea; border-left: 3px solid #c62828; color: #b71c1c; font-size: .9em; font-weight: 600; }
.pc-kitchen-actions { margin-top: .5em; display: flex; flex-wrap: wrap; gap: .4em; }
/* High specificity + !important so the theme's button reset does not flatten these. */
.pc-kitchen .pc-kitchen-actions button.pc-kitchen-btn,
.pc-kitchen-actions button.pc-kitchen-btn {
	background: var(--pc-accent) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 8px !important;
	padding: .5em 1em !important;
	font-weight: 600 !important;
	cursor: pointer;
}
.pc-kitchen-actions button.pc-kitchen-btn:hover { filter: brightness(.95); }

/* ---- Your usual (dashboard) ---- */
.pc-usual { margin: 0 0 1.6em; }
.pc-usual h2 { font-size: 1.15em; margin: 0 0 .5em; }
.pc-usual-card { border: 1px solid var(--pc-line); border-radius: 10px; padding: 1em; }
.pc-usual-meta { margin: 0 0 .3em; font-size: .8em; text-transform: uppercase; letter-spacing: .03em; color: var(--pc-muted); }
.pc-usual-items { margin: 0 0 .8em; color: var(--pc-ink); }
a.pc-usual-btn { background: var(--pc-accent) !important; color: #fff !important; border: 0 !important; border-radius: 8px !important; padding: .55em 1.1em !important; font-weight: 600 !important; text-decoration: none; }
.pc-usual-view { margin-left: .8em; font-size: .9em; }

/* ---- Amend / cancel ---- */
.pc-amend { margin: 1em 0; }
.pc-amend-line { padding: .6em .8em; background: #f8f9fb; border: 1px solid var(--pc-line); border-radius: 8px; font-size: .92em; }
.pc-amend-cancel { color: #b71c1c; }

/* ---- Head-office spend ---- */
.pc-spend { margin: 0 0 1.4em; }
.pc-spend-tiles { display: flex; flex-wrap: wrap; gap: .8em; margin-bottom: 1em; }
.pc-spend-tile { flex: 1 1 140px; border: 1px solid var(--pc-line); border-radius: 10px; padding: .8em 1em; }
.pc-spend-num { display: block; font-size: 1.5em; font-weight: 700; color: var(--pc-ink); }
.pc-spend-num .amount { font-size: inherit; }
.pc-spend-lbl { display: block; font-size: .78em; text-transform: uppercase; letter-spacing: .03em; color: var(--pc-muted); margin-top: .2em; }
.pc-spend-sites { width: 100%; border-collapse: collapse; font-size: .92em; }
.pc-spend-sites th, .pc-spend-sites td { text-align: left; padding: .35em .5em; border-bottom: 1px solid var(--pc-line); }
.pc-spend-sites th:nth-child(2), .pc-spend-sites td:nth-child(2), .pc-spend-sites th:last-child, .pc-spend-sites td:last-child { text-align: right; }
.pc-spend-note { font-size: .8em; color: var(--pc-muted); margin-top: .4em; }

/* ---- First-run welcome ---- */
.pc-welcome { margin: 0 0 1.6em; padding: 1em 1.2em; border: 1px solid var(--pc-line); border-left: 4px solid var(--pc-accent); border-radius: 10px; background: #fffdf9; }
.pc-welcome h2 { font-size: 1.15em; margin: 0 0 .5em; }
.pc-welcome-steps { margin: 0 0 .9em; padding-left: 1.2em; }
.pc-welcome-steps li { margin: .25em 0; }
a.pc-welcome-btn { background: var(--pc-accent) !important; color: #fff !important; border: 0 !important; border-radius: 8px !important; padding: .55em 1.1em !important; font-weight: 600 !important; text-decoration: none; }

/* ---- Head-office oversight ---- */
.pc-oversight-intro { color: var(--pc-muted); }
.pc-ov-group { border: 1px solid var(--pc-line); border-radius: 10px; padding: .8em 1em; margin-bottom: 1em; }
.pc-ov-group h4 { margin: 0; font-size: 1.02em; }
.pc-ov-count { display: inline-block; min-width: 1.4em; text-align: center; background: var(--pc-ink); color: #fff; border-radius: 999px; padding: 0 .45em; font-size: .8em; margin-left: .3em; }
.pc-ov-query .pc-ov-count { background: #1b6ec2; }
.pc-ov-await .pc-ov-count { background: #8a6d00; }
.pc-ov-short .pc-ov-count { background: #c62828; }
.pc-ov-sub { color: var(--pc-muted); font-size: .85em; margin: .2em 0 .6em; }
.pc-ov-clear { color: var(--pc-done); font-size: .9em; margin: 0; }
.pc-ov-list { list-style: none; margin: 0; padding: 0; }
.pc-ov-list li { padding: .4em 0; border-bottom: 1px solid var(--pc-line); font-size: .92em; display: flex; flex-wrap: wrap; gap: .5em; align-items: baseline; }
.pc-ov-list li:last-child { border-bottom: 0; }
.pc-ov-client { font-weight: 600; }
.pc-ov-site, .pc-ov-when, .pc-ov-who { color: var(--pc-muted); }
.pc-ov-commercial { border-top: 2px solid var(--pc-ink); padding-top: .8em; margin-top: 1.2em; }

/* ---- Help centre ---- */
.pc-help-intro { color: var(--pc-muted); }
.pc-help-sec { border: 1px solid var(--pc-line); border-radius: 10px; margin-bottom: .7em; overflow: hidden; }
.pc-help-sec > summary { cursor: pointer; padding: .7em 1em; font-weight: 600; background: #faf7f2; list-style: none; }
.pc-help-sec > summary::-webkit-details-marker { display: none; }
.pc-help-sec > summary::before { content: "\25B8"; display: inline-block; margin-right: .5em; transition: transform .15s; color: var(--pc-accent); }
.pc-help-sec[open] > summary::before { transform: rotate(90deg); }
.pc-help-body { padding: .3em 1.1em 1em; }
.pc-help-body p { margin: .5em 0; }
.pc-help-steps { margin: .5em 0; padding-left: 1.3em; }
.pc-help-steps li { margin: .35em 0; }
.pc-help-foot { color: var(--pc-muted); font-size: .9em; margin-top: 1em; }

/* ---- Status pills on the orders list ---- */
.woocommerce-orders-table__cell-order-status mark, mark.order-status { border-radius: 999px; padding: .15em .7em; font-size: .82em; font-weight: 600; background: #f0f1f3; color: var(--pc-ink); }
mark.status-pc-confirmed, mark.status-pc-prep, mark.status-pc-out { background: #fff1e2; color: #a24a10; }
mark.status-completed { background: #e7f5e9; color: #1f6b2b; }
mark.status-on-hold { background: #fff8e1; color: #8a6d00; }
mark.status-cancelled { background: #fdecea; color: #b71c1c; }
