/* Wedding Suite — table plan (editor + guest view) */

/* ================= Editor (admin) ================= */
.wds-plan-editor { --pe-accent: #b08d57; }
.wds-pe-toolbar { position: sticky; top: 32px; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; background: #fff; border: 1px solid #dcdcde; border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.wds-pe-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wds-pe-label { font-weight: 600; margin-right: 2px; }
.wds-pe-save { margin-left: auto; }
.wds-pe-status { font-size: 13px; color: #1e7e34; }
.wds-pe-status.is-dirty { color: #8a6d1d; }
.wds-pe-status.is-error { color: #b32d2e; font-weight: 600; }
.wds-pe-seg { display: inline-flex; }
.wds-pe-seg .button { border-radius: 0; margin: 0; }
.wds-pe-seg .button:first-child { border-radius: 3px 0 0 3px; }
.wds-pe-seg .button:last-child { border-radius: 0 3px 3px 0; margin-left: -1px; }
.wds-pe-seg .button.is-active { background: #2271b1; border-color: #2271b1; color: #fff; }
.wds-ico { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; margin-right: 6px; vertical-align: -2px; }
.wds-ico-round { border-radius: 50%; }
.wds-ico-rect { width: 18px; height: 9px; vertical-align: 0; }

.wds-pe-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .wds-pe-main { grid-template-columns: 1fr; } }
.wds-pe-canvas { position: relative; background: #f6f3ee; border: 1px solid #dcdcde; border-radius: 8px; height: min(72vh, 760px); min-height: 420px; overflow: hidden; }
.wds-pe-svg { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.wds-pe-3d { position: absolute; inset: 0; }
.wds-pe-3d canvas { width: 100% !important; height: 100% !important; display: block; }
.wds-pe-bg { fill: transparent; }
.wds-pe-floor { fill: #fff; }
.wds-pe-wall { fill: none; stroke: #3c3a37; stroke-width: 0.12; stroke-linejoin: round; }
.wds-pe-dim { font-size: 0.42px; fill: #8c8f94; font-family: -apple-system, sans-serif; }
.wds-pe-item { cursor: grab; }
.wds-pe-item:active { cursor: grabbing; }
.wds-pe-table { fill: #fdfbf7; stroke: #6d655d; stroke-width: 0.045; }
.wds-pe-featshape { stroke: rgba(0,0,0,.25); stroke-width: 0.04; opacity: .9; }
.wds-pe-featshape.is-dance { fill: url(#wds-grid); fill: #e6d9bf; }
.wds-pe-flabel { fill: #1d2327; font-family: -apple-system, sans-serif; font-weight: 600; }
.wds-pe-tlabel { fill: #2b2622; font-family: Georgia, serif; font-weight: 600; paint-order: stroke; stroke: #fdfbf7; stroke-width: 0.06px; }
.wds-pe-chair { cursor: pointer; }
.wds-pe-chair circle { fill: #fff; stroke: #9b948b; stroke-width: 0.035; transition: fill .15s; }
.wds-pe-chair text { fill: #8c8f94; font-family: -apple-system, sans-serif; pointer-events: none; }
.wds-pe-chair.is-taken text { fill: #fff; font-weight: 700; }
.wds-pe-chair:hover circle { stroke: #2271b1; stroke-width: 0.06; }
.wds-pe-chair.is-target circle { fill: #e7f1fb; stroke: #2271b1; animation: wds-pe-pulse 1.2s ease-in-out infinite; }
@keyframes wds-pe-pulse { 50% { stroke-width: 0.09; } }
.wds-pe-item.is-selected .wds-pe-shape { stroke: #2271b1; stroke-width: 0.08; stroke-dasharray: 0.18 0.1; }
.wds-pe-item.is-outside .wds-pe-shape { stroke: #d63638; stroke-width: 0.09; }

.wds-pe-pop { position: absolute; z-index: 30; background: #fff; border: 1px solid #c3c4c7; border-radius: 10px; box-shadow: 0 12px 36px rgba(0,0,0,.18); display: flex; flex-direction: column; overflow: hidden; }
.wds-pe-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #f6f7f7; border-bottom: 1px solid #e0e0e0; }
.wds-pe-x { background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: #646970; padding: 0 4px; }
.wds-pe-x:hover { color: #b32d2e; }
.wds-pe-pop-current { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; background: #fff8e1; font-weight: 600; }
.wds-pe-pop-search { margin: 10px 12px 6px; }
.wds-pe-pop-results { overflow-y: auto; padding: 0 6px 8px; flex: 1; }
.wds-pe-guest { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px; padding: 7px 8px; cursor: pointer; }
.wds-pe-guest:hover, .wds-pe-guest:focus { background: #f0f6fc; outline: none; }
.wds-pe-guest.is-current { background: #f0f6fc; }
.wds-pe-guest-name { display: block; font-weight: 600; }
.wds-pe-guest-meta { font-size: 12px; color: #646970; }
.wds-pe-note { color: #8a5a00; font-weight: 600; }

.wds-pe-side { background: #fff; border: 1px solid #dcdcde; border-radius: 8px; padding: 4px 16px 16px; max-height: min(72vh, 760px); overflow-y: auto; }
.wds-pe-panel h3 { margin: 14px 0 8px; }
.wds-pe-panel h4 { margin: 14px 0 6px; }
.wds-pe-field { display: block; margin: 0 0 10px; }
.wds-pe-field > span { display: block; font-weight: 600; margin-bottom: 3px; }
.wds-pe-field input[type=text], .wds-pe-field input[type=number], .wds-pe-field select { width: 100%; }
.wds-pe-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wds-pe-stepper { display: flex; gap: 4px; }
.wds-pe-stepper input { width: 70px !important; text-align: center; }
.wds-pe-rotrow { display: flex; align-items: center; gap: 8px; }
.wds-pe-rotrow input { flex: 1; }
.wds-pe-rot { min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.wds-pe-warn { background: #fcf0f1; color: #b32d2e; border-left: 3px solid #d63638; padding: 6px 10px; }
.wds-pe-seatlist { margin: 0 0 10px 22px; }
.wds-pe-seatlist li { margin: 2px 0; }
.wds-pe-seatlist li .wds-pe-x { font-size: 16px; }
.wds-pe-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.wds-danger-btn { color: #b32d2e !important; border-color: #d63638 !important; }
.wds-pe-keys { margin-top: 12px; font-size: 12px; }
.wds-pe-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wds-pe-stats > div { background: #f6f7f7; border-radius: 6px; padding: 8px 10px; font-size: 12px; color: #50575e; }
.wds-pe-stats b { display: block; font-size: 22px; color: #1d2327; }
.wds-pe-stats .is-warn b { color: #b32d2e; }
.wds-pe-unseated { max-height: 260px; overflow-y: auto; margin-top: 6px; }
.wds-pe-unseated h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #646970; }
.wds-pe-chip { display: inline-block; margin: 0 4px 6px 0; background: #f0f0f1; border: 1px solid #dcdcde; border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 13px; }
.wds-pe-chip:hover { border-color: #2271b1; }
.wds-pe-chip.is-active { background: #2271b1; color: #fff; border-color: #2271b1; }
.wds-pe-chip small { opacity: .75; }
.wds-pe-pending { background: #f0f6fc; border-left: 3px solid #2271b1; padding: 8px 10px; }
.wds-pe-check { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 10px; }
.wds-pe-filter { width: 100%; }

.wds-pe-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.wds-pe-card { background: #fff; border: 1px solid #dcdcde; border-radius: 8px; padding: 10px 14px; cursor: pointer; }
.wds-pe-card.is-selected { border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1; }
.wds-pe-card h4 { margin: 0 0 6px; display: flex; justify-content: space-between; gap: 8px; }
.wds-pe-card ol { margin: 0 0 0 20px; font-size: 13px; }

.wds-pe-room-form h2 { margin-top: 0; }
.wds-pe-shapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-bottom: 18px; max-width: 900px; }
.wds-pe-shapes button { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; border: 2px solid #dcdcde; border-radius: 10px; padding: 10px 6px; cursor: pointer; font-weight: 600; }
.wds-pe-shapes button:hover { border-color: #8c8f94; }
.wds-pe-shapes button[aria-checked="true"] { border-color: #2271b1; background: #f0f6fc; }
.wds-room-icon polygon { fill: #f6f3ee; stroke: #3c3a37; stroke-width: 0.35; stroke-linejoin: round; }
.wds-pe-room-preview .wds-room-icon polygon { stroke-width: 0.15; }
.wds-pe-room-cols { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.wds-pe-room-cols .wds-pe-field input { width: 160px; }

@media print {
	#adminmenumain, #wpadminbar, .wds-pe-toolbar, .wds-pe-side, #wpfooter, .notice { display: none !important; }
	#wpcontent { margin: 0 !important; padding: 0 !important; }
	.wds-pe-main { display: block; }
	.wds-pe-canvas { height: 60vh; border: 0; }
}

/* ================= Guest view (front end) ================= */
.wds-wrap.wds-plan-wrap { max-width: 1100px; }
.wds-plan-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.wds-plan-find { position: relative; flex: 1 1 280px; max-width: 460px; display: block; }
.wds-plan-find-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.wds-wrap .wds-plan-search { width: 100%; }
.wds-plan-results { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: #fff; border: 1px solid var(--wds-line); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.14); z-index: 30; overflow: hidden; }
.wds-plan-results button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 11px 14px; background: none; border: 0; border-bottom: 1px solid var(--wds-line); font: inherit; text-align: left; cursor: pointer; color: var(--wds-ink); }
.wds-plan-results button:hover, .wds-plan-results button:focus { background: var(--wds-soft); outline: none; }
.wds-plan-results span { color: var(--wds-muted); white-space: nowrap; }
.wds-plan-nomatch { margin: 0; padding: 12px 14px; color: var(--wds-muted); font-size: 14px; }
.wds-seg-group { display: inline-flex; background: var(--wds-soft); border: 1px solid var(--wds-line); border-radius: 999px; padding: 3px; }
.wds-seg { background: none; border: 0; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--wds-muted); }
.wds-seg[aria-pressed="true"] { background: #fff; color: var(--wds-ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.wds-plan-stage { position: relative; height: var(--wds-plan-h, min(68vh, 640px)); min-height: 340px; border-radius: var(--wds-radius); overflow: hidden; border: 1px solid var(--wds-line); background: #f3eee7; touch-action: none; }
.wds-plan-stage.is-2d { touch-action: auto; overflow: auto; background: #fff; }
.wds-plan-canvas { width: 100% !important; height: 100% !important; display: block; cursor: grab; }
.wds-plan-canvas:active { cursor: grabbing; }
.wds-plan-svg { width: 100%; height: 100%; display: block; }
.wds-plan-svg .wds-room { fill: #faf7f2; stroke: #3c3a37; stroke-width: 0.12; stroke-linejoin: round; }
.wds-plan-svg .wds-table { fill: #fff; stroke: #7a716a; stroke-width: 0.04; }
.wds-plan-svg .wds-chair { fill: #e3dccf; stroke: #a59d93; stroke-width: 0.03; cursor: pointer; }
.wds-plan-svg.is-focus-mode .wds-chair { fill: #d64541 !important; stroke: #a82f2b; }
.wds-plan-svg .wds-chair.is-found { fill: #2fa35a !important; stroke: #1d6e3b; stroke-width: 0.06; }
.wds-plan-svg .wds-table-label { fill: var(--wds-ink); font-family: var(--wds-serif); font-weight: 600; cursor: pointer; }
.wds-plan-svg .wds-feature { stroke: rgba(0,0,0,.2); stroke-width: 0.03; }
.wds-plan-svg .wds-feature-label { fill: #1d1b19; font-weight: 600; font-family: -apple-system, sans-serif; }
.wds-plan-svg .wds-found-ring { fill: none; stroke: #2fa35a; stroke-width: 0.08; animation: wds-ring 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes wds-ring { 50% { transform: scale(1.35); opacity: .45; } }
.wds-plan-pop { position: absolute; z-index: 5; width: 220px; background: rgba(255,255,255,.97); border: 1px solid var(--wds-line); border-radius: 12px; padding: 10px 12px; box-shadow: 0 10px 24px rgba(0,0,0,.15); display: flex; flex-direction: column; gap: 2px; font-size: 14px; pointer-events: none; }
.wds-plan-pop span { color: var(--wds-muted); }
.wds-plan-found { background: #fff; border: 1.5px solid #2fa35a; border-radius: var(--wds-radius); padding: 12px 16px; margin-bottom: 12px; }
.wds-plan-found-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.wds-plan-found-name { font-family: var(--wds-serif); font-size: 24px; }
.wds-plan-found-where { font-weight: 700; color: #23834a; }
.wds-plan-found-mates { margin: 6px 0 0; color: var(--wds-muted); font-size: 14px; }
.wds-plan-under { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 2px 0; }
.wds-plan-hint { margin: 0; font-size: 13px; color: var(--wds-muted); }
.wds-plan-list-title { font-family: var(--wds-serif); font-weight: 500; font-size: 28px; margin: 28px 0 12px; }
.wds-plan-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.wds-plan-card { background: #fff; border: 1px solid var(--wds-line); border-radius: var(--wds-radius); padding: 14px 18px; }
.wds-plan-card h4 { font-family: var(--wds-serif); font-weight: 500; font-size: 21px; margin: 0 0 6px; }
.wds-plan-card h4 small { font-family: inherit; font-size: 13px; color: var(--wds-muted); }
.wds-plan-names { margin: 0; padding-left: 22px; }
.wds-plan-names li { margin: 2px 0; }
.wds-plan-names .wds-link-btn { color: var(--wds-ink); text-decoration: none; font-size: 15px; padding: 1px 0; text-align: left; white-space: normal; }
.wds-plan-names .wds-link-btn:hover { color: var(--wds-accent); text-decoration: underline; }
.wds-plan-soon { text-align: center; }

/* Respect [hidden] on elements that set their own display. */
.wds-plan-editor [hidden], .wds-plan-wrap [hidden] { display: none !important; }

/* Themes often set letter-spacing in px, which is enormous inside a metre-scaled drawing. */
.wds-plan-svg text, .wds-pe-svg text { letter-spacing: normal !important; word-spacing: normal !important; text-transform: none !important; }
.wds-wrap .wds-plan-search { -webkit-appearance: none; appearance: none; }
.wds-plan-stage.is-2d { height: auto; min-height: 0; }
.wds-plan-stage.is-2d .wds-plan-svg { height: auto; max-height: 80vh; }
@media (max-width: 600px) {
	.wds-plan-stage { height: var(--wds-plan-h, 78vw); min-height: 260px; }
	.wds-plan-bar { align-items: stretch; }
	.wds-seg-group { align-self: flex-start; }
}

.wds-plan-legend { margin: 8px 0 0; font-size: 13px; color: var(--wds-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wds-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.wds-dot.is-mine { background: #2fa35a; }
.wds-dot.is-other { background: #d64541; margin-left: 10px; }

/* The bride & groom's chairs are gold. */
.wds-plan-svg .wds-chair.is-couple, .wds-plan-svg.is-focus-mode .wds-chair.is-couple { fill: #e2b23a !important; stroke: #a87d14; }
.wds-plan-svg .wds-chair.is-found { fill: #2fa35a !important; stroke: #1d6e3b; }
.wds-pe-chair.is-couple circle { fill: #e2b23a !important; stroke: #a87d14 !important; }
.wds-pe-chair.is-couple text { fill: #3b2a05 !important; }

/* Let the 3D view own touch gestures (pinch to zoom, drag to turn) on phones. */
.wds-plan-canvas, .wds-pe-3d, .wds-pe-3d canvas { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Your own chair is always green, even for the bride & groom. */
.wds-plan-svg.is-focus-mode .wds-chair.is-found, .wds-plan-svg .wds-chair.is-couple.is-found { fill: #2fa35a !important; stroke: #1d6e3b !important; }
