/* ===========================
   GayPeru Profiles - CSS
   =========================== */

/* Variables de color (modo oscuro) */
:root {
	--gp-bg: #0d0d0d;
	--gp-bg-soft: #161616;
	--gp-bg-softer: #1f1f1f;
	--gp-border: #2a2a2a;
	--gp-text: #f5f5f5;
	--gp-text-muted: #a0a0a0;
	--gp-accent-gradient: linear-gradient(135deg, #ff4b8b 0%, #8b5cff 100%);
	--gp-accent: #ff4b8b;
	--gp-accent-2: #8b5cff;
	--gp-error: #ff4b4b;
	--gp-success: #4caf50;
}

/* Reset básico para elementos del plugin */
.gp-profile-page,
.gp-user-directory-wrapper,
.gp-login-form-wrapper,
.gp-register-form-wrapper,
.gp-edit-profile-wrapper {
	color: var(--gp-text);
	background-color: var(--gp-bg);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Mensajes */
.gp-message {
	padding: 12px 16px;
	border-radius: 8px;
	margin: 12px 0;
	font-size: 14px;
}

.gp-message-error {
	background: rgba(255, 75, 75, 0.1);
	border: 1px solid rgba(255, 75, 75, 0.6);
	color: #ffb3b3;
}

.gp-message-warning {
	background: rgba(255, 193, 7, 0.1);
	border: 1px solid rgba(255, 193, 7, 0.6);
	color: #ffe082;
}

.gp-message-info {
	background: rgba(139, 92, 255, 0.15);
	border: 1px solid rgba(139, 92, 255, 0.7);
	color: #d0c5ff;
}

/* Botones */
.gp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 14px;
	font-weight: 500;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.gp-btn-primary {
	background-image: var(--gp-accent-gradient);
	color: #ffffff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.gp-btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.8);
}

.gp-btn-secondary {
	background-color: var(--gp-bg-softer);
	border: 1px solid var(--gp-border);
	color: var(--gp-text);
}

.gp-btn-secondary:hover {
	background-color: #272727;
}

.gp-btn-light {
	background-color: rgba(0, 0, 0, 0.4);
	color: var(--gp-text);
	border: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 12px;
	padding: 6px 12px;
}

.gp-btn-light:hover {
	background-color: rgba(0, 0, 0, 0.7);
}

/* Títulos de secciones */
.gp-section-title {
	font-size: 18px;
	margin: 0 0 12px;
	font-weight: 600;
}

/* ===========================
   Perfil - Layout general
   =========================== */

.gp-profile-page {
	max-width: 1000px;
	margin: 0 auto;
	background-color: var(--gp-bg);
	padding: 0 12px 40px;
	box-sizing: border-box;
}

/* HEADER */
.gp-profile-header {
	background-color: var(--gp-bg-soft);
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid var(--gp-border);
	margin-top: 16px;
}

/* Portada */
.gp-profile-cover-wrapper {
	position: relative;
	height: 160px;
	background-color: #101010;
	overflow: hidden;
}

.gp-profile-cover {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
}

.gp-profile-cover-default {
	background-image: radial-gradient(circle at top left, #ff4b8b 0%, #0d0d0d 45%), radial-gradient(circle at bottom right, #8b5cff 0%, #0d0d0d 50%);
}

.gp-btn-change-cover {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 2;
}

/* Avatar + resumen */
.gp-profile-main {
	padding: 0 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: -44px;
}

/* Avatar */
.gp-profile-avatar-wrapper {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.gp-profile-avatar-inner {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	border: 3px solid #0d0d0d;
	overflow: hidden;
	position: relative;
	background-image: var(--gp-accent-gradient);
	padding: 3px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
}

.gp-profile-avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

/* Puntos de estado */
.gp-status-dot {
	position: absolute;
	right: 4px;
	bottom: 4px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid #0d0d0d;
	box-sizing: border-box;
}

.gp-status-online {
	background: #4caf50;
	box-shadow: 0 0 8px rgba(76, 175, 80, 0.7);
}

.gp-status-offline {
	background: #616161;
}

/* Info básica */
.gp-profile-summary {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gp-profile-title-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
}

.gp-profile-name {
	font-size: 22px;
	margin: 0;
}

.gp-badge-verified {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	font-size: 13px;
	background-image: var(--gp-accent-gradient);
	color: #fff;
	box-shadow: 0 0 10px rgba(255, 75, 139, 0.6);
}

/* Meta */
.gp-profile-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 13px;
	color: var(--gp-text-muted);
}

.gp-profile-meta-item {
	background-color: var(--gp-bg-softer);
	border-radius: 999px;
	padding: 4px 10px;
}

/* Stats seguidores */
.gp-profile-stats {
	display: flex;
	gap: 12px;
	margin-top: 8px;
}

.gp-profile-stat {
	background-color: var(--gp-bg-softer);
	border-radius: 12px;
	border: 1px solid var(--gp-border);
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 100px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.1s ease;
}

.gp-profile-stat:hover {
	background-color: #262626;
	transform: translateY(-1px);
}

.gp-profile-stat-number {
	font-size: 16px;
	font-weight: 600;
}

.gp-profile-stat-label {
	font-size: 12px;
	color: var(--gp-text-muted);
}

/* Acciones */
.gp-profile-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.gp-btn-follow[data-following="1"] {
	background: none;
	background-color: transparent;
	color: var(--gp-text);
	border: 1px solid var(--gp-border);
}

.gp-btn-follow[data-following="1"]:hover {
	background-color: var(--gp-bg-softer);
}

/* CUERPO */
.gp-profile-body {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.gp-profile-section {
	background-color: var(--gp-bg-soft);
	border-radius: 16px;
	border: 1px solid var(--gp-border);
	padding: 16px;
}

.gp-profile-bio {
	font-size: 14px;
	line-height: 1.5;
	color: var(--gp-text);
}

.gp-profile-empty {
	font-size: 13px;
	color: var(--gp-text-muted);
}

/* Lista de info */
.gp-profile-info-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 14px;
}

.gp-profile-info-label {
	color: var(--gp-text-muted);
	margin-right: 4px;
}

/* Redes */
.gp-profile-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.gp-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 13px;
	text-decoration: none;
	color: #fff;
	background-image: var(--gp-accent-gradient);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gp-social-link:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
}

/* ===========================
   Directorio de usuarios
   =========================== */

.gp-user-directory-wrapper {
	padding: 20px 12px 40px;
	max-width: 1100px;
	margin: 0 auto;
	box-sizing: border-box;
}

.gp-user-directory-filters {
	margin-bottom: 16px;
}

.gp-user-directory-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax(150px, 1fr) );
	gap: 14px;
}

/* Tarjetas de usuario */
.gp-user-card {
	background-color: var(--gp-bg-soft);
	border-radius: 14px;
	padding: 10px;
	border: 1px solid var(--gp-border);
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.gp-user-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
	border-color: rgba(255, 255, 255, 0.1);
}

.gp-user-card-link {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
}

.gp-user-card-avatar-wrapper {
	position: relative;
}

.gp-user-card-avatar {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

/* Reutilizamos gp-status-dot */
.gp-user-card .gp-status-dot {
	right: -1px;
	bottom: -1px;
}

/* Info */
.gp-user-card-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.gp-user-card-name {
	font-size: 15px;
	margin: 0;
}

.gp-user-card-meta {
	font-size: 12px;
	color: var(--gp-text-muted);
}

/* Paginación */
.gp-pagination {
	margin-top: 18px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.gp-page-number {
	min-width: 32px;
	height: 32px;
	border-radius: 999px;
	border: 1px solid var(--gp-border);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	text-decoration: none;
	color: var(--gp-text-muted);
}

.gp-page-number-current {
	background-image: var(--gp-accent-gradient);
	color: #fff;
	border-color: transparent;
}

/* ===========================
   Formularios (login / registro / editar perfil)
   =========================== */

.gp-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.gp-form-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.gp-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.gp-form-group-inline {
	flex-direction: row;
	align-items: center;
	gap: 8px;
}

.gp-form-group label {
	font-size: 13px;
	color: var(--gp-text-muted);
}

.gp-form-group input[type="text"],
.gp-form-group input[type="email"],
.gp-form-group input[type="password"],
.gp-form-group input[type="number"],
.gp-form-group textarea {
	background-color: var(--gp-bg-softer);
	border-radius: 10px;
	border: 1px solid var(--gp-border);
	color: var(--gp-text);
	padding: 8px 10px;
	font-size: 14px;
	box-sizing: border-box;
}

.gp-form-group textarea {
	min-height: 80px;
	resize: vertical;
}

.gp-form-group input:focus,
.gp-form-group textarea:focus {
	outline: none;
	border-color: rgba(255, 75, 139, 0.8);
	box-shadow: 0 0 0 1px rgba(255, 75, 139, 0.4);
}

.gp-form-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
}

.gp-form-feedback {
	font-size: 13px;
	color: var(--gp-text-muted);
}

/* contenedores login/registro/editar */
.gp-login-form-wrapper,
.gp-register-form-wrapper,
.gp-edit-profile-wrapper {
	max-width: 420px;
	margin: 24px auto 40px;
	padding: 20px 16px 26px;
	border-radius: 16px;
	border: 1px solid var(--gp-border);
	background-color: var(--gp-bg-soft);
}

/* ===========================
   Modal seguidores / seguidos
   =========================== */

.gp-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.gp-modal[aria-hidden="false"] {
	display: flex;
}

.gp-modal-backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.7);
}

.gp-modal-dialog {
	position: relative;
	z-index: 1;
	background-color: var(--gp-bg-soft);
	border-radius: 16px;
	border: 1px solid var(--gp-border);
	padding: 16px;
	width: 100%;
	max-width: 420px;
	max-height: 70vh;
	display: flex;
	flex-direction: column;
}

.gp-modal-title {
	margin: 0 0 10px;
	font-size: 16px;
}

.gp-modal-body {
	overflow-y: auto;
	font-size: 14px;
}

.gp-modal-close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none;
	border: none;
	color: var(--gp-text-muted);
	font-size: 20px;
	cursor: pointer;
}

/* Loading */
.gp-loading {
	text-align: center;
	color: var(--gp-text-muted);
	font-size: 13px;
}

/* ===========================
   Responsive
   =========================== */

@media (min-width: 600px) {
	.gp-profile-main {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
	}

	.gp-profile-avatar-wrapper {
		flex: 0 0 auto;
	}

	.gp-profile-summary {
		flex: 1;
	}

	.gp-profile-actions {
		flex: 0 0 auto;
		justify-content: flex-end;
	}
}

@media (min-width: 768px) {
	.gp-profile-page {
		padding: 0 20px 50px;
	}

	.gp-profile-cover-wrapper {
		height: 200px;
	}

	.gp-profile-avatar-inner {
		width: 110px;
		height: 110px;
	}

	.gp-profile-name {
		font-size: 24px;
	}

	.gp-form-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gp-form-group:nth-child(1),
	.gp-form-group:nth-child(2) {
		grid-column: 1 / -1;
	}
}
