/**
 * Linea 3 Estudio Legal - Sistema de Reseñas de Clientes (CSS Frontend)
 * Estilos refinados con estética editorial premium, transiciones fluidas y diseño responsivo.
 */

:root {
	--l3-blue-dark: #07172d;
	--l3-blue-medium: #0e243d;
	--l3-blue-light: #163250;
	--l3-gold: #d4a843;
	--l3-gold-hover: #e5be5a;
	--l3-gray-light: #f5f6f8;
	--l3-gray-border: #dcdfe6;
	--l3-text-dark: #1d2327;
	--l3-text-muted: #646970;
	--l3-text-light: #ffffff;
	--l3-red: #d63638;
	--l3-green: #00a32a;
	--l3-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ── Contenedor General del Formulario ── */
.l3-resenas-container {
	max-width: 680px;
	margin: 40px auto;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(7, 23, 45, 0.08);
	border: 1px solid var(--l3-gray-border);
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: var(--l3-text-dark);
	transition: var(--l3-transition);
}

/* ── Encabezado del Formulario (Premium Editorial) ── */
.l3-resenas-header {
	background: var(--l3-blue-dark);
	color: var(--l3-text-light);
	padding: 30px 40px;
	text-align: center;
	position: relative;
	border-bottom: 3px solid var(--l3-gold);
}
.l3-resenas-header h2 {
	margin: 0 0 8px 0;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: var(--l3-text-light);
}
.l3-resenas-header p {
	margin: 0;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.8);
	font-weight: 300;
	line-height: 1.4;
}

/* ── Cuerpo y Pasos del Formulario ── */
.l3-resenas-body {
	padding: 40px;
	position: relative;
	min-height: 300px;
}
.l3-resenas-step {
	display: none;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.35s ease, transform 0.35s ease;
}
.l3-resenas-step.l3-active-step {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

/* ── Paso 0: Pantalla de Bienvenida y Selección ── */
.l3-resenas-welcome {
	text-align: center;
	padding: 10px 0;
}
.l3-resenas-welcome h3 {
	font-size: 18px;
	margin: 0 0 24px 0;
	color: var(--l3-blue-dark);
	font-weight: 600;
}
.l3-resenas-flow-buttons {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 380px;
	margin: 0 auto;
}
.l3-btn-flow {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 16px 24px;
	border-radius: 8px;
	border: 1px solid var(--l3-gray-border);
	background: #ffffff;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	color: var(--l3-blue-dark);
	transition: var(--l3-transition);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
.l3-btn-flow:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(14, 36, 61, 0.1);
	border-color: var(--l3-gold);
}
.l3-btn-flow--linkedin {
	background: #0a66c2;
	color: #ffffff;
	border-color: #0a66c2;
}
.l3-btn-flow--linkedin:hover {
	background: #004182;
	border-color: #004182;
	color: #ffffff;
}
.l3-btn-flow .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* ── Tarjeta de Perfil de LinkedIn (Verificado) ── */
.l3-linkedin-card {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #f3f8fc;
	border: 1px solid #b8dbfd;
	padding: 16px 20px;
	border-radius: 8px;
	margin-bottom: 24px;
}
.l3-linkedin-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #ffffff;
	box-shadow: 0 2px 6px rgba(10, 102, 194, 0.2);
}
.l3-linkedin-info {
	flex: 1;
}
.l3-linkedin-name {
	font-weight: 700;
	font-size: 16px;
	color: #0a66c2;
	margin-bottom: 2px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.l3-linkedin-verified-badge {
	color: var(--l3-green);
	font-size: 14px;
	font-weight: bold;
}
.l3-linkedin-profile-url {
	font-size: 12px;
	color: var(--l3-text-muted);
	text-decoration: none;
}
.l3-linkedin-profile-url:hover {
	text-decoration: underline;
}

/* ── Diseño de Formularios ── */
.l3-resenas-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.l3-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.l3-form-group label {
	font-size: 14px;
	font-weight: 600;
	color: #ffffff;
}
.l3-form-group label span {
	color: rgba(255, 255, 255, 0.6) !important;
}
.l3-form-group input[type="text"],
.l3-form-group input[type="url"],
.l3-form-group select,
.l3-form-group textarea {
	font-size: 14px;
	padding: 10px 14px;
	border: 1px solid var(--l3-gray-border);
	border-radius: 6px;
	background-color: #ffffff;
	transition: var(--l3-transition);
	color: var(--l3-text-dark);
	box-sizing: border-box;
	width: 100%;
}
.l3-form-group input:focus,
.l3-form-group select:focus,
.l3-form-group textarea:focus {
	outline: none;
	border-color: var(--l3-gold);
	box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

.l3-form-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}
@media (max-width: 560px) {
	.l3-form-grid-2 {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

/* ── Estrellas Interactivas (Frontend) ── */
.l3-stars-selector {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
}
.l3-frontend-star {
	cursor: pointer;
	color: #ccc;
	transition: transform 0.15s ease, color 0.15s ease;
	display: inline-flex;
}
.l3-frontend-star:hover {
	transform: scale(1.2);
}
.l3-frontend-star--active {
	color: var(--l3-gold);
}
.l3-frontend-star--hover {
	color: var(--l3-gold-hover);
}
.l3-stars-text {
	margin-left: 12px;
	font-size: 13px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.7);
}

/* Evitar que las estrellas se encojan en el flex container recortado */
.l3-star-rating-container svg {
	flex-shrink: 0 !important;
	min-width: 24px !important;
	height: 24px !important;
}

/* Evitar recorte del glow de la animación al llegar a 5.0 */
.l3-stars-filled.l3-stars-perfect {
	overflow: visible !important;
}

/* ── Drag & Drop Foto de Perfil Manual ── */
.l3-upload-zone {
	border: 2px dashed rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.05);
	transition: var(--l3-transition);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	position: relative;
}
.l3-upload-zone:hover,
.l3-upload-zone.l3-dragover {
	border-color: var(--l3-gold);
	background: rgba(212, 168, 67, 0.02);
}
.l3-upload-icon {
	color: rgba(255, 255, 255, 0.7);
	font-size: 32px;
	width: 32px;
	height: 32px;
	line-height: 1;
}
.l3-upload-text {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.85);
}
.l3-upload-text strong {
	color: var(--l3-gold);
}
.l3-file-input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}
.l3-avatar-upload-preview {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
	background: rgba(255, 255, 255, 0.05);
	padding: 8px 12px;
	border-radius: 6px;
	border: 1px solid var(--l3-gray-border);
}
.l3-avatar-upload-preview img {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--l3-gray-border);
}
.l3-avatar-upload-preview span {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.85);
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ── Checkbox e Inputs Inline ── */
.l3-form-group--checkbox label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	font-weight: 500;
	color: var(--l3-text-dark);
	cursor: pointer;
	user-select: none;
}
.l3-form-group--checkbox input[type="checkbox"] {
	margin-top: 3px;
	width: 16px;
	height: 16px;
	cursor: pointer;
}

/* ── Contador de Caracteres ── */
.l3-textarea-wrapper {
	position: relative;
}
.l3-char-counter {
	text-align: right;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.6);
	margin-top: 4px;
	transition: color 0.2s ease;
}
.l3-char-counter--warning {
	color: #dba617;
	font-weight: 600;
}
.l3-char-counter--exceeded {
	color: var(--l3-red);
	font-weight: 700;
}
.l3-textarea--exceeded {
	border-color: var(--l3-red) !important;
	box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.15) !important;
}

/* ── Botones de Control y Envío (Premium Theme) ── */
.l3-form-footer {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 24px;
	width: 100%;
	box-sizing: border-box;
}
.l3-btn {
	padding: 10px 24px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	font-family: 'Outfit', sans-serif;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1px solid transparent;
}
.l3-btn-submit {
	background: #ce9e50;
	border-color: #ce9e50;
	color: #020617;
}
.l3-btn-submit:hover {
	background: #b88645;
	border-color: #b88645;
	transform: translateY(-1px);
}
.l3-btn-back {
	padding: 10px 20px;
	background: transparent;
	border-color: rgba(184, 150, 100, 0.45);
	color: #ce9e50;
	font-weight: 500;
	gap: 6px;
}
.l3-btn-back:hover {
	background: rgba(206, 158, 80, 0.1);
	border-color: #ce9e50;
}

/* ── Spinner / Loader de carga ── */
.l3-btn-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: l3-spin 0.8s linear infinite;
}
@keyframes l3-spin {
	to { transform: rotate(360deg); }
}
.l3-btn--loading .l3-btn-spinner {
	display: inline-block;
}
.l3-btn--loading {
	pointer-events: none;
	opacity: 0.8;
}

/* ── Mensajes de Respuesta (Éxito / Error) ── */
.l3-resenas-alert {
	padding: 16px 20px;
	border-radius: 6px;
	margin-bottom: 24px;
	font-size: 14px;
	line-height: 1.5;
	display: flex;
	align-items: center;
	gap: 12px;
	animation: l3-slide-down 0.3s ease;
}
@keyframes l3-slide-down {
	from { opacity: 0; transform: translateY(-10px); }
	to { opacity: 1; transform: translateY(0); }
}
.l3-resenas-alert--success {
	background-color: #e6f6eb;
	border: 1px solid #b3e6c3;
	color: #00731f;
}
.l3-resenas-alert--error {
	background-color: #fdf2f2;
	border: 1px solid #f8b4b4;
	color: #9b1c1c;
}

/* ── Modal de Simulación LinkedIn OAuth (Elegancia Absoluta) ── */
.l3-linkedin-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(7, 23, 45, 0.6);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}
.l3-linkedin-modal-overlay.l3-modal-open {
	opacity: 1;
	pointer-events: auto;
}
.l3-linkedin-modal {
	background: #ffffff;
	width: 100%;
	max-width: 460px;
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(7, 23, 45, 0.25);
	overflow: hidden;
	transform: scale(0.9);
	transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	border: 1px solid var(--l3-gray-border);
}
.l3-linkedin-modal-overlay.l3-modal-open .l3-linkedin-modal {
	transform: scale(1);
}
.l3-linkedin-modal-header {
	background: var(--l3-blue-dark);
	color: var(--l3-text-light);
	padding: 20px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 3px solid var(--l3-gold);
}
.l3-linkedin-modal-header h4 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.3px;
}
.l3-linkedin-close {
	background: none;
	border: none;
	color: #ffffff;
	font-size: 24px;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	opacity: 0.8;
	transition: opacity 0.2s ease;
}
.l3-linkedin-close:hover {
	opacity: 1;
}
.l3-linkedin-modal-body {
	padding: 24px;
	text-align: center;
}
.l3-linkedin-modal-logo {
	color: #0a66c2;
	font-size: 40px;
	margin-bottom: 16px;
	display: block;
}
.l3-linkedin-modal-body p {
	margin: 0 0 20px 0;
	font-size: 14px;
	color: var(--l3-text-dark);
	line-height: 1.5;
}
.l3-linkedin-select-profile {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 8px;
}
.l3-linkedin-profile-option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border: 1px solid var(--l3-gray-border);
	border-radius: 8px;
	cursor: pointer;
	transition: var(--l3-transition);
	background: #ffffff;
	text-align: left;
}
.l3-linkedin-profile-option:hover {
	border-color: #0a66c2;
	background: #f4f9ff;
	transform: translateY(-1px);
}
.l3-linkedin-profile-option img {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
}
.l3-linkedin-profile-option-name {
	font-weight: 600;
	font-size: 14px;
	color: var(--l3-text-dark);
}
.l3-linkedin-profile-option-title {
	font-size: 12px;
	color: var(--l3-text-muted);
}
