/**
 * Woo Q&A frontend styles.
 *
 * @package WooQA
 */

.woo-qa-widget {
	border: 1px solid #e5e7eb;
	background: #fff;
	border-radius: 14px;
	padding: 24px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.woo-qa-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 18px;
}

.woo-qa-heading {
	min-width: 0;
}

.woo-qa-title {
	margin: 0;
	font-size: 22px;
	line-height: 1.3;
	font-weight: 700;
	color: #111827;
}

.woo-qa-subtitle {
	margin: 7px 0 0;
	font-size: 14px;
	line-height: 1.6;
	color: #6b7280;
}

.woo-qa-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	padding: 10px 18px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	background: #fff;
	color: #111827;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease, transform .18s ease;
}

.woo-qa-button:hover,
.woo-qa-button:focus {
	background: #f9fafb;
	border-color: #9ca3af;
	color: #111827;
	outline: none;
}

.woo-qa-button:active {
	transform: translateY(1px);
}

.woo-qa-button[disabled],
.woo-qa-button.is-loading {
	opacity: .65;
	pointer-events: none;
}

.woo-qa-button-primary {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

.woo-qa-button-primary:hover,
.woo-qa-button-primary:focus {
	background: #1d4ed8;
	border-color: #1d4ed8;
	color: #fff;
}

.woo-qa-form {
	display: none;
	margin: 18px 0 24px;
	padding: 18px;
	border: 1px solid #eef2f7;
	border-radius: 12px;
	background: #f9fafb;
}

.woo-qa-form.is-open {
	display: block;
}

.woo-qa-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 14px;
}

.woo-qa-field {
	margin-bottom: 14px;
}

.woo-qa-field:last-child {
	margin-bottom: 0;
}

.woo-qa-field label {
	display: block;
	margin-bottom: 7px;
	font-size: 13px;
	font-weight: 700;
	color: #374151;
}

.woo-qa-field input,
.woo-qa-field textarea {
	width: 100%;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	background: #fff;
	color: #111827;
	font-size: 14px;
	line-height: 1.5;
	box-shadow: none;
	outline: none;
}

.woo-qa-field input {
	min-height: 42px;
	padding: 8px 12px;
}

.woo-qa-field textarea {
	min-height: 110px;
	padding: 12px;
	resize: vertical;
}

.woo-qa-field input:focus,
.woo-qa-field textarea:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 1px #2563eb;
}

.woo-qa-form-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 14px;
}

.woo-qa-form-message {
	display: none;
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
}

.woo-qa-form-message.is-visible {
	display: block;
}

.woo-qa-form-message.is-success {
	background: #edf7ed;
	color: #2e7d32;
	border: 1px solid #b8dfbd;
}

.woo-qa-form-message.is-error {
	background: #fcf0f1;
	color: #b32d2e;
	border: 1px solid #f0b7b7;
}

.woo-qa-list-wrap {
	margin-top: 8px;
}

.woo-qa-list {
	display: grid;
	gap: 14px;
}

.woo-qa-item {
	padding: 18px;
	border: 1px solid #eef2f7;
	border-radius: 12px;
	background: #fff;
}

.woo-qa-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 13px;
	color: #6b7280;
}

.woo-qa-meta strong {
	color: #111827;
}

.woo-qa-q,
.woo-qa-a {
	margin: 0;
	font-size: 14px;
	line-height: 1.65;
	color: #374151;
}

.woo-qa-q {
	margin-bottom: 10px;
}

.woo-qa-q strong,
.woo-qa-a strong {
	color: #111827;
	font-weight: 800;
}

.woo-qa-empty,
.woo-qa-loading {
	padding: 18px;
	border: 1px dashed #d1d5db;
	border-radius: 12px;
	color: #6b7280;
	text-align: center;
}

.woo-qa-load-more {
	margin-top: 16px;
}

.woo-qa-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: wooQaSpin .7s linear infinite;
}

@keyframes wooQaSpin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 767px) {
	.woo-qa-header {
		flex-direction: column;
		align-items: stretch;
	}

	.woo-qa-toggle-form {
		width: 100%;
	}

	.woo-qa-form-grid {
		grid-template-columns: 1fr;
	}

	.woo-qa-form-actions {
		align-items: stretch;
	}

	.woo-qa-form-actions .woo-qa-button {
		width: 100%;
	}
}


.woo-qa-read-more {
	display: inline;
	margin: 0 0 0 6px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #2563eb;
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

.woo-qa-read-more:hover,
.woo-qa-read-more:focus {
	color: #1d4ed8;
	outline: none;
}
