/* Danza en Escena – Formulario (mobile first) */
.dee {
	--dee-accent: #8a1c4a;
	--dee-text: #1f1f23;
	--dee-muted: #6b6b76;
	--dee-border: #dcdce2;
	--dee-bg: #ffffff;
	--dee-soft: #f6f5f7;
	--dee-danger: #b42318;
	--dee-radius: 12px;
	max-width: 680px;
	margin: 0 auto;
	color: var(--dee-text);
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}
.dee *, .dee *::before, .dee *::after { box-sizing: border-box; }

.dee-header { text-align: center; margin-bottom: 20px; }
.dee-logo { max-width: 180px; max-height: 110px; width: auto; height: auto; display: block; margin: 0 auto 12px; }
.dee-title { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.25; }
.dee-desc { color: var(--dee-muted); font-size: .95rem; }
.dee-desc p { margin: 0 0 .5em; }

.dee-card {
	background: var(--dee-bg);
	border: 1px solid var(--dee-border);
	border-radius: var(--dee-radius);
	padding: 20px 16px;
}
.dee-loading, .dee-closed { text-align: center; color: var(--dee-muted); }

.dee-topbar {
	display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: center; align-items: baseline;
	font-size: .9rem; color: var(--dee-muted); margin-bottom: 12px;
}

/* Pasos */
.dee-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 20px; padding: 0; }
.dee-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .72rem; color: var(--dee-muted); margin: 0; text-align: center; }
.dee-steps li::before { content: ""; display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--dee-border); }
.dee-steps li.is-done::before, .dee-steps li.is-current::before { background: var(--dee-accent); }
.dee-steps li.is-current { color: var(--dee-text); font-weight: 600; }
.dee-step-num { display: none; }
.dee-step-label { display: none; }
.dee-steps li.is-current .dee-step-label { display: inline; }

.dee-step-title { margin: 0 0 6px; font-size: 1.2rem; line-height: 1.3; }
.dee-hint { margin: 0 0 12px; color: var(--dee-muted); font-size: .88rem; }
.dee-center { text-align: center; }

/* Campos */
.dee-field { margin: 0 0 16px; }
.dee-label { display: block; font-weight: 600; font-size: .95rem; margin: 0 0 6px; }
.dee-field .dee-hint { margin-top: -2px; margin-bottom: 6px; }
.dee .dee-input {
	display: block; width: 100%; min-height: 48px; margin: 0;
	padding: 10px 12px; font: inherit; font-size: 16px; color: var(--dee-text);
	background: #fff; border: 1px solid var(--dee-border); border-radius: 10px;
	box-shadow: none; appearance: none; -webkit-appearance: none;
}
.dee select.dee-input {
	padding-right: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6b76' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center;
}
.dee textarea.dee-input { min-height: 110px; resize: vertical; }
.dee .dee-input:focus { outline: none; border-color: var(--dee-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dee-accent) 20%, transparent); }
.dee .dee-input[readonly] { background: var(--dee-soft); color: var(--dee-muted); }
.dee .has-error .dee-input, .dee .dee-input[aria-invalid="true"] { border-color: var(--dee-danger); }
.dee-error { color: var(--dee-danger); font-size: .85rem; margin: 6px 0 0; }
.dee-code-input { letter-spacing: 8px; font-size: 22px !important; text-align: center; }

/* Tarjetas de elección y pills */
.dee-choices { display: grid; gap: 10px; margin: 12px 0 16px; }
.dee-choice, .dee-pill {
	position: relative; display: block; cursor: pointer;
	border: 1px solid var(--dee-border); border-radius: 10px; background: #fff;
	transition: border-color .15s, background-color .15s;
}
.dee-choice { padding: 14px 16px 14px 46px; }
.dee-choice input, .dee-pill input { position: absolute; opacity: 0; pointer-events: none; }
.dee-choice::before {
	content: ""; position: absolute; left: 16px; top: 16px; width: 18px; height: 18px;
	border: 2px solid var(--dee-border); border-radius: 50%; background: #fff;
}
.dee-choice.is-selected, .dee-pill.is-selected { border-color: var(--dee-accent); background: color-mix(in srgb, var(--dee-accent) 7%, #fff); }
.dee-choice.is-selected::before { border-color: var(--dee-accent); box-shadow: inset 0 0 0 4px #fff; background: var(--dee-accent); }
.dee-choice:focus-within, .dee-pill:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--dee-accent) 25%, transparent); }
.dee-choice-title { display: block; font-weight: 600; }
.dee-choice-sub { display: block; color: var(--dee-muted); font-size: .85rem; }
.dee-pills { display: flex; gap: 10px; }
.dee-pill { flex: 1; text-align: center; padding: 12px; min-height: 48px; font-weight: 500; }

/* Opcional y archivo */
.dee-optional { font-weight: 400; color: var(--dee-muted); font-size: .85rem; }
.dee-file {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap; cursor: pointer;
	padding: 10px 12px; min-height: 52px; border: 1px dashed var(--dee-border); border-radius: 10px; background: #fff;
}
.dee-file:hover { border-color: var(--dee-muted); }
.dee-file:focus-within { border-color: var(--dee-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dee-accent) 20%, transparent); }
.dee-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.dee-file-btn {
	flex: 0 0 auto; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: .9rem;
	background: color-mix(in srgb, var(--dee-accent) 10%, #fff); color: var(--dee-accent);
}
.dee-file-name { flex: 1 1 140px; min-width: 0; color: var(--dee-muted); font-size: .9rem; word-break: break-all; }
.has-error .dee-file { border-color: var(--dee-danger); }

/* Información y badges */
.dee-info {
	margin: -6px 0 16px; padding: 10px 12px; font-size: .9rem;
	background: var(--dee-soft); border-radius: 8px; white-space: pre-line;
}
.dee-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.dee-badge {
	white-space: nowrap;
	display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
	background: color-mix(in srgb, var(--dee-accent) 12%, #fff); color: var(--dee-accent);
}
.dee-badge-alt { background: #fff4e5; color: #8a4b00; }
.dee .dee-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; letter-spacing: .06em; }
.dee-code-box {
	display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 4px auto 16px; padding: 12px 16px;
	border: 1px dashed var(--dee-accent); border-radius: 10px; color: var(--dee-muted); font-size: .85rem; max-width: 320px;
}
.dee-code-box .dee-code { font-size: 1.5rem; color: var(--dee-text); }
.dee-cost { margin: -4px 0 16px; font-size: .95rem; }
.dee-cost strong { color: var(--dee-text); }
.dee-badge-money { background: #e7f3ec; color: #1a6b3c; }
.dee-amount {
	display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px;
	margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--dee-accent) 8%, #fff);
}
.dee-amount span { color: var(--dee-muted); font-size: .9rem; }
.dee-amount strong { font-size: 1.35rem; color: var(--dee-text); }
.dee-amount small { flex-basis: 100%; color: var(--dee-muted); font-size: .82rem; }
.dee-badge-review { background: #e5f0fb; color: #0b4f8a; }
.dee-badge-ok { background: #e7f3ec; color: #1a6b3c; }
.dee-info-ok { background: #e7f3ec; color: #1a6b3c; }
.dee-upload-box { border-top: 1px dashed var(--dee-border); margin-top: 10px; padding-top: 12px; }
.dee-pills-wrap .dee-pills { flex-wrap: wrap; }
.dee-pills-wrap .dee-pill { flex: 1 1 calc(50% - 10px); }
.dee-badge-muted { background: var(--dee-soft); color: var(--dee-muted); }

/* Grupos */
.dee-fieldset { border: 0; border-top: 1px solid var(--dee-border); margin: 8px 0 0; padding: 16px 0 0; min-width: 0; }
.dee-fieldset legend { font-weight: 700; font-size: 1rem; padding: 0 8px 0 0; }
.dee-participant { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dee-participant .dee-input { flex: 1; }
.dee-participant-num {
	flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--dee-soft);
	display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; color: var(--dee-muted);
}
.dee-icon-btn {
	flex: 0 0 44px; height: 44px; border: 1px solid var(--dee-border); border-radius: 10px; background: #fff;
	font-size: 22px; line-height: 1; color: var(--dee-muted); cursor: pointer; padding: 0;
}
.dee-participants.has-error .dee-input { border-color: var(--dee-danger); }

/* Botones */
.dee-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.dee-nav-stack { flex-direction: column; }
.dee .dee-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px;
	font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; text-transform: none; letter-spacing: normal;
	border-radius: 10px; border: 1px solid transparent; cursor: pointer; box-shadow: none;
}
.dee .dee-btn:disabled { opacity: .6; cursor: progress; }
.dee .dee-btn-primary { background: var(--dee-accent); color: #fff; flex: 1; }
.dee .dee-btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.dee .dee-btn-ghost { background: #fff; color: var(--dee-text); border-color: var(--dee-border); }
.dee .dee-btn-ghost:hover:not(:disabled) { border-color: var(--dee-muted); }
.dee .dee-btn-danger { background: #fff; color: var(--dee-danger); border-color: color-mix(in srgb, var(--dee-danger) 35%, #fff); }
.dee .dee-btn-small { min-height: 40px; padding: 8px 14px; font-size: .9rem; }
.dee .dee-btn:focus-visible, .dee .dee-link:focus-visible, .dee .dee-icon-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--dee-accent) 40%, transparent); outline-offset: 2px; }
.dee .dee-link {
	background: none; border: 0; padding: 0; margin: 0; font: inherit; font-size: .9rem; font-weight: 600;
	color: var(--dee-accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; box-shadow: none; min-height: 0;
}

/* Revisión */
.dee-review { border: 1px solid var(--dee-border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.dee-review-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.dee-review-head h4 { margin: 0; font-size: 1rem; }
.dee-summary { margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px 12px; }
.dee-summary dt { color: var(--dee-muted); font-size: .82rem; margin: 6px 0 0; }
.dee-summary dd { margin: 0; white-space: pre-line; word-break: break-word; }

.dee-notice {
	padding: 12px 14px; margin: 0 0 16px; border-radius: 10px; font-size: .92rem;
	background: #fff4e5; color: #6b3a00; border: 1px solid #f5d7a8;
}

/* Lista */
.dee-item { border: 1px solid var(--dee-border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.dee-item.is-cancelled { opacity: .65; }
.dee-item-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.dee-item-title { margin: 0; font-weight: 600; }
.dee-item-meta { margin: 0; color: var(--dee-muted); font-size: .85rem; }
.dee-item-people { margin: 8px 0; font-size: .92rem; }
.dee-item-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Éxito */
.dee-done { text-align: left; }
.dee-done-icon {
	width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center;
	background: color-mix(in srgb, var(--dee-accent) 12%, #fff); color: var(--dee-accent); font-size: 26px; font-weight: 700;
}
.dee-done .dee-step-title, .dee-done > p { text-align: center; }

.dee-sr, .dee-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tablet y escritorio */
@media (min-width: 600px) {
	.dee-card { padding: 28px; }
	.dee-title { font-size: 1.75rem; }
	.dee-choices { grid-template-columns: 1fr 1fr; }
	.dee-steps li { font-size: .78rem; }
	.dee-step-label { display: inline !important; }
	.dee-summary { grid-template-columns: 38% 1fr; }
	.dee-summary dt { margin: 4px 0; }
	.dee-summary dd { margin: 4px 0; }
	.dee-nav-stack { flex-direction: row; }
	.dee .dee-btn-primary { flex: 0 1 auto; min-width: 200px; }
	.dee-nav-stack .dee-btn-primary { flex: 1; }
}
@media (min-width: 600px) {
	.dee-pills-wrap .dee-pill { flex: 1 1 0; }
}
.dee-item-meta .dee-code { font-size: .85rem; letter-spacing: .04em; }

/* Colores configurables (Configuración → Color de títulos / textos / enlaces) */
.dee { --dee-title: var(--dee-text); --dee-link: var(--dee-accent); }
.dee .dee-title, .dee .dee-step-title, .dee h2, .dee h3, .dee h4 { color: var(--dee-title); }
.dee a:not(.dee-btn), .dee .dee-link { color: var(--dee-link); }

/* 2.6: pagos compartidos y abonos */
.dee .dee-notice.is-ok { background: #e7f6ec; color: #14532d; border-color: #b7e2c4; }
.dee-badge-partial { background: #efe7fb; color: #5b2a9a; }
.dee-paykind .dee-choices { margin-bottom: 12px; }
.dee-money { display: flex; align-items: center; gap: 8px; }
.dee-money-cur { font-weight: 700; color: var(--dee-muted); }
.dee .dee-money-input { max-width: 180px; font-size: 1.25rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

.dee-paybar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
	margin: 0 0 16px; padding: 14px 16px; border-radius: 10px;
	background: color-mix(in srgb, var(--dee-accent) 7%, #fff); border: 1px solid color-mix(in srgb, var(--dee-accent) 30%, #fff);
}
.dee-paybar > div { display: flex; flex-direction: column; gap: 2px; }
.dee-paybar-label { color: var(--dee-muted); font-size: .9rem; }
.dee-paybar-amount { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.dee-paybar .dee-hint { flex-basis: 100%; margin: 0; }

.dee-paylist { display: grid; gap: 8px; margin-top: 6px; }
.dee-payitem {
	position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin: 0;
	border: 1px solid var(--dee-border); border-radius: 10px; background: #fff; cursor: pointer;
}
.dee-payitem input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--dee-accent); }
.dee-payitem.is-selected { border-color: var(--dee-accent); background: color-mix(in srgb, var(--dee-accent) 5%, #fff); }
.dee-payitem:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--dee-accent) 25%, transparent); }
.dee-payitem-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dee-payitem-title { font-weight: 600; overflow-wrap: anywhere; }
.dee-payitem-title .dee-code { font-size: .85rem; letter-spacing: .04em; }
.dee-payitem-people { color: var(--dee-muted); font-size: .85rem; overflow-wrap: anywhere; }
.dee-payitem-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }

.dee-pay-preview { margin: 4px 0 16px; padding: 12px 14px; border: 1px dashed var(--dee-border); border-radius: 10px; }
.dee-pay-preview .dee-summary { margin: 6px 0 8px; }
.dee-pay-preview .dee-hint { margin: 0; }

.dee-pays { list-style: none; margin: 8px 0 10px; padding: 0; display: grid; gap: 6px; }
.dee-pay { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--dee-soft); font-size: .85rem; }
.dee-pay-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: center; }
.dee-pay-meta { margin: 4px 0 0; color: var(--dee-muted); }
.dee-pay-reason { color: var(--dee-danger); }
.dee .dee-pay-remove { margin-top: 4px; font-size: .85rem; }

/* 2.7: modo administrador ("Ver como el usuario") */
.dee-adminbar {
	position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50;
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
	margin: 0 0 14px; padding: 10px 14px; border-radius: 10px;
	background: #1d2327; color: #fff; font-size: .88rem; line-height: 1.35;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.dee-adminbar-text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.dee-adminbar-text strong { color: #f0b849; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; }
.dee-adminbar-warn { color: #f0b849; }
.dee .dee-adminbar-notify { display: flex; align-items: center; gap: 6px; margin: 0; color: #fff; cursor: pointer; }
.dee-adminbar-notify input { width: 18px; height: 18px; margin: 0; accent-color: #f0b849; }
.dee .dee-adminbar-exit { background: #fff; color: #1d2327; border-color: #fff; }
