/* DP Forms v2 — frontend styles. Colors come from per-form CSS variables. */

.dpf-form {
	max-width: 720px;
	--dpf-primary: #2271b1;
	--dpf-btn-text: #ffffff;
	--dpf-field-bg: #ffffff;
	--dpf-label-color: inherit;
	--dpf-radius: 4px;
}

/* Multi-column layout */
.dpf-page {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -8px;
}
.dpf-page-title { width: 100%; margin: 0 8px 14px; }
.dpf-field {
	box-sizing: border-box;
	padding: 0 8px;
	margin-bottom: 18px;
	width: 100%;
}
.dpf-w-100 { width: 100%; }
.dpf-w-50 { width: 50%; }
.dpf-w-33 { width: 33.333%; }
.dpf-w-25 { width: 25%; }
@media (max-width: 600px) {
	.dpf-w-50, .dpf-w-33, .dpf-w-25 { width: 100%; }
}

.dpf-field > label,
.dpf-field legend {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--dpf-label-color);
}

.dpf-field input[type=text],
.dpf-field input[type=email],
.dpf-field input[type=tel],
.dpf-field input[type=number],
.dpf-field input[type=date],
.dpf-field input[type=time],
.dpf-field input[type=url],
.dpf-field select,
.dpf-field textarea,
.dpf-rte-editor {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #c3c4c7;
	border-radius: var(--dpf-radius);
	font-size: 16px;
	box-sizing: border-box;
	background: var(--dpf-field-bg);
}
.dpf-field input:focus,
.dpf-field select:focus,
.dpf-field textarea:focus,
.dpf-rte-editor:focus {
	outline: 2px solid var(--dpf-primary);
	outline-offset: -1px;
}

.dpf-field fieldset { border: none; padding: 0; margin: 0; }
.dpf-choice { margin: 4px 0; }
.dpf-choice label { display: inline; font-weight: normal; margin-left: 4px; }
.dpf-field input[type=radio],
.dpf-field input[type=checkbox] { accent-color: var(--dpf-primary); }

.dpf-req { color: #c0392b; }
.dpf-text-block { margin-bottom: 4px; }
.dpf-hint-small { display: block; font-size: 12px; color: #777; margin-top: 4px; }

/* Buttons */
.dpf-submit, .dpf-next {
	padding: 12px 28px;
	font-size: 16px;
	border: none;
	border-radius: var(--dpf-radius);
	background: var(--dpf-primary);
	color: var(--dpf-btn-text);
	cursor: pointer;
}
.dpf-submit:hover, .dpf-next:hover { filter: brightness(0.9); }
.dpf-submit:disabled { opacity: .6; cursor: default; }
.dpf-back {
	padding: 12px 24px;
	font-size: 16px;
	border: none;
	border-radius: var(--dpf-radius);
	background: #e5e5e5;
	color: #333;
	cursor: pointer;
}
.dpf-back:hover { background: #d5d5d5; }
.dpf-field-nav { display: flex; gap: 10px; }

/* Messages */
.dpf-message { display: none; padding: 12px 16px; border-radius: var(--dpf-radius); margin: 10px 8px 0; width: 100%; box-sizing: border-box; }
.dpf-message.dpf-success { background: #e7f7ed; border: 1px solid #46b450; color: #1d6f31; }
.dpf-message.dpf-error { background: #fbeaea; border: 1px solid #dc3232; color: #8a1f1f; }

/* Conditional logic */
.dpf-logic-hidden { display: none !important; }

/* Multi-step progress */
.dpf-progress {
	height: 8px;
	background: #e5e5e5;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 6px;
}
.dpf-progress-bar {
	height: 100%;
	background: var(--dpf-primary);
	border-radius: 4px;
	transition: width .3s ease;
}
.dpf-progress-label { font-size: 13px; color: #666; margin-bottom: 18px; }

/* Star rating (row-reverse so hover/checked highlights stars to the left) */
.dpf-stars {
	display: inline-flex;
	flex-direction: row-reverse;
	gap: 2px;
}
.dpf-stars input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.dpf-stars label {
	font-size: 30px;
	line-height: 1;
	color: #ccc;
	cursor: pointer;
	display: inline !important;
	font-weight: normal !important;
	transition: color .15s ease;
}
.dpf-stars input:checked ~ label,
.dpf-stars label:hover,
.dpf-stars label:hover ~ label { color: #f5b301; }
.dpf-stars input:focus-visible + label { outline: 2px solid var(--dpf-primary); }

/* Slider */
.dpf-slider-row { display: flex; align-items: center; gap: 12px; }
.dpf-slider-row input[type=range] { flex: 1; accent-color: var(--dpf-primary); }
.dpf-slider-value {
	min-width: 42px;
	text-align: center;
	font-weight: 600;
	background: var(--dpf-field-bg);
	border: 1px solid #c3c4c7;
	border-radius: var(--dpf-radius);
	padding: 4px 8px;
}

/* Rich text */
.dpf-rte-toolbar {
	display: flex;
	gap: 4px;
	margin-bottom: 4px;
}
.dpf-rte-toolbar button {
	padding: 4px 10px;
	border: 1px solid #c3c4c7;
	border-radius: var(--dpf-radius);
	background: #f5f5f5;
	cursor: pointer;
	font-size: 13px;
}
.dpf-rte-toolbar button:hover { background: #e8e8e8; }
.dpf-rte-editor {
	min-height: 120px;
	overflow-y: auto;
}
.dpf-rte-editor:empty:before {
	content: attr(data-placeholder);
	color: #999;
}

/* File upload */
.dpf-field input[type=file] {
	width: 100%;
	padding: 8px;
	border: 1px dashed #c3c4c7;
	border-radius: var(--dpf-radius);
	background: var(--dpf-field-bg);
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/* Themes                                                               */
/* ------------------------------------------------------------------ */

/* Modern: rounded with soft shadows */
.dpf-theme-modern { --dpf-radius: 10px; }
.dpf-theme-modern .dpf-field input,
.dpf-theme-modern .dpf-field select,
.dpf-theme-modern .dpf-field textarea,
.dpf-theme-modern .dpf-rte-editor {
	border-color: #e0e0e0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.dpf-theme-modern .dpf-submit,
.dpf-theme-modern .dpf-next { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }

/* Minimal: underline-only fields */
.dpf-theme-minimal .dpf-field input[type=text],
.dpf-theme-minimal .dpf-field input[type=email],
.dpf-theme-minimal .dpf-field input[type=tel],
.dpf-theme-minimal .dpf-field input[type=number],
.dpf-theme-minimal .dpf-field input[type=date],
.dpf-theme-minimal .dpf-field input[type=time],
.dpf-theme-minimal .dpf-field input[type=url],
.dpf-theme-minimal .dpf-field select,
.dpf-theme-minimal .dpf-field textarea {
	border: none;
	border-bottom: 2px solid #c3c4c7;
	border-radius: 0;
	background: transparent;
	padding-left: 2px;
	padding-right: 2px;
}
.dpf-theme-minimal .dpf-field input:focus,
.dpf-theme-minimal .dpf-field select:focus,
.dpf-theme-minimal .dpf-field textarea:focus {
	outline: none;
	border-bottom-color: var(--dpf-primary);
}

/* Card: boxed form with shadow */
.dpf-theme-card {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
	padding: 28px 24px;
}

/* Pill: fully rounded */
.dpf-theme-pill { --dpf-radius: 999px; }
.dpf-theme-pill .dpf-field textarea,
.dpf-theme-pill .dpf-rte-editor { border-radius: 16px; }
.dpf-theme-pill .dpf-field input[type=file] { border-radius: 16px; }

/* Honeypot — visually hidden from humans */
.dpf-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
