/*
 * TZ Editorial Hub — componentes do frontend.
 *
 * Sistema separado do admin. Tudo escopado em .tzeh: nada aqui estiliza o tema,
 * o Elementor ou outros elementos da página. Fundo transparente e cores herdadas por
 * padrão, para funcionar em fundo claro ou escuro. Personalize sobrescrevendo as
 * variáveis (Elementor → Configurações do site → CSS personalizado), por exemplo:
 *
 *   .tzeh { --tzeh-accent: #d0121c; --tzeh-accent-text: #fff; --tzeh-max-width: 520px; }
 */

.tzeh {
	--tzeh-bg: transparent;
	--tzeh-surface: rgba( 127, 127, 127, 0.07 );
	--tzeh-border: rgba( 127, 127, 127, 0.35 );
	--tzeh-text: inherit;
	--tzeh-muted: rgba( 127, 127, 127, 1 );
	--tzeh-accent: #d7a748;
	--tzeh-accent-text: #111;
	--tzeh-danger: #d64545;
	--tzeh-success: #2f9e6b;
	--tzeh-info: #3b82c4;
	--tzeh-radius: 10px;
	--tzeh-gap: 16px;
	--tzeh-font: inherit;
	--tzeh-max-width: 560px;

	box-sizing: border-box;
	background: var( --tzeh-bg );
	color: var( --tzeh-text );
	font-family: var( --tzeh-font );
	line-height: 1.5;
}

.tzeh *,
.tzeh *::before,
.tzeh *::after {
	box-sizing: inherit;
}

.tzeh-auth {
	width: 100%;
	max-width: var( --tzeh-max-width );
	margin-left: auto;
	margin-right: auto;
}

/* A área do membro ocupa a largura da coluna do Elementor; limite opcional pela variável. */
.tzeh-member {
	width: 100%;
	max-width: var( --tzeh-member-max-width, none );
}

/* ── AVISO DE FASE (visível só para administradores) ── */
.tzeh-placeholder {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	padding: 14px 16px;
	border: 1px dashed var( --tzeh-accent );
	border-radius: var( --tzeh-radius );
	background: var( --tzeh-surface );
	font-size: 14px;
	line-height: 1.5;
}

.tzeh-placeholder-tag::before {
	content: '[';
}

.tzeh-placeholder-tag::after {
	content: ']';
}

.tzeh-placeholder-phase {
	padding: 1px 10px;
	border-radius: 999px;
	background: var( --tzeh-accent );
	color: #111;
	font-size: 12px;
	font-weight: 700;
}

.tzeh-placeholder small {
	flex-basis: 100%;
	color: var( --tzeh-muted );
	font-size: 12px;
}

/* ── CAIXAS E TEXTOS ── */
.tzeh .tzeh-box {
	padding: 20px;
	border: 1px solid var( --tzeh-border );
	border-radius: var( --tzeh-radius );
	background: var( --tzeh-surface );
}

.tzeh .tzeh-lead {
	margin: 0 0 12px;
	font-size: 1.05em;
	font-weight: 600;
}

.tzeh .tzeh-help {
	margin: 6px 0 0;
	font-size: 0.85em;
	color: var( --tzeh-muted );
}

.tzeh .tzeh-alt {
	margin: 16px 0 0;
	font-size: 0.95em;
}

/* ── MENSAGENS ── */
.tzeh .tzeh-notice {
	margin: 0 0 var( --tzeh-gap );
	padding: 12px 16px;
	border-radius: var( --tzeh-radius );
	border-left: 4px solid var( --tzeh-info );
	background: var( --tzeh-surface );
	font-size: 0.95em;
}

.tzeh .tzeh-notice--success { border-left-color: var( --tzeh-success ); }
.tzeh .tzeh-notice--error { border-left-color: var( --tzeh-danger ); }

.tzeh .tzeh-verify {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
}

.tzeh .tzeh-verify span {
	flex: 1 1 240px;
}

/* ── FORMULÁRIOS ── */
.tzeh .tzeh-form {
	margin: 0;
}

.tzeh .tzeh-fieldset {
	margin: 0 0 24px;
	padding: 0;
	border: 0;
	min-width: 0;
}

.tzeh .tzeh-legend {
	margin: 0 0 12px;
	padding: 0;
	font-size: 1.1em;
	font-weight: 700;
}

.tzeh .tzeh-field {
	margin: 0 0 var( --tzeh-gap );
}

.tzeh .tzeh-field--inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
}

.tzeh .tzeh-label {
	display: block;
	margin: 0 0 6px;
	font-size: 0.9em;
	font-weight: 600;
}

.tzeh .tzeh-input {
	display: block;
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var( --tzeh-border );
	border-radius: calc( var( --tzeh-radius ) - 2px );
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 16px; /* evita zoom automático no iOS */
	line-height: 1.4;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tzeh .tzeh-textarea {
	min-height: 120px;
	resize: vertical;
}

.tzeh .tzeh-input:focus {
	outline: none;
	border-color: var( --tzeh-accent );
	box-shadow: 0 0 0 3px rgba( 215, 167, 72, 0.25 );
}

.tzeh .tzeh-input[aria-invalid='true'] {
	border-color: var( --tzeh-danger );
}

.tzeh .tzeh-field-error {
	margin: 6px 0 0;
	color: var( --tzeh-danger );
	font-size: 0.85em;
	font-weight: 600;
}

.tzeh .tzeh-pass {
	position: relative;
}

.tzeh .tzeh-pass .tzeh-input {
	padding-right: 92px;
}

.tzeh .tzeh-pass-toggle {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY( -50% );
	min-height: 34px;
	margin: 0;
	padding: 4px 12px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.8em;
	font-weight: 600;
	opacity: 0.75;
	cursor: pointer;
	box-shadow: none;
}

.tzeh .tzeh-pass-toggle:hover,
.tzeh .tzeh-pass-toggle:focus-visible {
	opacity: 1;
	background: var( --tzeh-surface );
}

.tzeh .tzeh-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 0.95em;
	cursor: pointer;
}

.tzeh .tzeh-check input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var( --tzeh-accent );
}

.tzeh .tzeh-file {
	display: block;
	max-width: 100%;
	font: inherit;
	font-size: 0.9em;
}

/* Campo-armadilha anti-robô: fora da tela, mas não display:none (alguns robôs ignoram). */
.tzeh .tzeh-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ── AVATAR ── */
.tzeh .tzeh-avatar-field {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 16px;
}

.tzeh .tzeh-avatar-preview img {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
}

.tzeh .tzeh-avatar-controls {
	flex: 1 1 220px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

.tzeh .tzeh-welcome-head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 8px;
}

.tzeh .tzeh-welcome-head .tzeh-lead {
	margin: 0;
}

.tzeh .tzeh-welcome-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
}

/* ── BOTÕES E LINKS ── */
.tzeh .tzeh-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin: 20px 0 0;
}

.tzeh .tzeh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin: 0;
	padding: 10px 26px;
	border: 0;
	border-radius: 999px;
	background: var( --tzeh-accent );
	color: var( --tzeh-accent-text );
	font: inherit;
	font-size: 1em;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.tzeh .tzeh-btn:hover,
.tzeh .tzeh-btn:focus-visible {
	color: var( --tzeh-accent-text );
	filter: brightness( 0.92 );
	text-decoration: none;
}

.tzeh .tzeh-btn:focus-visible {
	outline: 2px solid var( --tzeh-accent );
	outline-offset: 3px;
}

.tzeh .tzeh-btn[aria-busy='true'] {
	opacity: 0.7;
	cursor: progress;
}

.tzeh .tzeh-btn--small {
	min-height: 36px;
	padding: 6px 16px;
	font-size: 0.9em;
}

.tzeh .tzeh-link {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tzeh .tzeh-link:hover {
	color: var( --tzeh-accent );
}

@media ( max-width: 480px ) {
	.tzeh .tzeh-btn {
		width: 100%;
	}

	.tzeh .tzeh-actions {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}
}

/* ══ ÁREA DO MEMBRO (Fase 03) ══ */

.tzeh .tzeh-title {
	margin: 0;
	font-size: 1.4em;
	line-height: 1.25;
}

.tzeh .tzeh-subtitle {
	margin: 0;
	font-size: 1.1em;
	line-height: 1.3;
}

.tzeh .tzeh-small {
	font-size: 0.85em;
}

.tzeh .tzeh-empty-text {
	margin: 0;
	color: var( --tzeh-muted );
	font-size: 0.95em;
}

/* ── VISÃO GERAL ── */
.tzeh .tzeh-dash-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 16px;
	margin: 0 0 20px;
}

.tzeh .tzeh-dash-hello {
	flex: 1 1 200px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}

.tzeh .tzeh-stats {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 150px, 1fr ) );
	gap: 12px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.tzeh .tzeh-stat {
	margin: 0;
	padding: 0;
	border: 1px solid var( --tzeh-border );
	border-left: 4px solid var( --tzeh-stat-color, var( --tzeh-accent ) );
	border-radius: var( --tzeh-radius );
	background: var( --tzeh-surface );
}

.tzeh .tzeh-stat-link,
.tzeh .tzeh-stat-plain {
	display: flex;
	flex-direction: column;
	gap: 2px;
	height: 100%;
	padding: 14px 16px;
	color: inherit;
	text-decoration: none;
}

.tzeh .tzeh-stat-link:hover,
.tzeh .tzeh-stat-link:focus-visible {
	color: inherit;
	text-decoration: none;
}

.tzeh .tzeh-stat-link:hover .tzeh-stat-label,
.tzeh .tzeh-stat-link:focus-visible .tzeh-stat-label {
	text-decoration: underline;
}

.tzeh .tzeh-stat-num {
	font-size: 1.8em;
	font-weight: 700;
	line-height: 1.1;
}

.tzeh .tzeh-stat-label {
	color: var( --tzeh-muted );
	font-size: 0.85em;
}

.tzeh .tzeh-stat--rascunhos { --tzeh-stat-color: var( --tzeh-muted ); }
.tzeh .tzeh-stat--aguardando { --tzeh-stat-color: var( --tzeh-info ); }
.tzeh .tzeh-stat--correcoes { --tzeh-stat-color: #e08a2b; }
.tzeh .tzeh-stat--publicados { --tzeh-stat-color: var( --tzeh-success ); }
.tzeh .tzeh-stat--recusados { --tzeh-stat-color: var( --tzeh-danger ); }

.tzeh .tzeh-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 12px;
	margin: 0 0 12px;
}

.tzeh .tzeh-note-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tzeh .tzeh-note {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 2px 12px;
	margin: 0;
	padding: 10px 0;
	border-top: 1px solid var( --tzeh-border );
	font-size: 0.95em;
}

.tzeh .tzeh-note:first-child {
	border-top: 0;
	padding-top: 0;
}

.tzeh .tzeh-note a {
	color: inherit;
}

.tzeh .tzeh-note--unread > a,
.tzeh .tzeh-note--unread > span {
	font-weight: 700;
}

.tzeh .tzeh-note-date {
	color: var( --tzeh-muted );
	font-size: 0.85em;
	white-space: nowrap;
}

/* ── MENU DO MEMBRO ── */
.tzeh .tzeh-menu-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tzeh .tzeh-menu-item {
	margin: 0;
	padding: 0;
}

.tzeh .tzeh-menu-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 42px;
	padding: 8px 14px;
	border-radius: calc( var( --tzeh-radius ) - 2px );
	color: inherit;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.tzeh .tzeh-menu-link:hover,
.tzeh .tzeh-menu-link:focus-visible {
	background: var( --tzeh-surface );
	color: inherit;
}

.tzeh .tzeh-menu-link.is-current {
	background: var( --tzeh-accent );
	color: var( --tzeh-accent-text );
}

.tzeh .tzeh-menu-count {
	min-width: 24px;
	padding: 0 8px;
	border-radius: 999px;
	background: var( --tzeh-surface );
	font-size: 0.8em;
	line-height: 1.7;
	text-align: center;
}

.tzeh .tzeh-menu-item--logout {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var( --tzeh-border );
}

/* Horizontal: rola de lado no celular em vez de quebrar em várias linhas. */
.tzeh.tzeh-menu--horizontal .tzeh-menu-list {
	flex-direction: row;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.tzeh.tzeh-menu--horizontal .tzeh-menu-link {
	white-space: nowrap;
}

.tzeh.tzeh-menu--horizontal .tzeh-menu-item--logout {
	margin: 0 0 0 auto;
	padding: 0;
	border: 0;
}

/* ── MEUS CONTOS ── */
.tzeh .tzeh-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px;
}

.tzeh .tzeh-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 6px 14px;
	border: 1px solid var( --tzeh-border );
	border-radius: 999px;
	color: inherit;
	font-size: 0.9em;
	font-weight: 600;
	text-decoration: none;
}

.tzeh .tzeh-filter:hover,
.tzeh .tzeh-filter:focus-visible {
	border-color: var( --tzeh-accent );
	color: inherit;
}

.tzeh .tzeh-filter.is-current {
	border-color: var( --tzeh-accent );
	background: var( --tzeh-accent );
	color: var( --tzeh-accent-text );
}

.tzeh .tzeh-filter-count {
	font-size: 0.85em;
	opacity: 0.75;
}

.tzeh .tzeh-cards {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 260px, 1fr ) );
	gap: var( --tzeh-gap );
}

.tzeh .tzeh-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var( --tzeh-border );
	border-radius: var( --tzeh-radius );
	background: var( --tzeh-surface );
}

.tzeh .tzeh-card-media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var( --tzeh-surface );
}

.tzeh .tzeh-card-media img,
.tzeh .tzeh-card-noimg {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tzeh .tzeh-card-noimg {
	background: linear-gradient( 135deg, rgba( 127, 127, 127, 0.18 ), rgba( 127, 127, 127, 0.04 ) );
}

.tzeh .tzeh-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 10px;
	border-radius: 999px;
	background: #555;
	color: #fff;
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.tzeh .tzeh-badge--pending,
.tzeh .tzeh-badge--in_review { background: var( --tzeh-info ); }
.tzeh .tzeh-badge--changes_requested { background: #c46f12; }
.tzeh .tzeh-badge--approved { background: var( --tzeh-success ); }
.tzeh .tzeh-badge--rejected { background: var( --tzeh-danger ); }

.tzeh .tzeh-card-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
}

.tzeh .tzeh-card-title {
	margin: 0;
	font-size: 1.1em;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.tzeh .tzeh-card-dates {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 14px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var( --tzeh-muted );
	font-size: 0.8em;
}

.tzeh .tzeh-card-dates li {
	margin: 0;
}

.tzeh .tzeh-card-dates strong {
	font-weight: 600;
}

.tzeh .tzeh-feedback {
	padding: 10px 12px;
	border-left: 3px solid #c46f12;
	border-radius: 6px;
	background: rgba( 196, 111, 18, 0.1 );
	font-size: 0.9em;
}

.tzeh .tzeh-feedback--rejected {
	border-left-color: var( --tzeh-danger );
	background: rgba( 214, 69, 69, 0.1 );
}

.tzeh .tzeh-feedback-title {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 10px;
	margin: 0 0 4px;
	font-weight: 700;
}

.tzeh .tzeh-feedback-date {
	color: var( --tzeh-muted );
	font-size: 0.85em;
	font-weight: 400;
}

.tzeh .tzeh-feedback-text {
	margin: 0;
	overflow-wrap: anywhere;
}

.tzeh .tzeh-card-details {
	font-size: 0.85em;
}

.tzeh .tzeh-card-details summary {
	cursor: pointer;
	font-weight: 600;
}

.tzeh .tzeh-card-details dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 4px 12px;
	margin: 8px 0 0;
}

.tzeh .tzeh-card-details dt {
	color: var( --tzeh-muted );
}

.tzeh .tzeh-card-details dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.tzeh .tzeh-card-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin-top: auto;
	padding-top: 6px;
}

.tzeh .tzeh-inline-form {
	margin: 0;
}

.tzeh .tzeh-btn-ghost {
	min-height: 36px;
	margin: 0;
	padding: 6px 4px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.9em;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	box-shadow: none;
}

.tzeh .tzeh-btn-ghost--danger {
	color: var( --tzeh-danger );
}

.tzeh .tzeh-btn-ghost:hover,
.tzeh .tzeh-btn-ghost:focus-visible {
	background: transparent;
	color: var( --tzeh-danger );
	filter: brightness( 1.15 );
}

.tzeh .tzeh-empty {
	text-align: center;
}

.tzeh .tzeh-empty .tzeh-actions {
	justify-content: center;
}

.tzeh .tzeh-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 24px 0 0;
}

.tzeh .tzeh-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	min-height: 38px;
	padding: 4px 10px;
	border: 1px solid var( --tzeh-border );
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
}

.tzeh .tzeh-pagination .page-numbers.current {
	border-color: var( --tzeh-accent );
	background: var( --tzeh-accent );
	color: var( --tzeh-accent-text );
}

.tzeh .tzeh-pagination .page-numbers.dots {
	border-color: transparent;
}

@media ( max-width: 480px ) {
	.tzeh .tzeh-stats {
		grid-template-columns: repeat( 2, 1fr );
	}

	.tzeh .tzeh-card-actions .tzeh-btn {
		width: auto;
	}
}
