/* Sino de notificações (pedidos de amizade + trocas pendentes) e botão de
   amizade no perfil público. */

.ksp-notif-wrap {
	position: relative;
}

/* ---------------- Pesquisa de utilizadores ---------------- */

.ksp-usersearch-wrap {
	position: relative;
}
.ksp-usersearch-panel {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 300px;
	max-width: 90vw;
	max-height: 70vh;
	overflow-y: auto;
	background: #0a0a0c;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	padding: 10px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	z-index: 3200;
}
.ksp-usersearch-wrap.is-open .ksp-usersearch-panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.ksp-usersearch-panel input[type="text"] {
	width: 100%;
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	font-size: 0.8rem;
	box-sizing: border-box;
	margin-bottom: 8px;
}
.ksp-usersearch-result {
	position: relative;
	display: block;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 8px;
	height: 70px;
	background-size: cover;
	background-position: center;
	background-color: #181822;
	cursor: pointer;
	text-decoration: none;
}
.ksp-usersearch-result::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 70%);
}
.ksp-usersearch-result-inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	height: 100%;
	padding: 0 10px;
}
.ksp-usersearch-result img.avatar {
	width: 34px;
	height: 34px;
	border-radius: 999px;
	object-fit: cover;
	border: 2px solid #fff;
	flex-shrink: 0;
	background: #222;
}
.ksp-usersearch-result-name {
	flex: 1;
	min-width: 0;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 800;
	text-shadow: 0 1px 3px rgba(0,0,0,0.8);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ksp-usersearch-result-name small {
	display: block;
	font-weight: 500;
	font-size: 0.65rem;
	color: rgba(255,255,255,0.75);
}
.ksp-usersearch-add {
	flex-shrink: 0;
	background: #3D9BE9;
	color: #000;
	border: none;
	border-radius: 999px;
	width: 26px;
	height: 26px;
	font-size: 0.9rem;
	font-weight: 800;
	cursor: pointer;
}
.ksp-usersearch-add:disabled {
	opacity: 0.5;
	cursor: default;
}

/* ---------------- Lista de Amigos (modal) ---------------- */

#ksp-friendslist-overlay {
	display: none;
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0,0,0,0.75);
	z-index: 4600;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}
#ksp-friendslist-overlay.show {
	display: flex;
}
.ksp-friendslist-box {
	width: 100%;
	max-width: 760px;
	max-height: 86vh;
	background: #0a0a0c;
	border: 1px solid rgba(255,255,255,0.12);
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.ksp-friendslist-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}
.ksp-friendslist-header h2 {
	margin: 0;
	font-size: 1rem;
	color: #fff;
}
#ksp-friendslist-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 1rem;
	cursor: pointer;
}
.ksp-friendslist-columns {
	display: flex;
	flex: 1;
	min-height: 0;
}
.ksp-friendslist-left {
	width: 44%;
	min-width: 220px;
	border-right: 1px solid rgba(255,255,255,0.1);
	display: flex;
	flex-direction: column;
}
#ksp-friendslist-items {
	flex: 1;
	overflow-y: auto;
	padding: 10px;
}
.ksp-friendslist-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px;
	border-radius: 8px;
	cursor: pointer;
}
.ksp-friendslist-item:hover, .ksp-friendslist-item.is-active {
	background: rgba(255,255,255,0.08);
}
.ksp-friendslist-item-avatar {
	position: relative;
	flex-shrink: 0;
}
.ksp-friendslist-item-avatar img {
	width: 34px;
	height: 34px;
	border-radius: 999px;
	object-fit: cover;
	background: #222;
	display: block;
}
.ksp-online-dot {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: #555;
	border: 2px solid #0a0a0c;
}
.ksp-online-dot.is-online {
	background: #2ecc71;
}
.ksp-friendslist-item-name {
	flex: 1;
	min-width: 0;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ksp-friendslist-item-name small {
	display: block;
	font-weight: 500;
	color: rgba(255,255,255,0.5);
	font-size: 0.65rem;
}
.ksp-friendslist-bulk {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid rgba(255,255,255,0.1);
	font-size: 0.72rem;
	color: rgba(255,255,255,0.75);
}
.ksp-friendslist-bulk button {
	background: rgba(229,72,77,0.2);
	color: #e5484d;
	border: none;
	border-radius: 8px;
	padding: 6px 10px;
	font-size: 0.7rem;
	font-weight: 700;
	cursor: pointer;
}
.ksp-friendslist-bulk button:disabled {
	opacity: 0.4;
	cursor: default;
}
.ksp-friendslist-right {
	flex: 1;
	padding: 18px;
	overflow-y: auto;
}
.ksp-friendslist-profile-banner {
	height: 90px;
	border-radius: 12px;
	background-size: cover;
	background-position: center;
	background-color: #181822;
	margin-bottom: -30px;
}
.ksp-friendslist-profile-head {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	padding: 0 6px;
}
.ksp-friendslist-profile-head img {
	width: 64px;
	height: 64px;
	border-radius: 999px;
	object-fit: cover;
	border: 3px solid #0a0a0c;
	background: #222;
}
.ksp-friendslist-profile-name {
	color: #fff;
	font-weight: 800;
	font-size: 1rem;
}
.ksp-friendslist-profile-name small {
	display: block;
	font-weight: 500;
	color: rgba(255,255,255,0.55);
	font-size: 0.72rem;
}
.ksp-friendslist-profile-actions {
	display: flex;
	gap: 8px;
	margin-top: 16px;
}
.ksp-friendslist-profile-actions a, .ksp-friendslist-profile-actions button {
	flex: 1;
	text-align: center;
	padding: 9px;
	border-radius: 8px;
	font-size: 0.75rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
}
.ksp-friendslist-profile-actions a {
	background: #3D9BE9;
	color: #000;
	border: none;
}
.ksp-friendslist-profile-actions button {
	background: rgba(229,72,77,0.2);
	color: #e5484d;
	border: none;
}
@media (max-width: 600px) {
	.ksp-friendslist-columns { flex-direction: column; }
	.ksp-friendslist-left { width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); max-height: 240px; }
}
.ksp-notif-bell {
	position: relative;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	font-size: 1rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.ksp-notif-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #e5484d;
	color: #fff;
	font-size: 0.62rem;
	font-weight: 800;
	min-width: 16px;
	height: 16px;
	border-radius: 999px;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 0 3px;
	box-sizing: border-box;
}
.ksp-notif-badge.show {
	display: flex;
}
.ksp-notif-panel {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 300px;
	max-width: 90vw;
	max-height: 70vh;
	overflow-y: auto;
	background: #0a0a0c;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	padding: 10px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	z-index: 3200;
}
.ksp-notif-wrap.is-open .ksp-notif-panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.ksp-notif-empty {
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.78rem;
	text-align: center;
	padding: 16px 8px;
}
.ksp-notif-section-title {
	color: #3D9BE9;
	font-size: 0.7rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin: 10px 2px 6px;
}
.ksp-notif-section-title:first-child {
	margin-top: 2px;
}
.ksp-notif-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px;
	border-radius: 8px;
}
.ksp-notif-item img {
	width: 30px;
	height: 30px;
	border-radius: 999px;
	object-fit: cover;
	flex-shrink: 0;
	background: #222;
}
.ksp-notif-item-name {
	flex: 1;
	min-width: 0;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ksp-notif-item-name small {
	display: block;
	color: rgba(255, 255, 255, 0.5);
	font-weight: 500;
	font-size: 0.65rem;
}
.ksp-notif-item-actions {
	display: flex;
	gap: 4px;
	flex-shrink: 0;
}
.ksp-notif-item-actions button {
	padding: 5px 8px;
	border-radius: 6px;
	border: none;
	font-size: 0.65rem;
	font-weight: 700;
	cursor: pointer;
}
.ksp-notif-btn-accept {
	background: #3D9BE9;
	color: #000;
}
.ksp-notif-btn-decline {
	background: rgba(229, 72, 77, 0.2);
	color: #e5484d;
}

/* Botão de amizade no perfil público */
.ksp-friend-btn {
	display: inline-flex;
	align-items: center;
	height: 38px;
	padding: 0 18px;
	border-radius: 100px;
	border: none;
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
	background: var(--wp--preset--color--accent-1, #3D9BE9);
	color: #fff;
}
.ksp-friend-btn[data-status="friends"] {
	background: rgba(127, 127, 127, 0.2);
	color: var(--ksp-text);
}
.ksp-friend-btn[data-status="pending_outgoing"] {
	background: rgba(127, 127, 127, 0.2);
	color: var(--ksp-text);
	cursor: default;
}
.ksp-friend-btn[data-status="pending_incoming"] {
	background: var(--wp--preset--color--accent-2, #0D69A3);
}
.ksp-friend-btn:disabled {
	opacity: 0.6;
	cursor: default;
}
