/* NB Contact Gate modal */

.nb-contact-gate-modal[hidden] {
	display: none !important;
}

.nb-contact-gate-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.nb-contact-gate-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.62);
	backdrop-filter: blur(2px);
}

.nb-contact-gate-modal__dialog {
	position: relative;
	width: min(100%, 460px);
	max-height: min(88vh, 680px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 28px 80px rgba(17, 75, 95, 0.28);
	direction: rtl;
	text-align: right;
	animation: nb-contact-gate-in 0.22s ease;
}

@keyframes nb-contact-gate-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.nb-contact-gate-modal__header {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 18px 18px 14px;
	background: linear-gradient(135deg, rgba(29, 186, 181, 0.12), rgba(17, 75, 95, 0.06));
	border-bottom: 1px solid #eef2f6;
}

.nb-contact-gate-modal__header-icon {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #1dbab5;
	color: #fff;
}

.nb-contact-gate-modal__header-text {
	flex: 1;
	min-width: 0;
}

.nb-contact-gate-modal__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 800;
	color: #181616;
}

.nb-contact-gate-modal__subtitle {
	margin: 4px 0 0;
	font-size: 0.8125rem;
	line-height: 1.6;
	color: #667085;
}

.nb-contact-gate-modal__close {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid #d0d5dd;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	color: #344054;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nb-contact-gate-modal__close span {
	display: block;
	width: 100%;
	height: 100%;
	font-size: 1.35rem;
	line-height: 34px;
	text-align: center;
	margin: 0;
	padding: 0;
}

.nb-contact-gate-modal__close:hover {
	background: #f9fafb;
	color: #114b5f;
	border-color: #98a2b3;
}

.nb-contact-gate-modal__body {
	overflow: auto;
	overflow-x: hidden;
	padding: 16px 18px 18px;
	box-sizing: border-box;
}

.nb-contact-gate-modal__body *,
.nb-contact-gate-modal__footer * {
	box-sizing: border-box;
}

.nb-contact-gate-modal__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 28px 0;
	color: #667085;
	font-size: 0.875rem;
}

.nb-contact-gate-modal__spinner {
	width: 18px;
	height: 18px;
	border: 2px solid #dbeafe;
	border-top-color: #1dbab5;
	border-radius: 50%;
	animation: nb-contact-gate-spin 0.7s linear infinite;
}

@keyframes nb-contact-gate-spin {
	to {
		transform: rotate(360deg);
	}
}

.nb-contact-gate-empty,
.nb-contact-gate-error {
	margin: 0;
	padding: 14px;
	border-radius: 12px;
	background: #f8fafc;
	color: #667085;
	font-size: 0.875rem;
	text-align: center;
}

.nb-contact-gate-error {
	background: #fef2f2;
	color: #b42318;
}

.nb-contact-gate-profile {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	margin-bottom: 14px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px solid #eef2f6;
}

.nb-contact-gate-profile__avatar {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid #e5e7eb;
	color: #1dbab5;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.nb-contact-gate-profile__info {
	min-width: 0;
}

.nb-contact-gate-name {
	margin: 0;
	font-size: 1rem;
	font-weight: 800;
	color: #111827;
}

.nb-contact-gate-subtitle {
	margin: 3px 0 0;
	font-size: 0.8125rem;
	color: #667085;
}

.nb-contact-gate-office-block {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed #e5e7eb;
}

.nb-contact-gate-office-block:first-of-type {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.nb-contact-gate-office-name {
	margin: 0 0 10px;
	font-size: 0.875rem;
	font-weight: 700;
	color: #114b5f;
}

.nb-contact-gate-card {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px;
	margin-bottom: 10px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid #eef2f6;
	box-shadow: 0 4px 14px rgba(17, 75, 95, 0.05);
}

.nb-contact-gate-card__icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: rgba(29, 186, 181, 0.12);
	color: #1dbab5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nb-contact-gate-card__content {
	flex: 1;
	min-width: 0;
}

.nb-contact-gate-card__label {
	display: block;
	font-size: 0.75rem;
	color: #98a2b3;
	margin-bottom: 4px;
}

.nb-contact-gate-card__value {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.nb-contact-gate-link {
	font-size: 0.9375rem;
	font-weight: 700;
	color: #114b5f;
	text-decoration: none;
	word-break: break-word;
	direction: ltr;
	text-align: left;
}

a.nb-contact-gate-link:hover {
	color: #1dbab5;
}

.nb-contact-gate-text {
	font-size: 0.875rem;
	line-height: 1.7;
	color: #344054;
	word-break: break-word;
}

.nb-contact-gate-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 64px;
	padding: 6px 12px;
	border-radius: 999px;
	background: #1dbab5;
	color: #fff !important;
	font-size: 0.75rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.nb-contact-gate-action:hover {
	background: #159f9b;
	color: #fff;
}

.nb-contact-gate-map {
	display: inline-flex;
	align-items: center;
	margin: 2px 0 8px;
	font-size: 0.8125rem;
	font-weight: 700;
	color: #1dbab5;
	text-decoration: none;
}

.nb-contact-gate-map:hover {
	color: #114b5f;
}

.nb-contact-gate-profile-link {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 14px 0 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 12px;
	background: #114b5f;
	color: #fff !important;
	font-size: 0.875rem;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	line-height: 1.4;
	transition: background 0.15s ease;
}

.nb-contact-gate-modal__footer {
	flex-shrink: 0;
	padding: 0 18px 18px;
	border-top: 1px solid #eef2f6;
	background: #fff;
}

.nb-contact-gate-modal__footer .nb-contact-gate-profile-link {
	margin-top: 14px;
}

.nb-contact-gate-profile-link:hover {
	background: #0f3e4f;
	color: #fff;
}

body.nb-contact-gate-open {
	overflow: hidden;
}

/* Hide any leftover office block on single specialist pages */
.single-specialist .specialist_offices,
.single-specialist .specialist_office-phone,
.single-specialist .specialist_office-address-wrap {
	display: none !important;
}

/* Admin timeline */
.nb-user-activity-timeline {
	max-width: 860px;
}

.nb-user-activity-timeline__list {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	border-right: 2px solid #e5e7eb;
}

.nb-user-activity-timeline__item {
	position: relative;
	margin: 0 0 14px;
	padding: 0 18px 0 0;
}

.nb-user-activity-timeline__item::before {
	content: "";
	position: absolute;
	right: -6px;
	top: 6px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #1dbab5;
}

.nb-user-activity-timeline__time {
	display: block;
	font-size: 12px;
	color: #667085;
	margin-bottom: 2px;
}

.nb-user-activity-timeline__text {
	font-size: 14px;
	font-weight: 600;
	color: #111827;
}

.nb-user-activity-timeline__url {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: #667085;
	word-break: break-all;
}

.nb-user-activity-timeline__actions {
	margin-top: 20px;
	text-align: center;
}

.nb-user-activity-timeline__actions .button {
	min-width: 220px;
}

/* Admin contact stats */
.nb-contact-stats {
	max-width: 1100px;
}

.nb-contact-stats__filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
	margin: 18px 0 20px;
	padding: 16px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
}

.nb-contact-stats__filters label {
	display: block;
	margin-bottom: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #50575e;
}

.nb-contact-stats__filters select,
.nb-contact-stats__filters input[type="date"] {
	min-width: 180px;
}

.nb-contact-stats__custom-range {
	display: none;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
}

.nb-contact-stats__custom-range.is-visible {
	display: flex;
}

.nb-contact-stats__cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 18px;
}

.nb-contact-stats__card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 10px;
	padding: 16px 18px;
}

.nb-contact-stats__card-label {
	display: block;
	font-size: 12px;
	color: #646970;
	margin-bottom: 6px;
}

.nb-contact-stats__card-value {
	font-size: 1.6rem;
	line-height: 1.2;
	color: #114b5f;
}

.nb-contact-stats__table .column-rank {
	width: 72px;
}

.nb-contact-stats__table .column-count {
	width: 130px;
}

.nb-contact-stats__table .column-actions {
	width: 180px;
}

.nb-contact-stats__rank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	border-radius: 999px;
	background: rgba(29, 186, 181, 0.14);
	color: #114b5f;
	font-weight: 700;
}

.nb-contact-stats__badge {
	display: inline-flex;
	min-width: 36px;
	justify-content: center;
	padding: 4px 10px;
	border-radius: 999px;
	background: #114b5f;
	color: #fff;
	font-weight: 700;
}

.nb-contact-stats__meta {
	margin-top: 4px;
	font-size: 12px;
	color: #646970;
}

@media (max-width: 782px) {
	.nb-contact-stats__cards {
		grid-template-columns: 1fr;
	}

	.nb-contact-stats__filters select,
	.nb-contact-stats__filters input[type="date"] {
		min-width: 100%;
	}
}
