/*
 * OD Comment System — front-end styles.
 * Matches the site's dark theme and od-qa design language.
 */

:root {
	--od-cs-accent:      #f2a23b;
	--od-cs-accent-dark: #cc7622;
	--od-cs-bg:          #05060a;
	--od-cs-text:        #f3e8d0;
	--od-cs-muted:       #d6cbb0;
	--od-cs-card-bg:     #11141b;
	--od-cs-card-border: #2a3140;
	--od-cs-success-bg:  rgba(16, 185, 129, 0.15);
	--od-cs-success-fg:  #6ee7b7;
	--od-cs-success-br:  rgba(16, 185, 129, 0.3);
	--od-cs-error-bg:    rgba(220, 38, 38, 0.15);
	--od-cs-error-fg:    #ff6b6b;
	--od-cs-error-br:    rgba(220, 38, 38, 0.3);
}

/* Wrapper */
.od-cs-wrapper {
	max-width: 800px;
	margin: 2.5rem auto 0;
	padding: 0 1rem;
	box-sizing: border-box;
}

/* Shared heading */
.od-cs-heading {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--od-cs-accent);
	margin: 0 0 1.25rem;
	padding-bottom: 15px;
}

/* ------------------------------------------------------------------ *
 * Comment list
 * ------------------------------------------------------------------ */

.od-cs-list-section {
	margin-bottom: 2.5rem;
}

.od-cs-comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.od-cs-comment {
	padding: 1rem 0;
	border-bottom: 1px solid var(--od-cs-card-border);
}

.od-cs-comment:last-child {
	border-bottom: none;
}

.od-cs-comment-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: baseline;
	margin-bottom: 0.4rem;
}

.od-cs-comment-author {
	font-weight: 700;
	color: var(--od-cs-text);
}

.od-cs-comment-date {
	font-size: 0.8rem;
	color: var(--od-cs-muted);
}

.od-cs-comment-body {
	color: var(--od-cs-text);
	line-height: 1.6;
}

.od-cs-comment-body p {
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * Form section
 * ------------------------------------------------------------------ */

.od-cs-form-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}

.od-cs-form-header .od-cs-heading {
	margin: 0;
}

.od-cs-count-badge {
	font-size: 0.8rem;
	color: var(--od-cs-muted);
	white-space: nowrap;
	flex-shrink: 0;
}

.od-cs-form-section {
	background: var(--od-cs-card-bg);
	border: 1px solid var(--od-cs-card-border);
	border-radius: 8px;
	padding: 1.5rem;
}

.od-cs-form-notice {
	font-size: 0.9rem;
	color: var(--od-cs-muted);
	margin: 0 0 1.25rem;
	line-height: 1.5;
}

.od-cs-form-notice strong {
	color: var(--od-cs-text);
}

.od-cs-field-hint {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.8rem;
	color: var(--od-cs-muted);
	opacity: 0.85;
}

/* Response message */
.od-cs-response {
	padding: 0.85rem 1rem;
	border-radius: 6px;
	margin-bottom: 1.25rem;
	font-size: 0.95rem;
	line-height: 1.5;
}

.od-cs-response--success {
	background: var(--od-cs-success-bg);
	color: var(--od-cs-success-fg);
	border: 1px solid var(--od-cs-success-br);
}

.od-cs-response--error {
	background: var(--od-cs-error-bg);
	color: var(--od-cs-error-fg);
	border: 1px solid var(--od-cs-error-br);
}

/* Form groups */
.od-cs-form-group {
	margin-bottom: 1.25rem;
}

.od-cs-form-group label {
	display: block;
	font-weight: 600;
	color: var(--od-cs-text);
	margin-bottom: 0.4rem;
}

.od-cs-required {
	color: #ff6b6b;
	margin-left: 0.2em;
}

/* Inputs */
.od-cs-form-group input[type="text"],
.od-cs-form-group textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.75rem;
	background: var(--od-cs-bg);
	color: var(--od-cs-text);
	border: 1px solid var(--od-cs-card-border);
	border-radius: 6px;
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.od-cs-form-group input[type="text"]:focus,
.od-cs-form-group textarea:focus {
	outline: none;
	border-color: var(--od-cs-accent);
	box-shadow: 0 0 0 3px rgba(242, 162, 59, 0.2);
}

.od-cs-form-group textarea {
	resize: vertical;
	min-height: 110px;
}

/* Character countdown */
.od-cs-char-count {
	display: block;
	text-align: right;
	font-size: 0.8rem;
	color: var(--od-cs-muted);
	margin-top: 0.3rem;
	transition: color 0.2s;
}

.od-cs-char-count.is-warning {
	color: var(--od-cs-accent);
	font-weight: 600;
}

.od-cs-char-count.is-danger {
	color: var(--od-cs-error-fg);
	font-weight: 700;
}

/* Human check */
.od-cs-human-prompt {
	display: block;
	font-size: 0.875rem;
	color: var(--od-cs-muted);
	margin-bottom: 0.4rem;
}

.od-cs-human-group input[type="text"] {
	max-width: 140px;
}

/* Submit button */
.od-cs-form-actions {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--od-cs-card-border);
}

.od-cs-submit-btn {
	background: var(--od-cs-accent);
	color: var(--od-cs-bg);
	border: none;
	border-radius: 6px;
	padding: 0.7rem 1.75rem;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.od-cs-submit-btn:hover:not(:disabled) {
	background: var(--od-cs-accent-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.od-cs-submit-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

/* Honeypot */
.od-cs-honeypot {
	display: none !important;
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

/* Responsive */
@media ( max-width: 768px ) {
	.od-cs-form-header {
		flex-wrap: wrap;
		gap: 0.25rem;
	}

	.od-cs-count-badge {
		width: 100%;
		order: -1;
		font-size: 0.75rem;
	}
}

@media ( max-width: 480px ) {
	.od-cs-form-section {
		padding: 1rem;
	}

	.od-cs-submit-btn {
		width: 100%;
	}

	.od-cs-comment-meta {
		flex-direction: column;
		gap: 0.15rem;
	}

	.od-cs-human-group input[type="text"] {
		max-width: 100%;
	}
}
