/* DDH Community — Frontend Styles */

.ddh-form {
	max-width: 480px;
	margin: 20px 0;
	padding: 24px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background: #fafafa;
}

.ddh-form-row {
	margin-bottom: 16px;
}

.ddh-form-row label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.ddh-form-row input[type="text"],
.ddh-form-row input[type="email"],
.ddh-form-row input[type="password"],
.ddh-form-row input[type="number"],
.ddh-form-row input[type="date"],
.ddh-form-row textarea,
.ddh-form-row select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 5px;
	box-sizing: border-box;
	font-size: 14px;
}

.ddh-checkbox-row label {
	font-weight: 400;
	display: flex;
	align-items: center;
	gap: 6px;
}

.ddh-required {
	color: #c0392b;
}

.ddh-help-text {
	font-size: 12px;
	color: #777;
	margin-top: 4px;
}

.ddh-btn {
	display: inline-block;
	padding: 10px 22px;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 5px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.ddh-btn:hover {
	background: #1d4ed8;
	color: #fff;
}

.ddh-form-links {
	margin-top: 14px;
	font-size: 13px;
}

.ddh-form-message {
	margin-bottom: 12px;
	font-size: 14px;
}

.ddh-form-message.ddh-success {
	color: #1a7d33;
}

.ddh-form-message.ddh-error {
	color: #c0392b;
}

.ddh-error {
	color: #c0392b;
}

.ddh-info {
	background: #eef4ff;
	padding: 14px;
	border-radius: 6px;
}

.ddh-login-required {
	text-align: center;
	padding: 40px 20px;
	background: #f5f5f5;
	border-radius: 8px;
}

.ddh-login-required p {
	margin-bottom: 14px;
	font-size: 15px;
}

/* User Grid */
.ddh-user-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 16px;
	margin: 16px 0;
}

.ddh-user-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 16px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
	transition: box-shadow .15s ease;
}

.ddh-user-card:hover {
	box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.ddh-user-card img {
	border-radius: 50%;
	margin-bottom: 8px;
}

.ddh-user-name {
	font-weight: 600;
}

.ddh-user-login {
	font-size: 12px;
	color: #888;
}

/* User detail */
.ddh-user-detail-header {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-bottom: 20px;
}

.ddh-user-detail-header img {
	border-radius: 50%;
}

.ddh-detail-row {
	margin-bottom: 8px;
}

/* Posts */
.ddh-post-list-wrap {
	margin: 16px 0;
}

.ddh-new-post-btn {
	margin-bottom: 16px;
}

.ddh-hidden {
	display: none;
}

.ddh-post-card {
	padding: 16px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	margin-bottom: 14px;
}

.ddh-post-card h4 {
	margin: 0 0 8px;
}

.ddh-post-excerpt {
	color: #555;
	margin-bottom: 10px;
}

.ddh-post-meta {
	display: flex;
	align-items: center;
	gap: 18px;
	font-size: 13px;
	color: #777;
}

.ddh-post-meta img {
	border-radius: 50%;
	vertical-align: middle;
	margin-right: 4px;
}

/* Answers */
.ddh-answers-section {
	margin-top: 24px;
}

.ddh-answer-card {
	padding: 14px;
	border-left: 3px solid #2563eb;
	background: #f8f9fb;
	margin-bottom: 12px;
	border-radius: 0 6px 6px 0;
}

.ddh-answer-content {
	margin: 8px 0;
}

/* Vote buttons */
.ddh-vote-buttons {
	display: inline-flex;
	gap: 8px;
}

.ddh-vote-btn {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 20px;
	padding: 4px 12px;
	font-size: 13px;
	cursor: pointer;
}

.ddh-vote-btn.ddh-active.ddh-like-btn {
	background: #e6f4ea;
	border-color: #34a853;
}

.ddh-vote-btn.ddh-active.ddh-dislike-btn {
	background: #fdecea;
	border-color: #ea4335;
}
