/* =====================================================
 * Intersomos Simple Forum — v1.0.1
 * Threaded replies + accordion + reply UX
 * ===================================================== */

/* ============================================================
 * Base Container
 * ============================================================ */
.sef-container {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #333;
	line-height: 1.6;
}

/* ============================================================
 * Topic Header
 * ============================================================ */
.sef-topic-header {
	border-bottom: 1px solid #eee;
	padding-bottom: 16px;
	margin-bottom: 24px;
}

.sef-title {
	margin: 0 0 8px 0;
	font-size: 24px;
	font-weight: 700;
	color: #1a1a1a;
}

.sef-meta {
	font-size: 13px;
	color: #888;
	margin-bottom: 14px;
}

.sef-content {
	font-size: 16px;
	line-height: 1.65;
	color: #444;
}

.sef-content p { margin: 0 0 10px 0; }

/* ============================================================
 * Discussion Area
 * ============================================================ */
.sef-discussion-area {
	margin-top: 20px;
}

.sef-comments-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 20px 0;
	padding-bottom: 10px;
	border-bottom: 2px solid #333;
	display: inline-block;
}

.sef-comments-list {
	list-style: none;
	padding: 0;
	margin: 0 0 28px 0;
}

.sef-no-comments {
	padding: 20px;
	background: #fafafa;
	border-radius: 8px;
	color: #888;
	text-align: center;
	font-style: italic;
}

/* ============================================================
 * Comment Item (parent)
 * ============================================================ */
.sef-comment-item {
	display: flex;
	gap: 14px;
	margin-bottom: 20px;
	border-bottom: 1px solid #f0f0f0;
	padding-bottom: 20px;
}

.sef-comment-item:last-child {
	border-bottom: none;
}

.sef-comment-avatar {
	flex-shrink: 0;
}

.sef-comment-avatar img {
	border-radius: 50%;
	display: block;
}

.sef-comment-body {
	flex: 1;
	min-width: 0;
}

.sef-comment-meta {
	margin-bottom: 6px;
	font-size: 14px;
}

.sef-comment-meta strong {
	color: #1a1a1a;
	margin-right: 8px;
	font-weight: 600;
}

.sef-date {
	color: #9a9a9a;
	font-size: 12px;
}

.sef-comment-text {
	font-size: 15px;
	color: #444;
	line-height: 1.55;
}

.sef-comment-text p {
	margin: 0 0 10px 0;
}

.sef-comment-text p:last-child {
	margin-bottom: 0;
}

/* Author highlight */
.sef-is-author .sef-comment-avatar img {
	box-shadow: 0 0 0 2px #2B79C2;
	padding: 2px;
}

/* ============================================================
 * Comment Actions (Reply button) — estilo Instagram
 * v1.0.5: blindado contra temas que estilizam <button> globalmente
 * ============================================================ */
.sef-container .sef-comment-actions {
	display: flex !important;
	gap: 14px !important;
	margin-top: 6px !important;
	align-items: center !important;
	font-size: 12.5px !important;
	background: transparent !important;
}

/* RESET FORTE pros botões custom — evita estilos do tema */
.sef-container button.sef-reply-btn,
.sef-container button.sef-ig-toggle {
	/* zera tudo que tema pode ter colocado */
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	margin: 0 !important;
	min-height: 0 !important;
	min-width: 0 !important;
	outline: none !important;
	box-sizing: border-box !important;
	font-family: inherit !important;
	line-height: 1.3 !important;
	cursor: pointer !important;
	text-decoration: none !important;
}

.sef-container button.sef-reply-btn {
	display: inline-flex !important;
	align-items: center !important;
	gap: 4px !important;
	padding: 2px 0 !important;
	color: #8e8e8e !important;
	font-size: 12.5px !important;
	font-weight: 600 !important;
	transition: color 0.15s !important;
}

.sef-container button.sef-reply-btn:hover,
.sef-container button.sef-reply-btn:focus {
	color: #2B79C2 !important;
	background: transparent !important;
	border: 0 !important;
	outline: none !important;
}

/* ============================================================
 * IG-style Toggle: "— Ver respuestas (N)"
 * ============================================================ */
.sef-container button.sef-ig-toggle {
	display: inline-flex !important;
	align-items: center !important;
	gap: 12px !important;
	padding: 14px 0 6px 0 !important;
	color: #8e8e8e !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	transition: color 0.15s !important;
}

.sef-container button.sef-ig-toggle:hover,
.sef-container button.sef-ig-toggle:focus {
	color: #555 !important;
	background: transparent !important;
	border: 0 !important;
	outline: none !important;
}

.sef-container .sef-ig-line {
	display: inline-block !important;
	width: 28px !important;
	height: 1px !important;
	background: #c7c7c7 !important;
	flex-shrink: 0 !important;
	border: 0 !important;
}

.sef-container .sef-ig-label {
	display: inline-block !important;
}

.sef-container .sef-ig-show { display: inline !important; }
.sef-container .sef-ig-hide { display: none !important; }

.sef-container button.sef-ig-toggle.sef-expanded .sef-ig-show { display: none !important; }
.sef-container button.sef-ig-toggle.sef-expanded .sef-ig-hide { display: inline !important; }

/* ============================================================
 * @Mention dentro do texto do comentário
 * ============================================================ */
.sef-mention {
	color: #2B79C2;
	font-weight: 600;
}

/* ============================================================
 * Replies List — flat estilo Instagram (sem indentação nested)
 * ============================================================ */
.sef-replies-list {
	list-style: none;
	padding: 0;
	margin: 8px 0 0 0;
	padding-left: 56px;  /* alinha com o início do texto do parent (avatar 44px + gap 12px) */
	overflow: hidden;
	transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.sef-replies-list[hidden] {
	display: none;
}

.sef-replies-list .sef-comment-item {
	margin-bottom: 14px;
	padding-bottom: 0;
	border-bottom: none;
	gap: 10px;
}

.sef-replies-list .sef-comment-item:last-child {
	margin-bottom: 0;
}

.sef-replies-list .sef-comment-avatar img {
	width: 36px !important;
	height: 36px !important;
}

.sef-replies-list .sef-comment-meta {
	font-size: 13px;
}

.sef-replies-list .sef-comment-text {
	font-size: 14px;
}

.sef-replies-list .sef-comment-actions {
	font-size: 12px;
}

/* Avatar do parent ligeiramente menor */
.sef-is-parent > .sef-comment-avatar img {
	width: 44px !important;
	height: 44px !important;
}

/* ============================================================
 * Respond Area (Reply Form)
 * ============================================================ */
.sef-respond-area {
	margin-top: 28px;
	padding: 20px;
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 10px;
}

.sef-respond-area.sef-respond-inline {
	margin-top: 14px;
	margin-left: 0;
	background: #f0f7ff;
	border-color: #2B79C2;
}

.sef-respond-title {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 14px 0;
	color: #1a1a1a;
}

/* Reply context bar — visible only when replying to a comment */
.sef-respond-context {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 14px;
	background: #fff;
	border: 1px solid #d0e3ff;
	border-radius: 8px;
	margin-bottom: 14px;
	font-size: 13.5px;
}

.sef-respond-context-label {
	color: #555;
}

.sef-respond-context-label strong {
	color: #2B79C2;
	font-weight: 600;
}

.sef-respond-cancel {
	background: transparent;
	border: none;
	color: #888;
	cursor: pointer;
	font-size: 13px;
	font-family: inherit;
	padding: 4px 8px;
	border-radius: 6px;
	transition: all 0.15s;
}

.sef-respond-cancel:hover {
	background: #f5f5f5;
	color: #d33;
}

/* ============================================================
 * WP-native Comment Form — VISIBLE FIX
 * ============================================================ */
.sef-respond-area #respond,
.sef-respond-area .comment-respond {
	background: transparent !important;
	padding: 0 !important;
	margin: 0 !important;
	display: block !important;
}

/* Hide the duplicated WP reply title */
.sef-respond-area #reply-title,
.sef-respond-area .comment-reply-title {
	display: none !important;
}

.sef-respond-area .comment-form {
	display: block !important;
	margin: 0 !important;
}

.sef-respond-area .comment-form-comment,
.sef-respond-area .comment-form > p {
	margin: 0 0 12px 0 !important;
}

.sef-respond-area .comment-form-comment label,
.sef-respond-area .comment-form > p label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #555;
	margin-bottom: 6px;
}

.sef-respond-area textarea {
	width: 100%;
	min-height: 110px;
	padding: 12px 14px;
	border: 1.5px solid #e0e0e0;
	border-radius: 8px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.55;
	transition: border-color 0.18s, box-shadow 0.18s;
	background: #fff;
	box-sizing: border-box;
	resize: vertical;
}

.sef-respond-area textarea:focus {
	border-color: #2B79C2;
	outline: none;
	box-shadow: 0 0 0 3px rgba(43,121,194,0.10);
}

/* Honeypot — completamente escondido */
.sef-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Form Submit */
.sef-respond-area .form-submit {
	margin: 14px 0 0 0 !important;
}

.sef-respond-area input[type="submit"],
.sef-respond-area .sef-btn-primary,
.sef-btn-primary {
	background: #2B79C2;
	color: #fff;
	border: none;
	padding: 11px 24px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14.5px;
	cursor: pointer;
	transition: all 0.18s;
	font-family: inherit;
	box-shadow: 0 2px 8px rgba(43,121,194,0.15);
}

.sef-respond-area input[type="submit"]:hover,
.sef-respond-area .sef-btn-primary:hover,
.sef-btn-primary:hover {
	background: #2266a5;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(43,121,194,0.25);
}

.sef-respond-area input[type="submit"]:disabled,
.sef-respond-area .sef-btn-primary:disabled {
	background: #999;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* ============================================================
 * Login Prompt
 * ============================================================ */
.sef-login-prompt {
	margin-top: 24px;
	padding: 24px;
	text-align: center;
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 10px;
}

.sef-login-prompt p {
	margin: 0 0 14px 0;
	color: #666;
	font-size: 15px;
}

/* ============================================================
 * Hide Akismet privacy notice
 * ============================================================ */
.akismet_comment_form_privacy_notice {
	display: none !important;
}

/* ============================================================
 * Login Modal (kept from v1.0.0)
 * ============================================================ */
.sef-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
}

.sef-modal.active {
	display: flex !important;
}

.sef-modal-overlay {
	position: absolute;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1;
}

.sef-modal-content {
	position: relative;
	background: #fff;
	padding: 30px;
	width: 90%;
	max-width: 400px;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	z-index: 2;
}

.sef-modal-close {
	position: absolute;
	right: 15px;
	top: 10px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #999;
}

/* ============================================================
 * Responsive
 * ============================================================ */
@media (max-width: 600px) {
	.sef-title {
		font-size: 20px;
	}

	.sef-comment-item {
		gap: 10px;
	}

	.sef-is-parent > .sef-comment-avatar img {
		width: 40px !important;
		height: 40px !important;
	}

	.sef-replies-list {
		padding-left: 50px;  /* avatar 40 + gap 10 */
	}

	.sef-replies-list .sef-comment-avatar img {
		width: 32px !important;
		height: 32px !important;
	}

	.sef-comment-actions {
		gap: 10px;
	}

	.sef-ig-line {
		width: 20px;
	}

	.sef-respond-area {
		padding: 16px;
	}
}
