/* TempleSetu Campaign Manager — Public/Front-end styles */

.ts-student-form-wrapper {
	max-width: 580px;
	margin: 0 auto;
	font-family: inherit;
}

.ts-form-message {
	padding: 12px 16px;
	border-radius: 4px;
	margin-bottom: 20px;
}

.ts-form-success {
	background: #e8f5e9;
	border-left: 4px solid #43a047;
	color: #2e7d32;
}

.ts-form-error {
	background: #fdecea;
	border-left: 4px solid #e53935;
	color: #b71c1c;
}

.ts-field-group {
	margin-bottom: 20px;
}

.ts-field-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.ts-field-group input[type="text"],
.ts-field-group select,
.ts-field-group textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 15px;
	font-family: inherit;
	transition: border-color 0.2s;
}

.ts-field-group input[type="text"]:focus,
.ts-field-group select:focus,
.ts-field-group textarea:focus {
	border-color: #C26148;
	outline: none;
	box-shadow: 0 0 0 2px rgba(194,97,72,0.15);
}

.ts-required { color: #c0392b; margin-left: 2px; }
.ts-optional  { color: #888; font-weight: 400; font-size: 0.88em; }

/* ── Audio recorder widget ─────────────────────────────────────────── */

.ts-audio-field {
	border: 1px solid #e0d5cf;
	background: #fdf8f6;
	border-radius: 6px;
	padding: 16px;
}

.ts-audio-hint {
	margin: 0 0 14px;
	color: #666;
	font-size: 0.9em;
}

.ts-recorder-controls {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

/* Record button */
.ts-btn-record {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border: 2px solid #C26148;
	border-radius: 24px;
	background: #fff;
	color: #C26148;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.ts-btn-record:hover {
	background: #C26148;
	color: #fff;
}

.ts-btn-record.ts-recording {
	background: #c0392b;
	border-color: #c0392b;
	color: #fff;
	animation: ts-pulse 1.2s ease-in-out infinite;
}

@keyframes ts-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0.4); }
	50%       { box-shadow: 0 0 0 7px rgba(192,57,43,0); }
}

/* Record icon dot */
.ts-record-icon {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: currentColor;
}

/* Timer */
.ts-timer {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-variant-numeric: tabular-nums;
	font-size: 15px;
	color: #c0392b;
}

.ts-timer-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #c0392b;
	animation: ts-blink 1s step-start infinite;
}

@keyframes ts-blink {
	0%, 100% { opacity: 1; }
	50%       { opacity: 0; }
}

.ts-timer-max {
	color: #999;
	font-size: 0.9em;
}

/* Status line */
.ts-recorder-status {
	margin-top: 10px;
	font-size: 0.9em;
	color: #555;
	min-height: 1.3em;
}

/* Audio preview */
.ts-audio-preview {
	margin-top: 14px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.ts-audio-preview audio {
	flex: 1;
	min-width: 200px;
	height: 36px;
}

.ts-btn-rerecord {
	padding: 6px 14px;
	border: 1px solid #888;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	font-size: 13px;
	color: #555;
	white-space: nowrap;
}

.ts-btn-rerecord:hover { background: #f0f0f0; }

/* Unsupported browser notice */
.ts-recorder-unsupported {
	color: #888;
	font-size: 0.9em;
	font-style: italic;
}

/* Submit button */
.ts-submit-group { margin-top: 8px; }

.ts-submit-button {
	padding: 11px 28px;
	background: #C26148;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.ts-submit-button:hover  { background: #a84e38; }
.ts-submit-button:disabled { opacity: 0.6; cursor: not-allowed; }
