/* ==========================================================================
   Brightspot Submission Form
   ========================================================================== */

.brightspot-form-wrapper {
	max-width: 600px;
	margin: 0 auto;
}

.brightspot-form {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Mode toggle (written / video) */
.brightspot-form-mode-toggle {
	display: flex;
	gap: 0;
	margin-bottom: 24px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
}

.brightspot-form-mode-btn {
	flex: 1;
	padding: 10px 16px;
	border: none;
	background: #f9fafb;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: #6b7280;
	transition: all 0.2s;
}

.brightspot-form-mode-btn.is-active {
	background: #6366f1;
	color: #fff;
}

/* Fields */
.brightspot-form-field {
	margin-bottom: 16px;
}

.brightspot-form-field label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 6px;
	color: #374151;
}

.brightspot-form-field label .required {
	color: #ef4444;
}

.brightspot-form-field input[type="text"],
.brightspot-form-field input[type="email"],
.brightspot-form-field textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.brightspot-form-field input:focus,
.brightspot-form-field textarea:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.brightspot-form-field textarea {
	resize: vertical;
	min-height: 100px;
}

/* Two-column rows */
.brightspot-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 500px) {
	.brightspot-form-row {
		grid-template-columns: 1fr;
	}
}

/* Star rating input */
.brightspot-form-stars {
	display: flex;
	gap: 4px;
}

.brightspot-form-star {
	cursor: pointer;
	color: #d1d5db;
	transition: color 0.15s;
	line-height: 1;
}

.brightspot-form-star:hover,
.brightspot-form-star:hover ~ .brightspot-form-star,
.brightspot-form-star.is-selected {
	color: #f59e0b;
}

.brightspot-form-star.is-selected svg {
	fill: currentColor;
}

.brightspot-form-star input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

/* Reverse hover effect for stars (fill left to right) */
.brightspot-form-stars:hover .brightspot-form-star {
	color: #d1d5db;
}

.brightspot-form-stars .brightspot-form-star:hover,
.brightspot-form-stars .brightspot-form-star:hover ~ .brightspot-form-star {
	color: #d1d5db;
}

.brightspot-form-stars:hover .brightspot-form-star:hover,
.brightspot-form-stars:hover .brightspot-form-star:hover ~ .brightspot-form-star {
	color: #d1d5db;
}

/* Simpler: just use JS to handle star selection */

/* Photo upload */
.brightspot-form-photo-upload input[type="file"] {
	font-size: 14px;
}

.brightspot-form-photo-preview img {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
	margin-top: 8px;
	border: 2px solid #e5e7eb;
}

/* Submit button */
.brightspot-form-submit {
	margin-top: 24px;
}

.brightspot-form-btn {
	display: inline-block;
	padding: 12px 32px;
	background: #6366f1;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	width: 100%;
}

.brightspot-form-btn:hover {
	background: #4f46e5;
}

.brightspot-form-btn:disabled {
	background: #9ca3af;
	cursor: not-allowed;
}

/* Message */
.brightspot-form-message {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
}

.brightspot-form-message.is-success {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.brightspot-form-message.is-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* Video recorder area */
#brightspot-video-recorder {
	border: 2px dashed #d1d5db;
	border-radius: 12px;
	padding: 24px;
	text-align: center;
	background: #f9fafb;
}

#brightspot-video-recorder video {
	width: 100%;
	max-height: 300px;
	border-radius: 8px;
	background: #000;
}

#brightspot-video-recorder .recorder-controls {
	margin-top: 12px;
	display: flex;
	gap: 8px;
	justify-content: center;
}

#brightspot-video-recorder .recorder-btn {
	padding: 8px 20px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

#brightspot-video-recorder .recorder-btn-record {
	background: #ef4444;
	color: #fff;
}

#brightspot-video-recorder .recorder-btn-stop {
	background: #374151;
	color: #fff;
}

#brightspot-video-recorder .recorder-btn-retake {
	background: #f3f4f6;
	color: #374151;
}

#brightspot-video-recorder .recorder-timer {
	font-size: 18px;
	font-weight: 600;
	color: #ef4444;
	margin-top: 8px;
}

/* Thank you state */
.brightspot-form-thank-you {
	text-align: center;
	padding: 48px 24px;
}

.brightspot-form-thank-you-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	background: #ecfdf5;
	color: #059669;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	font-weight: 700;
}

.brightspot-form-thank-you h3 {
	font-size: 22px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 8px;
}

.brightspot-form-thank-you p {
	font-size: 15px;
	color: #6b7280;
	margin: 0;
}
