/* Essay Submissions Plugin — styles
   All selectors prefixed .essay-sub-* to avoid conflicts with Avada.
   ------------------------------------------------------------------ */

.essay-sub-wrap {
	display: flex;
	flex-direction: column;
	gap: 48px;
	max-width: 720px;
	margin: 0 auto;
	padding: 0 16px;
	box-sizing: border-box;
	font-family: inherit;
}

/* ── Card ── */
.essay-sub-card {
	background: #ffffff;
	border: 2px solid #e2e2e2;
	border-radius: 8px;
	padding: 36px 40px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.essay-sub-card--video {
	border-color: #bc2329; /* Runner In Red brand colour */
}

/* ── Headings ── */
.essay-sub-section-title {
	margin: 0 0 8px;
	font-size: 1.5em;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.2;
}

.essay-sub-card--video .essay-sub-section-title {
	color: #bc2329;
}

.essay-sub-section-desc {
	margin: 0 0 28px;
	font-size: 0.95em;
	color: #555;
	line-height: 1.5;
}

/* ── Fields ── */
.essay-sub-field {
	margin-bottom: 20px;
}

.essay-sub-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.9em;
	font-weight: 600;
	color: #333;
}

.essay-sub-required {
	color: #bc2329;
}

.essay-sub-field input[type="text"],
.essay-sub-field input[type="email"] {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
	font-family: inherit;
	color: #1a1a1a;
	background: #fafafa;
	box-sizing: border-box;
	transition: border-color 0.2s;
}

.essay-sub-field input[type="text"]:focus,
.essay-sub-field input[type="email"]:focus {
	outline: none;
	border-color: #bc2329;
	background: #fff;
}

.essay-sub-field input[type="file"] {
	display: block;
	width: 100%;
	padding: 8px 0;
	font-size: 0.9em;
	color: #444;
}

.essay-sub-hint {
	margin: 4px 0 0;
	font-size: 0.82em;
	color: #888;
}

/* ── Two-column row ── */
.essay-sub-row--two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

/* ── Error ── */
.essay-sub-error {
	background: #fff3f3;
	border: 1px solid #e55;
	border-radius: 4px;
	padding: 12px 16px;
	margin-bottom: 16px;
	font-size: 0.9em;
	color: #c00;
	line-height: 1.5;
}

/* ── Success ── */
.essay-sub-success {
	text-align: center;
	padding: 20px 0;
}

.essay-sub-success-msg {
	font-size: 1.05em;
	color: #1a6e1a;
	font-weight: 600;
	margin: 0;
}

/* ── Button ── */
.essay-sub-actions {
	margin-top: 8px;
}

.essay-sub-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 12px 28px;
	font-size: 1em;
	font-family: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.essay-sub-btn:hover {
	background: #333;
}

.essay-sub-btn:disabled {
	background: #999;
	cursor: not-allowed;
}

.essay-sub-btn--video {
	background: #bc2329;
}

.essay-sub-btn--video:hover {
	background: #9a1c21;
}

.essay-sub-btn--video:disabled {
	background: #d88;
}

/* ── Spinner ── */
.essay-sub-spinner[hidden] {
	display: none;
}

.essay-sub-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255,255,255,0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: essay-sub-spin 0.7s linear infinite;
}

@keyframes essay-sub-spin {
	to { transform: rotate(360deg); }
}

/* ── Upload progress bar (video only) ── */
.essay-sub-progress[hidden] {
	display: none;
}

.essay-sub-progress {
	margin-bottom: 16px;
}

.essay-sub-progress-track {
	height: 10px;
	background: #e8e8e8;
	border-radius: 999px;
	overflow: hidden;
}

.essay-sub-progress-fill {
	height: 100%;
	width: 0%;
	background: #bc2329;
	border-radius: 999px;
	transition: width 0.3s ease;
}

.essay-sub-progress-label {
	margin: 6px 0 0;
	font-size: 0.85em;
	color: #555;
}

/* ── Mobile ── */
@media (max-width: 540px) {
	.essay-sub-card {
		padding: 24px 20px;
	}

	.essay-sub-row--two {
		grid-template-columns: 1fr;
		gap: 0;
	}
}
