/**
 * Frontend form styles for БАСЗ Conference Registration plugin.
 * 
 * Note: Most form styles should be in the theme's CSS.
 * This file contains plugin-specific styles only.
 *
 * @package Basz_Conference_Registration
 */

/* Messages */
.basz-conference-messages {
    margin-bottom: 20px;
}

.basz-conference-message {
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
}

.basz-conference-message--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.basz-conference-message--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Field errors */
.field-error {
    display: block;
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea,
input.has-error,
select.has-error,
textarea.has-error {
    border-color: #dc3545 !important;
    background-color: #fff8f8;
}

/* Loading state */
.conference-form__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* reCAPTCHA notice */
.recaptcha-notice {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
}

.recaptcha-notice a {
    color: #666;
    text-decoration: underline;
}

.recaptcha-notice a:hover {
    color: #333;
}

/* Hide reCAPTCHA badge (we show notice instead) */
.grecaptcha-badge {
    visibility: hidden !important;
}


/* ========================================
   Registration Form Section
   ======================================== */
   .conference-form-section {
	position: relative;
	padding: 64px 0;
	overflow: hidden;
	background-size: cover;
	background-position: top left;
	background-repeat: no-repeat;
}

.conference-form-section__decoration {
	position: absolute;
	z-index: 1;
	pointer-events: none;
}

.conference-form-section__decoration--left {
	top: 0;
	left: -100px;
	width: 400px;
	opacity: 0.5;
}

.conference-form-section__decoration--right {
	bottom: 20%;
	right: -150px;
	width: 500px;
	opacity: 0.5;
}

.conference-form-wrapper {
	position: relative;
	z-index: 2;
	max-width: var(--conference-form-width);
	margin: 0 auto;
	background-color: var(--conference-form-bg);
	border-radius: 4px;
	padding: 40px 64px;
}

@media (max-width: 768px) {
	.conference-form-wrapper {
		margin: 0 20px;
		padding: 24px 20px;
	}
}

.conference-form__title {
	font-family: var(--wp--preset--font-family--archivo, "Archivo", sans-serif);
	font-size: 24px;
	font-weight: 700;
	color: var(--conference-text-dark);
	margin: 0 0 20px;
	line-height: 1.2;
}

.conference-form__section-title {
	font-family: var(--wp--preset--font-family--archivo, "Archivo", sans-serif);
	font-size: 18px;
	font-weight: 700;
	color: var(--conference-text-dark);
	margin: 0 0 20px;
	line-height: 1.2;
}

.conference-form__divider {
	border: none;
	height: 2px;
	background: #9C9D9F;
	margin: 20px auto;
	max-width: 200px;
}

/* Form Elements */
.form-group {
	margin-bottom: 16px;
}

/* .form-group label {
	display: block;
	margin-bottom: 4px;
	font-family: var(--wp--preset--font-family--oxygen, "Oxygen", sans-serif);
	font-size: 16px;
	font-weight: 400;
	color: #1C1A17;
	line-height: 1.5;
} */

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
	width: 100%;
	padding: 8px 12px;
	font-family: var(--wp--preset--font-family--oxygen, "Oxygen", sans-serif);
	font-size: 16px;
	color: #1C1A17;
	background-color: #fff;
	border: 1px solid var(--conference-border-color);
	border-radius: 2px;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--orange, #FF995D);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
	color: #9C9D9F;
}

.form-group select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 256 256'%3E%3Cpath fill='%2325354C' d='M128 180a4 4 0 0 1-2.83-1.17l-80-80a4 4 0 0 1 5.66-5.66L128 170.34l77.17-77.17a4 4 0 1 1 5.66 5.66l-80 80A4 4 0 0 1 128 180Z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 8px center;
	background-size: 24px;
	padding-right: 40px;
	cursor: pointer;
}

.form-group textarea {
	min-height: 75px;
	resize: vertical;
}

/* Radio Buttons */
.radio-group {
	display: flex;
	gap: 64px;
	margin-top: 8px;
}

.radio-group--vertical {
	flex-direction: column;
	gap: 12px;
}

@media (max-width: 480px) {
	.radio-group {
		flex-direction: column;
		gap: 16px;
	}
}

.radio-label {
	display: flex;
	align-items: center;
	gap: 16px;
	cursor: pointer;
	font-family: var(--wp--preset--font-family--oxygen, "Oxygen", sans-serif);
	font-size: 16px;
	color: var(--conference-text-dark);
}

.radio-label input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	width: 32px;
	height: 32px;
	border: 1px solid var(--conference-border-color);
	border-radius: 50%;
	background-color: #fff;
	cursor: pointer;
	position: relative;
	flex-shrink: 0;
}

.radio-label input[type="radio"]:checked {
	border-color: var(--wp--preset--color--orange, #FF995D);
}

.radio-label input[type="radio"]:checked::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 16px;
	height: 16px;
	background-color: var(--wp--preset--color--orange, #FF995D);
	border-radius: 50%;
}

.radio-label .price {
	font-weight: 700;
}

/* Required Note */
.required-note {
	font-family: var(--wp--preset--font-family--oxygen, "Oxygen", sans-serif);
	font-size: 16px;
	color: var(--conference-text-dark);
	margin: 20px 0;
}

/* Submit Button */
.conference-form__submit {
	display: block;
	padding: 8px 16px;
	font-family: var(--wp--preset--font-family--oxygen, "Oxygen", sans-serif);
	font-size: 16px;
	font-weight: 700;
	color: #131B2A;
	background-color: var(--wp--preset--color--medium-orange, #FF995D);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	margin: 10px auto 0 auto;
}

.conference-form__submit:hover {
	background-color: #e5b07f;
}

/* GDPR Notice */
.gdpr-notice {
	font-family: var(--wp--preset--font-family--oxygen, "Oxygen", sans-serif);
	font-size: 14px;
	color: var(--conference-text-dark);
	line-height: 1.5;
	margin-top: 20px;
}

/* ========================================
   Feedback Form Specific Styles
   ======================================== */

.basz-feedback-form-wrapper .feedback-intro {
	margin-bottom: 24px;
}

.basz-feedback-form-wrapper .feedback-intro p {
	font-family: var(--wp--preset--font-family--oxygen, "Oxygen", sans-serif);
	font-size: 15px;
	line-height: 1.6;
	color: var(--conference-text-dark);
	margin: 0;
}

.basz-feedback-form-wrapper .feedback-scale-note {
	font-family: var(--wp--preset--font-family--oxygen, "Oxygen", sans-serif);
	font-size: 14px;
	color: var(--conference-text-dark);
	margin: 0 0 16px;
	font-style: italic;
}

.basz-feedback-form-wrapper .feedback-rating-label {
	display: block;
	margin-bottom: 8px;
	font-family: var(--wp--preset--font-family--oxygen, "Oxygen", sans-serif);
	font-size: 16px;
	font-weight: 600;
	color: var(--conference-text-dark);
	line-height: 1.4;
}

.basz-feedback-form-wrapper .feedback-rating-group {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 8px;
}

.basz-feedback-form-wrapper .feedback-rating__option {
	gap: 8px;
	min-width: 56px;
}

.basz-feedback-form-wrapper .feedback-rating__option input[type="radio"] {
	width: 28px;
	height: 28px;
}

.basz-feedback-form-wrapper .feedback-rating__option input[type="radio"]:checked::after {
	width: 14px;
	height: 14px;
}

.basz-feedback-form-wrapper .feedback-rating__option span {
	font-weight: 600;
	font-size: 16px;
}

@media (max-width: 480px) {
	.basz-feedback-form-wrapper .feedback-rating-group {
		gap: 10px;
		flex-direction: row;
	}

	.basz-feedback-form-wrapper .feedback-rating__option {
		min-width: 48px;
	}
}

.basz-feedback-form-wrapper .feedback-other-option {
	flex-wrap: wrap;
}

.basz-feedback-form-wrapper .feedback-other-input {
	flex: 1 1 200px;
	margin-left: 8px;
	padding: 6px 10px;
	font-family: var(--wp--preset--font-family--oxygen, "Oxygen", sans-serif);
	font-size: 15px;
	border: 1px solid var(--conference-border-color);
	border-radius: 2px;
	background-color: #fff;
	min-width: 0;
}

.basz-feedback-form-wrapper .feedback-other-input:focus {
	outline: none;
	border-color: var(--wp--preset--color--orange, #FF995D);
}

.basz-feedback-form-wrapper .feedback-thanks {
	text-align: center;
	font-family: var(--wp--preset--font-family--archivo, "Archivo", sans-serif);
	font-size: 20px;
	font-weight: 700;
	color: var(--conference-text-dark);
	margin: 16px 0 0;
}

/* ——— Registration wizard (three steps, Figma "Регистрационна форма") ———
   Without JS every step is shown; .is-wizard (added by recaptcha.js) shows
   one step at a time. Colours fall back to the Figma values when the theme
   sets no variables. */
.conference-form.is-wizard .conference-step {
	display: none;
}

.conference-form.is-wizard .conference-step.is-active {
	display: block;
}

.conference-form:not(.is-wizard) .conference-step__next,
.conference-form:not(.is-wizard) .conference-step__back {
	display: none;
}

.conference-form:not(.is-wizard) .conference-step + .conference-step {
	border-top: 1px solid var(--conference-step-border, #E3E7ED);
}

.conference-step__header {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 16px 24px;
	background: var(--conference-step-header-bg, #E3E7ED);
}

.conference-step__indicator {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	color: var(--conference-text-muted, #64748B);
}

.conference-step__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 12px;
	background: var(--conference-accent, #FF995D);
	color: #FFFFFF;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
}

.conference-step__title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--conference-text-dark, #1A1A1A);
}

.conference-step__title:focus {
	outline: none;
}

.conference-step__body {
	padding: 16px 24px 24px;
}

.conference-step__body .form-group {
	margin-bottom: 24px;
}

.conference-step__subtitle {
	margin: 0 0 24px;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--conference-text-dark, #1A1A1A);
}

legend.conference-step__subtitle {
	margin-bottom: 16px;
}

.conference-form fieldset.form-group {
	min-width: 0;
	margin-left: 0;
	margin-right: 0;
	padding: 0;
	border: 0;
}

.conference-form fieldset.form-group > legend:not(.conference-step__subtitle) {
	margin-bottom: 8px;
	padding: 0;
}

.conference-step__footer {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 16px;
	padding: 24px 32px 32px;
	border-top: 1px solid var(--conference-step-border, #E3E7ED);
}

.conference-step__footer .conference-form__submit {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	margin: 0;
	padding: 8px 24px;
}

.conference-step__back {
	min-height: 40px;
	padding: 8px 24px;
	border: 1px solid var(--conference-border-color, #9C9D9F);
	border-radius: 4px;
	background: #FFFFFF;
	color: var(--conference-text-dark, #1A1A1A);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	margin-right: auto;
}

.conference-step__back:hover {
	border-color: var(--conference-accent, #FF995D);
}

/* Radio "tiles": two bordered boxes per row with a small dot (Figma). */
.radio-group.radio-group--tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 0;
}

.radio-group--tiles-single {
	grid-template-columns: minmax(0, 1fr);
}

.radio-label.radio-tile {
	gap: 12px;
	min-height: 48px;
	padding: 12px 16px;
	border: 1px solid var(--conference-border-color, #9C9D9F);
	border-radius: 4px;
	background: #FFFFFF;
	line-height: 1.5;
}

.radio-label.radio-tile:has(input:focus-visible) {
	outline: 2px solid var(--conference-accent, #FF995D);
	outline-offset: 1px;
}

.radio-tile input[type="radio"] {
	width: 20px;
	height: 20px;
	margin: 0;
}

.radio-tile input[type="radio"]:checked {
	border-color: var(--conference-border-color, #9C9D9F);
}

.radio-tile input[type="radio"]:checked::after {
	width: 12px;
	height: 12px;
}

.radio-tile input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 0;
}

.form-group.has-error .radio-tile {
	border-color: #dc3545;
}

/* Dropdown with the Figma CaretCircleDown icon. */
.basz-conference-form-wrapper--wizard select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	background-image: url("images/caret-circle-down.svg");
	background-repeat: no-repeat;
	background-position: right 8px center;
	background-size: 24px 24px;
}

.conference-form__invoice-data {
	margin-top: 16px;
}

/* Privacy text: a few lines, then "Вижте повече". */
.conference-form__gdpr {
	margin: 0 0 16px;
	font-size: 16px;
	line-height: 1.5;
}

.conference-form__gdpr-text {
	margin: 0;
}

.conference-form__gdpr.is-collapsed .conference-form__gdpr-text {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.conference-form__gdpr-toggle {
	padding: 0;
	border: 0;
	background: none;
	color: var(--conference-text-dark, #1A1A1A);
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 480px) {
	.radio-group.radio-group--tiles {
		grid-template-columns: minmax(0, 1fr);
	}
}

.conference-form__hint,
.price-note {
	font-size: 14px;
	color: var(--conference-text-muted, #64748B);
}

.conference-form__hint {
	margin: -8px 0 12px;
}

.checkbox-label input[type="checkbox"] {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	accent-color: var(--conference-accent, #FF995D);
}

.radio-label.is-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.conference-summary {
	margin: 0 0 24px;
	padding: 16px;
	border-radius: 8px;
	background: var(--conference-summary-bg, #FBF1EF);
}

.conference-summary__lines {
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}

.conference-summary__lines li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 4px 0;
}

.conference-summary__total {
	display: flex;
	justify-content: space-between;
	margin: 0;
	padding-top: 8px;
	border-top: 1px solid var(--conference-step-border, #E3E7ED);
	font-weight: 700;
}

.basz-conference-closed {
	margin: 0;
}

@media (max-width: 480px) {
	.conference-step__header,
	.conference-step__body {
		padding-left: 16px;
		padding-right: 16px;
	}

	.conference-step__footer {
		padding: 16px;
	}
}
