/* Form controls scoped to platform */

.dbep-form,
.dbep-modal,
.dbep-home-auth {
	font-family: var(--dbep-font);
	color: var(--dbep-text);
}

.dbep-fieldset {
	border: 1px solid var(--dbep-border);
	border-radius: var(--dbep-radius-sm);
	padding: 16px;
	margin: 0 0 16px;
	background: var(--dbep-surface);
}

.dbep-fieldset legend {
	padding: 0 6px;
	font-weight: 600;
	font-size: 14px;
	color: var(--dbep-text);
}

.dbep-field {
	margin-bottom: 16px;
}

.dbep-language-custom {
	margin-top: 12px;
	margin-bottom: 0;
}

.dbep-language-custom[hidden] {
	display: none !important;
}

.dbep-field > label:first-child,
.dbep-field__label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 14px;
	color: var(--dbep-text);
}

.dbep-field input[type="text"],
.dbep-field input[type="email"],
.dbep-field input[type="password"],
.dbep-field input[type="date"],
.dbep-input {
	width: 100%;
	max-width: 100%;
	height: var(--dbep-input-height);
	padding: 0 12px;
	border: 1px solid var(--dbep-border);
	border-radius: var(--dbep-radius-sm);
	background: var(--dbep-card);
	color: var(--dbep-text);
	font-size: 15px;
	box-sizing: border-box;
	transition: border-color var(--dbep-transition), box-shadow var(--dbep-transition);
}

.dbep-field input:focus,
.dbep-input:focus,
.dbep-select:focus {
	outline: none;
	border-color: var(--dbep-accent);
	box-shadow: 0 0 0 3px rgba(37, 117, 210, 0.2);
}

.dbep-select-wrap {
	position: relative;
	max-width: 100%;
}

.dbep-select-wrap::after {
	content: "";
	position: absolute;
	right: 14px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--dbep-text-muted);
	border-bottom: 2px solid var(--dbep-text-muted);
	transform: translateY(-65%) rotate(45deg);
	pointer-events: none;
}

.dbep-select {
	width: 100%;
	max-width: 100%;
	height: var(--dbep-input-height);
	padding: 0 36px 0 12px;
	border: 1px solid var(--dbep-border);
	border-radius: var(--dbep-radius-sm);
	background: var(--dbep-card);
	color: var(--dbep-text);
	font-size: 15px;
	appearance: none;
	cursor: pointer;
	box-sizing: border-box;
	transition: border-color var(--dbep-transition), box-shadow var(--dbep-transition);
}

.dbep-checklist,
.dbep-radio-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dbep-check,
.dbep-radio {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-weight: 400;
	line-height: 1.4;
}

.dbep-radio {
	align-items: flex-start;
}

.dbep-check input,
.dbep-radio input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.dbep-check__mark,
.dbep-radio__mark {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border: 1.5px solid var(--dbep-border-strong);
	background: var(--dbep-card);
	transition: all var(--dbep-transition);
}

.dbep-radio__mark {
	margin-top: 1px;
}

.dbep-check__mark {
	border-radius: 5px;
}

.dbep-radio__mark {
	border-radius: 50%;
}

.dbep-check input:checked + .dbep-check__mark,
.dbep-radio input:checked + .dbep-radio__mark {
	border-color: var(--dbep-accent);
	background: var(--dbep-accent);
}

.dbep-check input:checked + .dbep-check__mark::after {
	content: "";
	display: block;
	width: 5px;
	height: 9px;
	margin: 2px auto 0;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.dbep-radio input:checked + .dbep-radio__mark::after {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	margin: 5px auto 0;
	border-radius: 50%;
	background: #fff;
}

.dbep-check input:focus-visible + .dbep-check__mark,
.dbep-radio input:focus-visible + .dbep-radio__mark,
.dbep-check:hover .dbep-check__mark,
.dbep-radio:hover .dbep-radio__mark {
	border-color: var(--dbep-accent);
}

.dbep-check__text,
.dbep-radio__text {
	color: var(--dbep-text);
	font-size: 15px;
}

/* DevBrothers Auth in sidebar */
.dbep-home-auth .dba-auth-form input[type="email"],
.dbep-home-auth .dba-auth-form input[type="password"],
.dbep-home-auth .dba-auth-form input[type="text"] {
	width: 100%;
	height: var(--dbep-input-height);
	padding: 0 12px;
	border: 1px solid var(--dbep-border);
	border-radius: var(--dbep-radius-sm);
	background: var(--dbep-card);
	font-size: 15px;
	box-sizing: border-box;
}

.dbep-home-auth .dba-auth-form button[type="submit"],
.dbep-home-auth .dba-auth-btn {
	border-radius: var(--dbep-radius-sm);
	background: var(--dbep-accent);
	border: 1px solid var(--dbep-accent);
	color: #fff;
	font-family: var(--dbep-font);
	font-weight: 600;
	min-height: 40px;
	transition: background var(--dbep-transition), border-color var(--dbep-transition);
}

.dbep-home-auth .dba-auth-form button[type="submit"]:hover,
.dbep-home-auth .dba-auth-btn:hover {
	background: var(--dbep-accent-hover);
	border-color: var(--dbep-accent-hover);
}
