/* ==================================================== */
/* Phonebook Module - 5 Pastel Brand Colors Integration */
/* ==================================================== */

.phonebook-wrapper {
	max-width: 980px;
	margin: 0 auto;
	padding: 10px 0 60px 0;
}

/* מחזוריות 5 צבעי הפסטל המותגיים לכרטיסיות המחלקות */
.phonebook:nth-of-type(5n + 1) {
	--pb-accent: #f69368;
	--pb-dark: #b84f22;
	--pb-bg-soft: #fef4f0;
}

.phonebook:nth-of-type(5n + 2) {
	--pb-accent: #38cde5;
	--pb-dark: #07546d;
	--pb-bg-soft: #f0fafc;
}

.phonebook:nth-of-type(5n + 3) {
	--pb-accent: #c1dd8f;
	--pb-dark: #3d5c07;
	--pb-bg-soft: #f6fbe9;
}

.phonebook:nth-of-type(5n + 4) {
	--pb-accent: #f5cf6e;
	--pb-dark: #785a00;
	--pb-bg-soft: #fffbf0;
}

.phonebook:nth-of-type(5n + 5) {
	--pb-accent: #da8ae2;
	--pb-dark: #631d6c;
	--pb-bg-soft: #fbf3fc;
}

/* שדה חיפוש נקי ומודרני */
.phoneboook-search-holder {
	margin-bottom: 24px;
	position: relative;
}

.phoneboook-search-holder .inner {
	position: relative;
	display: flex;
	align-items: center;
}

.phoneboook-search-holder input {
	width: 100%;
	height: 48px;
	padding: 0 48px 0 16px;
	background: #ffffff;
	border: 1.5px solid #cbd5e1;
	border-radius: 12px;
	font-size: 0.95rem;
	color: #0f172a;
	outline: none;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
	transition: all 0.25s ease;
	box-sizing: border-box;
}

.phoneboook-search-holder input:focus {
	border-color: #38cde5;
	box-shadow: 0 0 0 3px rgba(56, 205, 229, 0.15);
	background: #ffffff;
}

.phoneboook-search-holder button {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	color: #0b59a2;
	font-size: 1.1rem;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
}

/* כרטיסיית מחלקה */
.phonebook {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-right: 4px solid var(--pb-accent);
	border-radius: 12px;
	margin-bottom: 12px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
	transition: all 0.25s ease;
}

.phonebook:hover {
	border-color: #cbd5e1;
	border-right-color: var(--pb-accent);
}

.phonebook.active {
	border-color: #cbd5e1;
	border-right-color: var(--pb-accent);
	box-shadow: 0 6px 20px -4px rgba(15, 23, 42, 0.06);
}

.phonebook-header {
	margin: 0;
	padding: 0;
}

.phonebook-section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	color: #0f172a;
	font-size: 1.02rem;
	font-weight: 700;
	text-decoration: none !important;
	background: #ffffff;
	transition: all 0.2s ease;
}

.phonebook:hover .phonebook-section-title {
	color: var(--pb-dark);
}

.phonebook.active .phonebook-section-title {
	background: var(--pb-bg-soft);
	color: var(--pb-dark);
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.phonebook-section-title .toggle-icon {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #64748b;
	font-size: 0.75rem;
	transition: all 0.25s ease;
}

.phonebook.active .phonebook-section-title .toggle-icon {
	transform: rotate(180deg);
	background: var(--pb-accent);
	border-color: var(--pb-accent);
	color: #ffffff;
}

.phonebook .info {
	display: none;
	padding: 14px 18px 18px 18px;
	background: #ffffff;
}

.cat-content {
	font-size: 0.9rem;
	color: #475569;
	margin-bottom: 12px;
}

.cat-fax {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	color: #475569;
	background: var(--pb-bg-soft);
	padding: 4px 12px;
	border-radius: 20px;
	margin-bottom: 12px;
	border: 1px solid rgba(0, 0, 0, 0.04);
}

.cat-fax a {
	color: var(--pb-dark);
	font-weight: 700;
	text-decoration: none;
}

/* רשימת חברי צוות */
.members-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.member {
	background: #ffffff;
	border: 1px solid #f1f5f9;
	border-radius: 10px;
	padding: 10px 14px;
	transition: all 0.2s ease;
}

.member:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
}

.member-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.member-profile {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex-grow: 1;
}

.member-profile .pic {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	border: 1px solid #e2e8f0;
}

.member-profile .pic img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.member-profile .pic-placeholder {
	background: var(--pb-bg-soft);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--pb-dark);
	font-size: 0.95rem;
}

.member-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.member-name-group {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.member-name {
	font-size: 0.95rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0;
}

.member-job {
	font-size: 0.83rem;
	color: #0b59a2;
	font-weight: 500;
}

.member-sub-info {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.78rem;
	color: #64748b;
}

/* כפתורי יצירת קשר */
.contact-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.contact-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 11px;
	border-radius: 8px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	color: #334155;
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.contact-btn i {
	font-size: 0.8rem;
	color: #64748b;
}

.contact-btn:hover {
	background: #ffffff;
	border-color: #0b59a2;
	color: #0b59a2;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.contact-btn.phone:hover i { color: #22c55e; }
.contact-btn.mobile:hover i { color: #0ea5e9; }
.contact-btn.email:hover i { color: #da8ae2; }
.contact-btn.fax:hover i { color: #f97316; }

.contact-btn .extension {
	font-size: 0.75rem;
	color: #64748b;
}

.sub-category {
	margin-top: 10px;
	padding-right: 12px;
	border-right: 2px solid #e2e8f0;
}

.search-found {
	background: rgba(245, 207, 110, 0.4);
	color: #0f172a;
	padding: 0 3px;
	border-radius: 3px;
	font-weight: 700;
}

.currentSearchResult {
	background: #f5cf6e;
}

@media (max-width: 768px) {
	.member-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.contact-actions {
		width: 100%;
		flex-wrap: wrap;
	}

	.contact-btn {
		flex-grow: 1;
		justify-content: center;
	}
}

.phoneboook-search-holder input::placeholder {
	color: #64748b; 
	opacity: 1; 
}

.phoneboook-search-holder input:focus::placeholder {
	color: #94a3b8;
}