/**
 * Brandy Support Form — Layout, Dropzone & File Preview Styles
 *
 * SCOPE: only .support-form* wrapper classes.
 * Form controls (input/textarea/select/label/button) carry NO classes —
 * the active theme owns their visual styling. Submit button uses Gutenberg
 * .wp-block-button structure so it inherits the theme's button styles.
 */

/* ── Container ────────────────────────────────────────────────────────────── */

#bsf-topic {
	padding-right: 30px;
}

.support-form {
	max-width: 720px;
	margin: 0 auto;
}

/* ── Header (title + subtitle) ────────────────────────────────────────────── */

.support-form__header {
	text-align: center;
	margin: 0 0 2rem;
}

.support-form__title {
	margin: 0 0 0.4rem;
	font-weight: 700;
}

.support-form__subtitle {
	margin: 0;
	font-weight: 600;
	opacity: 0.85;
}

/* ── Field group ──────────────────────────────────────────────────────────── */

.support-form__field {
	margin-bottom: 1.25rem;
}

.support-form__field > label {
	display: block;
	margin-bottom: 0.4rem;
}

/* Required-field indicator (red asterisk) */
.support-form__required {
	color: #dc2626;
	margin-left: 2px;
}

/* ── Two-column row (Name + Phone) ────────────────────────────────────────── */

.support-form__row {
	margin-bottom: 1.25rem;
}

.support-form__row--two-col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.support-form__row--two-col > .support-form__field {
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.support-form__row--two-col {
		grid-template-columns: 1fr;
	}
}

/* ── Helper text ──────────────────────────────────────────────────────────── */

.support-form__help {
	margin: 0.4rem 0 0;
	font-size: 0.875em;
	opacity: 0.65;
}

/* ── Submit (Gutenberg button structure — theme handles colors) ───────────── */

.support-form__submit-wrap {
	text-align: center;
	margin: 1.75rem 0 0.75rem;
}

.support-form__footer-note {
	text-align: center;
	margin: 0.5rem 0 0;
	font-size: 0.875em;
	font-style: italic;
	opacity: 0.7;
}

/* ── Dropzone ─────────────────────────────────────────────────────────────── */

.support-form__dropzone {
	position: relative;
	border: 2px dashed #d1d5db;
	border-radius: 6px;
	padding: 2rem 1.5rem;
	text-align: center;
	cursor: pointer;
	background-color: #f6f7f9;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* Hide native file input — whole dropzone div is the click target */
.support-form__dropzone input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}

.support-form__dropzone-text {
	margin: 0;
	color: #4b5563;
	pointer-events: none;
}

.support-form__dropzone-link {
	pointer-events: auto;
	text-decoration: underline;
}

.support-form__dropzone--active {
	background-color: rgba(0, 120, 215, 0.05);
	border-color: #0078d7;
}

.support-form__dropzone[aria-busy="true"] {
	opacity: 0.6;
	pointer-events: none;
}

.support-form__dropzone:focus-visible {
	outline: 2px solid #0078d7;
	outline-offset: 2px;
}

/* ── File List ────────────────────────────────────────────────────────────── */

.support-form__file-list {
	list-style: none;
	padding: 0;
	margin: 0.75rem 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.support-form__file-error {
	margin-top: 0.5rem;
	color: #b91c1c;
	font-size: 0.875em;
}

/* ── File Row ─────────────────────────────────────────────────────────────── */

.support-form__file-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.625rem 0.875rem;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background-color: #fff;
}

.support-form__file-row__thumb {
	width: 40px;
	height: 40px;
	object-fit: cover;
	flex-shrink: 0;
	border-radius: 4px;
	display: block;
}

.support-form__file-row__thumb--icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	font-size: 1.5rem;
	line-height: 1;
	background-color: #f3f4f6;
	color: #6b7280;
}

.support-form__file-row__meta {
	flex: 1;
	min-width: 0;
	overflow: hidden;
}

.support-form__file-row__meta span {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.support-form__file-row__size {
	font-size: 0.8em;
	opacity: 0.65;
}

/* Remove button — minimal sizing only, theme styles the button face */
.support-form__file-row__remove {
	flex-shrink: 0;
	margin-left: auto;
}

/* ── Inline submission notices ────────────────────────────────────────────── */

.support-form__notice {
	display: none;
	padding: 10px 14px;
	margin: 1rem 0 0;
	border-radius: 4px;
	font-size: 0.9em;
	line-height: 1.5;
}

.support-form__notice:not(:empty) {
	display: block;
}

.support-form__notice--info {
	background-color: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

.support-form__notice--success {
	background-color: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

.support-form__notice--error {
	background-color: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}
