/* Daisho Form, front end styles. */

.daisho-form-wrap {
	--df-primary: #EC1C25;
	--df-dark: #000000;
	--df-field-bg: #EEEEEE;
	--df-border: #EC1C25;
	--df-font: 'Roboto', Helvetica, Arial, sans-serif;
	--df-btn-font: 'Bebas Neue', Impact, Haettenschweiler, sans-serif;
	--df-size: 17px;
	--df-radius: 8px;
	max-width: 760px;
	margin: 0 auto;
	font-family: var(--df-font);
	font-size: var(--df-size);
	line-height: 1.55;
	color: var(--df-dark);
}

.daisho-form-wrap input,
.daisho-form-wrap select,
.daisho-form-wrap textarea,
.daisho-form-wrap label,
.daisho-form-wrap p,
.daisho-form-wrap h3,
.daisho-form-wrap h4 {
	font-family: var(--df-font);
}

.daisho-form-logo {
	background: var(--df-dark);
	padding: 18px;
	border-radius: var(--df-radius);
	text-align: center;
	margin-bottom: 22px;
}

.daisho-form-logo img {
	max-width: 100%;
	height: auto;
	display: inline-block;
}

.daisho-form-title {
	font-size: 1.7em;
	line-height: 1.25;
	margin: 0 0 6px;
	color: var(--df-dark);
}

.daisho-form-title::after {
	content: "";
	display: block;
	width: 52px;
	height: 3px;
	background: var(--df-primary);
	margin-top: 10px;
}

.daisho-form-subtitle {
	margin: 0 0 24px;
	color: #555;
	font-size: 1em;
}

.daisho-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -8px;
}

.daisho-field {
	padding: 0 8px 16px;
	width: 100%;
	box-sizing: border-box;
}

.daisho-col-half { width: 50%; }
.daisho-col-third { width: 33.3333%; }

.daisho-label {
	display: block;
	font-size: 0.82em;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	margin-bottom: 6px;
	color: var(--df-dark);
}

.daisho-req { color: var(--df-primary); }

.daisho-form input[type="text"],
.daisho-form input[type="email"],
.daisho-form input[type="tel"],
.daisho-form input[type="url"],
.daisho-form input[type="number"],
.daisho-form input[type="date"],
.daisho-form select,
.daisho-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 13px 15px;
	border: 1px solid var(--df-primary);
	border-radius: var(--df-radius);
	background: var(--df-field-bg);
	font-size: var(--df-size);
	line-height: 1.4;
	color: var(--df-dark);
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.daisho-form input::placeholder,
.daisho-form textarea::placeholder { color: #8a8a8a; opacity: 1; }

.daisho-form textarea { resize: vertical; min-height: 130px; }

.daisho-form input:focus,
.daisho-form select:focus,
.daisho-form textarea:focus {
	outline: none;
	border-color: var(--df-primary);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(236, 28, 37, 0.16);
}

.daisho-section {
	padding-top: 10px;
	padding-bottom: 10px;
}

.daisho-form-wrap .daisho-grid > .daisho-section:first-child { padding-top: 0; }

.daisho-section-title {
	font-size: 1.2em;
	line-height: 1.3;
	margin: 0 0 6px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--df-dark);
	color: var(--df-dark);
	position: relative;
}

.daisho-section-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 70px;
	height: 2px;
	background: var(--df-primary);
}

.daisho-section-text {
	margin: 10px 0 0;
	font-size: 0.94em;
	color: #666;
}

.daisho-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
}

.daisho-type-checkbox .daisho-choices {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px 18px;
}

.daisho-type-checkbox .daisho-choices.daisho-grouped {
	display: block;
	column-count: 2;
	column-gap: 34px;
}

.daisho-grouped .daisho-choice {
	break-inside: avoid;
	margin-bottom: 9px;
	font-weight: 600;
}

.daisho-grouped .daisho-choice.daisho-sub {
	margin-left: 22px;
	font-weight: 400;
	font-size: 0.92em;
	color: #555;
	position: relative;
}

.daisho-grouped .daisho-choice.daisho-sub::before {
	content: "";
	position: absolute;
	left: -13px;
	top: 9px;
	width: 8px;
	height: 1px;
	background: var(--df-primary);
}

@media (max-width: 780px) {
	.daisho-type-checkbox .daisho-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.daisho-type-checkbox .daisho-choices.daisho-grouped { column-count: 1; }
}

.daisho-choice {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 0.95em;
	line-height: 1.45;
	cursor: pointer;
}

.daisho-choice input { margin-top: 3px; accent-color: var(--df-primary); }

.daisho-acceptance { font-size: 0.88em; color: #555; }

.daisho-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.daisho-recaptcha { margin: 4px 0 18px; }

.daisho-actions { margin-top: 4px; }

.daisho-submit {
	display: inline-block;
	background: var(--df-primary);
	color: #fff;
	border: 0;
	border-radius: var(--df-radius);
	padding: 15px 40px;
	font-family: var(--df-btn-font);
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.18s ease, transform 0.18s ease;
}

.daisho-submit:hover { background: var(--df-dark); }
.daisho-submit:active { transform: translateY(1px); }
.daisho-submit[disabled] { opacity: 0.6; cursor: not-allowed; }

.daisho-field-error {
	display: none;
	font-size: 0.8em;
	color: var(--df-primary);
	margin-top: 5px;
}

.daisho-field.has-error input,
.daisho-field.has-error select,
.daisho-field.has-error textarea { border-color: var(--df-primary); }
.daisho-field.has-error .daisho-field-error { display: block; }

.daisho-response {
	display: none;
	margin-top: 18px;
	padding: 14px 16px;
	border-radius: var(--df-radius);
	font-size: 0.95em;
	border-left: 4px solid var(--df-primary);
	background: #f7f7f7;
}

.daisho-response.visible { display: block; }
.daisho-response.success { border-left-color: #1f9d55; background: #eefaf1; color: #14532d; }
.daisho-response.error { border-left-color: var(--df-primary); background: #fdeced; color: #7a1015; }

.daisho-legal { font-size: 0.75em; color: #888; margin-top: 12px; }
.daisho-legal a { color: #888; }

@media (max-width: 640px) {
	.daisho-col-half,
	.daisho-col-third { width: 100%; }
}

/* Multi-step mode. */

.daisho-progress { margin-bottom: 26px; }

.daisho-progress-track {
	height: 4px;
	background: #e6e6e6;
	border-radius: 4px;
	overflow: hidden;
}

.daisho-progress-fill {
	display: block;
	height: 100%;
	background: var(--df-primary);
	transition: width 0.35s ease;
}

.daisho-steps-nav {
	list-style: none;
	display: flex;
	margin: 16px 0 0;
	padding: 0;
	gap: 8px;
}

.daisho-step-dot {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 0.8em;
	color: #9a9a9a;
	line-height: 1.25;
}

.daisho-dot {
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #e6e6e6;
	color: #8a8a8a;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8em;
	font-weight: 700;
	transition: background 0.25s ease, color 0.25s ease;
}

.daisho-step-dot.active { color: var(--df-dark); font-weight: 600; }
.daisho-step-dot.active .daisho-dot { background: var(--df-primary); color: #fff; }
.daisho-step-dot.done { cursor: pointer; color: #666; }
.daisho-step-dot.done .daisho-dot { background: var(--df-dark); color: #fff; }

.daisho-step-counter {
	margin: 12px 0 0;
	font-size: 0.8em;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #999;
}

.daisho-form.daisho-js .daisho-step { display: none; }
.daisho-form.daisho-js .daisho-step.active { display: block; animation: daishoFade 0.28s ease; }
.daisho-form-wrap [hidden] { display: none !important; }
.daisho-steps-nav { list-style: none !important; }
.daisho-steps-nav li::marker { content: none; }

@keyframes daishoFade {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

.daisho-multistep .daisho-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 8px;
}

.daisho-next {
	background: var(--df-dark);
	color: #fff;
	border: 0;
	border-radius: var(--df-radius);
	padding: 15px 40px;
	font-family: var(--df-btn-font);
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.18s ease;
}

.daisho-next:hover { background: var(--df-primary); }

.daisho-prev {
	background: transparent;
	border: 1px solid #cfcfcf;
	color: #666;
	border-radius: var(--df-radius);
	padding: 15px 28px;
	font-family: var(--df-btn-font);
	font-size: 1.15em;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color 0.18s ease, color 0.18s ease;
}

.daisho-prev:hover { border-color: var(--df-dark); color: var(--df-dark); }

.daisho-form.daisho-done .daisho-steps,
.daisho-form.daisho-done .daisho-actions,
.daisho-form.daisho-done .daisho-progress,
.daisho-form.daisho-done .daisho-recaptcha { display: none; }

@media (max-width: 680px) {
	.daisho-dot-label { display: none; }
	.daisho-step-dot { flex: 0 0 auto; }
	.daisho-steps-nav { justify-content: flex-start; }
	.daisho-multistep .daisho-actions { flex-direction: column-reverse; align-items: stretch; }
	.daisho-multistep .daisho-actions button { width: 100%; }
}
