/*
 * Forms and buttons, one consistent style across the site (client request, 2026-10-26: "more modern,
 * one font size smaller"). Loaded after the page, shop and Tutor styles so it applies to the theme's
 * own forms, WooCommerce (Mein Konto, Auswahl, Kasse) and Tutor LMS (registration, dashboard).
 */

/* Buttons ---------------------------------------------------------------- */

.btn {
	min-height: 42px;
	padding: 11px 22px;
	border-radius: var(--bz-radius-button);
	font-size: 11px;
	letter-spacing: .14em;
}

.btn--small {
	min-height: 34px;
	padding: 0 14px;
	font-size: 10.5px;
}

body .woocommerce .button,
body .woocommerce button.button,
body .woocommerce a.button,
body .woocommerce input.button,
body .woocommerce-page .button,
body .wc-block-components-button:not(.is-link),
body .wp-block-button__link,
body .tutor-btn-primary,
body .tutor-btn-outline-primary,
body form.tutor-registration-form button[type="submit"],
body #tutor-registration-wrap button[type="submit"],
body .tutor-login-form-wrapper button[type="submit"] {
	min-height: 42px;
	padding: 11px 22px;
	border-radius: var(--bz-radius-button);
	font-family: var(--bz-font-ui);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .14em;
	line-height: 1.2;
	text-transform: uppercase;
	box-shadow: none;
}

/* Label always centred in the button, also where the button is a block or has a min-height. */
.btn,
body .woocommerce .button,
body .woocommerce-page .button,
body .wp-block-button__link,
body .tutor-btn-primary,
body .tutor-btn-outline-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
	text-decoration: none;
	transition: background-color var(--bz-speed) var(--bz-ease), border-color var(--bz-speed) var(--bz-ease), color var(--bz-speed) var(--bz-ease);
}

body .woocommerce .button:not(.alt):not(.wc-forward):not(.woocommerce-button--secondary),
body .woocommerce-page .button:not(.alt):not(.wc-forward):not(.woocommerce-button--secondary),
body .tutor-btn-primary,
body form.tutor-registration-form button[type="submit"],
body #tutor-registration-wrap button[type="submit"],
body .tutor-login-form-wrapper button[type="submit"] {
	border: 1px solid var(--bz-forest);
	background: var(--bz-forest);
	color: var(--bz-ivory);
}

body .woocommerce .button:hover,
body .woocommerce-page .button:hover,
body .tutor-btn-primary:hover,
body form.tutor-registration-form button[type="submit"]:hover,
body #tutor-registration-wrap button[type="submit"]:hover,
body .tutor-login-form-wrapper button[type="submit"]:hover {
	border-color: var(--bz-deep);
	background: var(--bz-deep);
	color: var(--bz-ivory);
}

/* Fields ----------------------------------------------------------------- */

body input[type="text"],
body input[type="email"],
body input[type="password"],
body input[type="tel"],
body input[type="url"],
body input[type="number"],
body input[type="search"],
body input[type="date"],
body select,
body textarea {
	min-height: 42px;
	padding: 9px 12px;
	border: 1px solid var(--bz-card-border);
	border-radius: var(--bz-radius-field);
	background-color: var(--bz-field-background);
	color: var(--bz-ink);
	font-family: var(--bz-font-ui);
	font-size: 14px;
	line-height: 1.4;
	box-shadow: none;
	transition: border-color var(--bz-speed) var(--bz-ease), box-shadow var(--bz-speed) var(--bz-ease);
}

body textarea {
	min-height: 120px;
}

body input[type="text"]:focus,
body input[type="email"]:focus,
body input[type="password"]:focus,
body input[type="tel"]:focus,
body input[type="url"]:focus,
body input[type="number"]:focus,
body input[type="search"]:focus,
body input[type="date"]:focus,
body select:focus,
body textarea:focus {
	border-color: var(--bz-gold);
	outline: none;
	box-shadow: 0 0 0 3px rgba(139, 112, 68, .16);
}

/* WooCommerce block checkout keeps its floating labels: only colours and corners. */
body .wc-block-components-text-input input,
body .wc-block-components-combobox .components-combobox-control input,
body .wc-block-components-select-input select {
	min-height: 0;
	border-radius: var(--bz-radius-field);
	background-color: var(--bz-field-background);
	font-size: 14px;
}

body .woocommerce form .form-row label,
body .woocommerce-page form .form-row label,
body .tutor-form-label,
body form.tutor-registration-form label,
body #tutor-registration-wrap label,
body .bz-form label {
	color: var(--bz-forest);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .01em;
}

body .woocommerce fieldset,
body .woocommerce-page fieldset {
	padding: 16px 18px 6px;
	border: 1px solid var(--bz-card-border);
	border-radius: var(--bz-radius);
}

body .woocommerce fieldset legend,
body .woocommerce-page fieldset legend {
	padding: 0 6px;
	color: var(--bz-forest);
	font-size: 13px;
	font-weight: 600;
}

/* Checkboxes (e.g. "Ich akzeptiere die Statuten …") */
.bz-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	line-height: 1.5;
	cursor: pointer;
}

/* One checkbox look site-wide (WooCommerce block checkout and Tutor draw their own). */
body input[type="checkbox"]:not(.wc-block-components-checkbox__input):not(.tutor-form-check-input) {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0 8px 0 0;
	border: 1.5px solid #a99d8b;
	border-radius: 4px;
	background: var(--bz-field-background) center / 12px no-repeat;
	vertical-align: -4px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background-color var(--bz-speed) var(--bz-ease), border-color var(--bz-speed) var(--bz-ease), box-shadow var(--bz-speed) var(--bz-ease);
}

body input[type="checkbox"]:not(.wc-block-components-checkbox__input):not(.tutor-form-check-input):hover {
	border-color: var(--bz-gold);
}

body input[type="checkbox"]:not(.wc-block-components-checkbox__input):not(.tutor-form-check-input):focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(139, 112, 68, .2);
}

body input[type="checkbox"]:not(.wc-block-components-checkbox__input):not(.tutor-form-check-input):checked {
	border-color: var(--bz-forest);
	background-color: var(--bz-forest);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23f6f1e8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.bz-checkbox input[type="checkbox"] {
	margin: 1px 0 0 !important;
}

/* "Angemeldet bleiben" and similar Woo checkbox labels */
body .woocommerce-form__label-for-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0;
	font-size: 13px;
	cursor: pointer;
}

/* Statutes checkbox on the registration form: clear space above and below. */
body .tutor-form-group .bz-statutes,
body form .bz-statutes {
	margin: 22px 0 26px;
	padding: 14px 16px;
	border: 1px solid var(--bz-card-border);
	border-radius: var(--bz-radius);
	background: var(--bz-field-background);
}

/* Notices in Mein Konto, e.g. "Es wurde noch keine Anforderung aufgegeben." + button */
body .woocommerce-MyAccount-content .woocommerce-info,
body .woocommerce-MyAccount-content .woocommerce-message {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	padding: 16px 20px;
	border: 1px solid var(--bz-card-border);
	border-left: 3px solid var(--bz-gold);
	border-radius: var(--bz-radius);
	background: var(--bz-card-background);
	color: var(--bz-ink);
	font-size: 14px;
}

body .woocommerce-MyAccount-content .woocommerce-info::before,
body .woocommerce-MyAccount-content .woocommerce-message::before {
	display: none;
}

body .woocommerce-MyAccount-content .woocommerce-info .button,
body .woocommerce-MyAccount-content .woocommerce-message .button {
	float: none;
	order: 2;
	margin: 0;
}

/* Mein Konto: text one size smaller */
body .woocommerce-MyAccount-content,
body .woocommerce-MyAccount-navigation {
	font-size: 14px;
}

/* Proof upload: drop zone with file list (inc/membership.php) ------------- */

.bz-dropzone {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 92px;
	padding: 18px;
	border: 1.5px dashed var(--bz-card-border);
	border-radius: var(--bz-radius);
	background: var(--bz-field-background);
	color: var(--bz-muted-ink);
	font-size: 13px;
	text-align: center;
	transition: border-color var(--bz-speed) var(--bz-ease), background-color var(--bz-speed) var(--bz-ease);
}

.bz-dropzone.is-dragover,
.bz-dropzone:hover {
	border-color: var(--bz-gold);
	background: var(--bz-card-background);
}

.bz-dropzone input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.bz-dropzone__pick {
	color: var(--bz-forest);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bz-dropzone__list {
	display: grid;
	gap: 6px;
	margin-top: 8px;
}

.bz-dropzone__file {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 7px 10px;
	border: 1px solid var(--bz-card-border);
	border-radius: var(--bz-radius-field);
	background: var(--bz-card-background);
	font-size: 13px;
	overflow-wrap: anywhere;
}

.bz-dropzone__file button {
	flex: none;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--bz-muted-ink);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.bz-dropzone__file button:hover {
	background: var(--bz-card-muted);
	color: var(--bz-forest);
}

.bz-dropzone__note {
	color: #9b2c2c;
	font-size: 12px;
}

/* Profile picture (inc/avatar.php) -------------------------------------- */

.bz-avatar {
	margin: 0 0 24px;
}

.bz-avatar__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
}

.bz-avatar__image,
.bz-avatar img {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	object-fit: cover;
}

.bz-avatar__fields {
	display: grid;
	gap: 6px;
}

.bz-avatar__upload {
	position: relative;
	display: inline-block;
	width: max-content;
}

.bz-avatar__upload input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.bz-avatar__fields small {
	color: var(--bz-muted-ink);
	font-size: 12px;
}

/* Header: "Auswahl (n)" ------------------------------------------------- */

.selection-link__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	margin-left: 4px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--bz-forest);
	color: var(--bz-ivory);
	font-size: 10px;
	letter-spacing: 0;
}
