/* Podcast Questions — frontend (mobile-first) */

.pq-form-wrap {
	max-width: 560px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.45;
}

.pq-form fieldset.pq-section {
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 16px;
	margin: 0 0 18px;
}

.pq-form legend {
	font-weight: 700;
	padding: 0 6px;
	font-size: 1.05em;
}

.pq-hint {
	margin: 0 0 12px;
	color: #555;
	font-size: 0.92em;
}

.pq-label {
	display: block;
	font-weight: 600;
	margin: 12px 0 4px;
}

.pq-form input[type="text"],
.pq-form input[type="email"],
.pq-form textarea {
	width: 100%;
	padding: 12px;
	font-size: 16px; /* prevents iOS zoom */
	border: 1px solid #c8c8c8;
	border-radius: 8px;
	box-sizing: border-box;
}

.pq-form textarea {
	resize: vertical;
}

.pq-req {
	color: #c0392b;
}

/* Tabs */
.pq-tabs {
	display: flex;
	gap: 6px;
	margin-bottom: 14px;
}

.pq-tab {
	flex: 1;
	padding: 12px 8px;
	border: 1px solid #c8c8c8;
	background: #f5f5f5;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.pq-tab.is-active {
	background: #1d1d1f;
	color: #fff;
	border-color: #1d1d1f;
}

/* Recorder */
.pq-preview {
	width: 100%;
	background: #000;
	border-radius: 10px;
	aspect-ratio: 9 / 16;
	max-height: 60vh;
	object-fit: cover;
}

.pq-recorder-controls {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.pq-btn {
	appearance: none;
	border: 0;
	border-radius: 8px;
	padding: 14px 18px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.pq-btn-rec,
.pq-btn-submit {
	background: #c0392b;
	color: #fff;
}

.pq-btn-submit {
	background: #1d1d1f;
	width: 100%;
}

.pq-btn-stop {
	background: #444;
	color: #fff;
}

.pq-btn-retake {
	background: #f0f0f0;
	color: #1d1d1f;
}

.pq-recorder-note {
	font-size: 0.85em;
	color: #666;
	margin: 10px 0 0;
}

/* Timer */
.pq-timer {
	margin-top: 10px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}

.pq-timer-bar {
	height: 6px;
	background: #eee;
	border-radius: 3px;
	overflow: hidden;
	margin-top: 4px;
}

.pq-timer-bar span {
	display: block;
	height: 100%;
	width: 0;
	background: #c0392b;
	transition: width 1s linear;
}

/* File upload */
.pq-file-label {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 22px;
	border: 2px dashed #bbb;
	border-radius: 10px;
	text-align: center;
	cursor: pointer;
}

.pq-file-cta {
	font-weight: 700;
	color: #1d1d1f;
}

.pq-file-name {
	font-size: 0.85em;
	color: #666;
}

#pq-video-file {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

#pq-upload-preview {
	margin-top: 12px;
}

/* Rows */
.pq-row {
	display: flex;
	gap: 12px;
}

.pq-col {
	flex: 1;
}

/* Checkboxes */
.pq-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 12px 0;
	cursor: pointer;
}

.pq-check input {
	margin-top: 3px;
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
}

/* Permissions emphasis */
.pq-permissions .pq-perm {
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 12px;
}

.pq-perm-required {
	background: #fdf3f2;
	border: 1px solid #f0c7c2;
}

.pq-perm-optional {
	background: #f3f7fb;
	border: 1px solid #cfe0ef;
}

.pq-perm-note {
	margin: 6px 0 0 30px;
	font-size: 0.82em;
	color: #5a6b7a;
}

/* Messages */
.pq-message {
	padding: 12px 14px;
	border-radius: 8px;
	margin-bottom: 14px;
	background: #eef;
	border: 1px solid #ccd;
}

.pq-message-error {
	background: #fdecea;
	border-color: #f5c6c0;
	color: #8a1c12;
}

.pq-field-error {
	color: #c0392b;
	font-size: 0.92em;
	font-weight: 600;
	margin: 6px 0 0;
}

.pq-perm-required .pq-field-error {
	margin-left: 30px;
}

/* Loud invalid state */
.pq-invalid,
input.pq-invalid,
textarea.pq-invalid {
	border: 2px solid #c0392b !important;
	background: #fdecea !important;
	border-radius: 8px;
	animation: pq-shake 0.4s;
}

.pq-perm-required.pq-invalid {
	box-shadow: 0 0 0 2px #c0392b inset;
	background: #fdecea !important;
}

.pq-tabs.pq-invalid {
	outline: 2px solid #c0392b;
	outline-offset: 4px;
	border-radius: 10px;
	animation: pq-shake 0.4s;
}

@keyframes pq-shake {
	0%, 100% { transform: translateX( 0 ); }
	20%, 60% { transform: translateX( -6px ); }
	40%, 80% { transform: translateX( 6px ); }
}

/* Video status banner */
.pq-video-status {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 14px 0 4px;
	padding: 12px 14px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.95em;
	border: 1px solid transparent;
}

.pq-video-status[data-state="empty"] {
	background: #f4f4f5;
	color: #555;
	border-color: #ddd;
}

.pq-video-status[data-state="ready"] {
	background: #e9f9ef;
	color: #166534;
	border-color: #bfe3c7;
}

.pq-video-status-icon {
	font-size: 1.1em;
	line-height: 1;
}

.pq-video-status[data-state="empty"] .pq-video-status-icon::before { content: "\25CB"; } /* ○ */
.pq-video-status[data-state="ready"] .pq-video-status-icon::before { content: "\2713"; } /* ✓ */

.pq-video-status-text {
	flex: 1;
}

.pq-video-remove {
	appearance: none;
	border: 0;
	background: transparent;
	color: #166534;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
	font-size: 0.95em;
	padding: 0;
}

.pq-success {
	text-align: center;
	padding: 24px;
	background: #eef9f0;
	border: 1px solid #bfe3c7;
	border-radius: 10px;
}

.pq-recaptcha-notice {
	font-size: 0.78em;
	color: #777;
	margin: 0 0 14px;
	line-height: 1.4;
}

.pq-recaptcha-notice a {
	color: #555;
}

.pq-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.pq-progress {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* Honeypot */
.pq-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Larger screens */
@media ( min-width: 600px ) {
	.pq-preview {
		aspect-ratio: 16 / 9;
		max-height: none;
	}
}
