.ldcf-block {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	padding: 24px;
	margin: 24px 0;
}

.ldcf-block h4 {
	margin: 0 0 18px;
	font-size: 17px;
	font-weight: 600;
	color: #1a1a1a;
}

.ldcf-thread-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.ldcf-thread-head h4 {
	margin: 0;
}

.ldcf-buy {
	text-align: center;
}

.ldcf-buy-btn {
	display: inline-block;
	margin-top: 10px;
	padding: 10px 22px;
	background: #d9534f;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
}

.ldcf-buy-btn:hover {
	background: #c9302c;
	color: #fff;
}

.ldcf-textarea {
	width: 100%;
	min-height: 64px;
	margin-bottom: 10px;
	box-sizing: border-box;
	border: 1px solid #e2e4e8;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 14px;
	font-family: inherit;
	resize: vertical;
}

.ldcf-textarea:focus {
	outline: none;
	border-color: #2f6fed;
}

.ldcf-file-field {
	margin-bottom: 12px;
}

.ldcf-dropzone {
	display: block;
	border: 1.5px dashed #c7cbd1;
	border-radius: 10px;
	padding: 16px;
	text-align: center;
	color: #8a8f98;
	font-size: 13px;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

.ldcf-dropzone:hover,
.ldcf-dropzone.is-dragover {
	border-color: #2f6fed;
	color: #2f6fed;
	background: #f6f9ff;
}

.ldcf-dropzone-icon {
	display: block;
	width: 22px;
	height: 22px;
	margin: 0 auto 6px;
	background: currentColor;
	-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6"><path d="M12 16V4M12 4l-4 4M12 4l4 4M4 16v3a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-3"/></svg>') center / contain no-repeat;
	mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6"><path d="M12 16V4M12 4l-4 4M12 4l4 4M4 16v3a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-3"/></svg>') center / contain no-repeat;
}

.ldcf-dropzone .ldcf-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.ldcf-file-list {
	margin-top: 6px;
	font-size: 12px;
	color: #5a5f68;
	word-break: break-word;
}

.ldcf-submit-btn {
	background: #2f6fed;
	color: #fff;
	border: none;
	padding: 9px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.ldcf-submit-btn:hover {
	background: #245bd1;
}

.ldcf-submit-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.ldcf-form-error {
	color: #d9534f;
	margin-bottom: 10px;
	font-size: 13px;
}

.ldcf-messages {
	margin-bottom: 16px;
}

.ldcf-message {
	display: flex;
	gap: 10px;
	margin-bottom: 14px;
	max-width: 100%;
}

.ldcf-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	flex-shrink: 0;
}

.ldcf-message-student .ldcf-avatar {
	background: #2f6fed;
}

.ldcf-message-admin .ldcf-avatar {
	background: #9b51e0;
}

.ldcf-message-admin {
	flex-direction: row-reverse;
}

.ldcf-bubble {
	flex: 1;
	max-width: 85%;
	background: #f0f2f5;
	border-radius: 14px 14px 14px 4px;
	padding: 10px 14px;
}

.ldcf-message-admin .ldcf-bubble {
	background: #eaf1ff;
	border-radius: 14px 14px 4px 14px;
	margin-left: auto;
}

.ldcf-message-head {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	font-size: 12px;
	color: #8a8f98;
	margin-bottom: 3px;
}

.ldcf-message-author {
	font-size: 13px;
	font-weight: 600;
	color: #1a1a1a;
}

.ldcf-message-role {
	font-size: 11px;
	color: #8a8f98;
	font-weight: 400;
	margin-left: 4px;
}

.ldcf-message-date {
	white-space: nowrap;
}

.ldcf-message-body p {
	margin: 0 0 6px;
	font-size: 14px;
	color: #1a1a1a;
	line-height: 1.5;
}

.ldcf-message-body p:last-child {
	margin-bottom: 0;
}

.ldcf-message-files {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.ldcf-file-thumb img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
	border: 1px solid #e2e4e8;
}

.ldcf-file-link {
	font-size: 0.85em;
}

.ldcf-status {
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.ldcf-status-answered {
	background: #d4edda;
	color: #1e7b34;
}

.ldcf-status-unanswered {
	background: #fff3cd;
	color: #92720b;
}

.ldcf-file-thumb {
	display: block;
	cursor: zoom-in;
}

.ldcf-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(15, 16, 20, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 40px;
	box-sizing: border-box;
}

.ldcf-lightbox[hidden] {
	display: none;
}

.ldcf-lightbox-img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.ldcf-lightbox-close,
.ldcf-lightbox-prev,
.ldcf-lightbox-next {
	position: fixed;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ldcf-lightbox-close:hover,
.ldcf-lightbox-prev:hover,
.ldcf-lightbox-next:hover {
	background: rgba(255, 255, 255, 0.24);
}

.ldcf-lightbox-close {
	top: 20px;
	right: 20px;
}

.ldcf-lightbox-prev {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.ldcf-lightbox-next {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
}

body.ldcf-lightbox-open {
	overflow: hidden;
}

.ldcf-account-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
}

.ldcf-account-table th {
	font-size: 13px;
	color: #8a8f98;
	font-weight: 600;
}

.ldcf-account-table th,
.ldcf-account-table td {
	padding: 12px 10px;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.ldcf-account-table tr:last-child td {
	border-bottom: none;
}

.ldcf-course-name {
	font-size: 0.85em;
	color: #666;
}

/* v1.3.0: unread badge on the account inquiries list, withdraw button */
.ldcf-unread-badge {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d63638;
	margin-left: 6px;
	vertical-align: middle;
}

.ldcf-withdraw-wrap {
	margin: 12px 0;
}

.ldcf-withdraw-hint {
	color: #757575;
	font-size: 12px;
	margin-left: 8px;
}

.ldcf-message-edited {
	color: #999;
	font-style: italic;
	font-size: 12px;
	margin-left: 4px;
}

/* v1.3.0: editor-only notice when block would otherwise silently disappear */
.ldcf-editor-notice {
	padding: 12px;
	background: #fcf0f1;
	border: 1px dashed #d63638;
	color: #d63638;
	font-size: 13px;
}
