/* Admirra Match — light styles. Branding tokens arrive as CSS vars set inline
   on .am-directory / .am-profile (see class-assets). Kept intentionally minimal
   so the host theme dominates typography/layout. */

.am-directory,
.am-profile {
	--am-primary: #4d5dae;
	--am-accent: #ff834f;
	--am-chip-bg: #ffffff;
	--am-radius: 10px;
}

.am-notice,
.am-empty {
	padding: 1rem;
	border: 1px solid #e0e0e0;
	border-radius: var(--am-radius);
	background: #fafafa;
	color: #555;
}

/* Chips */
.am-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.am-chip {
	display: inline-flex; align-items: center;
	padding: .25rem .7rem;
	border: 1px solid #d0d0d0;
	border-radius: 999px;
	background: var(--am-chip-bg);
	font-size: .85rem; line-height: 1.4;
	color: inherit; text-decoration: none;
}
a.am-chip-link { cursor: pointer; }
a.am-chip-link:hover { border-color: var(--am-primary); }
.am-chip-selected { background: var(--am-primary); border-color: var(--am-primary); color: #fff; }
.am-chip-empty { opacity: .45; }

/* Filters */
.am-filters { display: flex; flex-direction: column; gap: 1.25rem; margin: 1.5rem 0; }
.am-filter-title, .am-section-title { font-size: 1.05rem; margin: 0 0 .5rem; }
.am-clear { font-size: .85rem; color: var(--am-primary); text-decoration: underline; }

.am-services { margin-bottom: 1.5rem; }
.am-count { color: #666; margin: 1rem 0; }

/* Grid */
.am-grid {
	display: grid; gap: 1.25rem;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* Card */
.am-card {
	display: flex; flex-direction: column;
	border: 1px solid #e6e6e6; border-radius: var(--am-radius);
	overflow: hidden; text-decoration: none; color: inherit;
	background: #fff; transition: box-shadow .15s ease;
}
.am-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.am-card-photo { position: relative; aspect-ratio: 4 / 3; background: #f0f0f0; }
.am-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.am-card-photo-placeholder { display: block; width: 100%; height: 100%; background: #eceff1; }
.am-badge {
	position: absolute; top: 10px; left: 10px;
	padding: .15rem .5rem; border-radius: 999px;
	font-size: .72rem; font-weight: 600; color: #fff; background: #2e7d32;
}
.am-card-body { padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.am-card-name { font-size: 1.1rem; margin: 0; }
.am-card-byline { margin: 0; color: #666; font-size: .9rem; }
.am-card-intro { margin: 0; color: #555; font-size: .9rem; }
.am-card-sessions { display: flex; gap: .75rem; color: #777; font-size: .8rem; }

/* List layout — full-width rows (parity with the hosted PractitionerListItem):
   small photo left, name+chip, license summary, byline, intro, spec chips,
   then a footer row of session icons + a "View more" CTA. */
.am-list { display: flex; flex-direction: column; gap: 1rem; }
.am-card-list {
	flex-direction: row; align-items: stretch; gap: 1.25rem;
	padding: 1.25rem;
}
.am-list-photo {
	position: relative; flex-shrink: 0;
	width: 140px; height: 140px;
	border-radius: 8px; overflow: hidden; background: #f0f0f0;
}
.am-list-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.am-list-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.am-list-headrow { display: flex; align-items: baseline; flex-wrap: wrap; gap: .6rem; }
.am-list-headrow .am-card-name { font-size: 1.2rem; }
.am-badge-inline { position: static; }
.am-list-licenses { margin: 0; color: #666; font-size: .85rem; }
.am-list-byline { margin: 0; font-weight: 600; font-size: .95rem; }
.am-list-footer {
	display: flex; align-items: center; justify-content: space-between;
	flex-wrap: wrap; gap: .75rem; margin-top: .5rem;
}
.am-list-cta {
	display: inline-block; padding: .4rem 1rem;
	background: var(--am-primary); color: #fff;
	border-radius: 8px; font-size: .85rem; line-height: 1;
}
@media (max-width: 560px) {
	.am-card-list { flex-direction: column; }
	.am-list-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; }
}

/* Grid/list view toggle — right-aligned, icon-only square buttons */
.am-view-toggle { display: flex; gap: .35rem; justify-content: flex-end; margin: 0 0 1rem; }
.am-view-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px;
	border: 1px solid #d0d0d0; border-radius: 8px;
	background: #fff; color: inherit; text-decoration: none; cursor: pointer;
}
.am-view-btn svg { fill: currentColor; display: block; }
.am-view-btn:hover { border-color: var(--am-primary); }
.am-view-btn-active { background: var(--am-primary); border-color: var(--am-primary); color: #fff; }

/* Pagination */
.am-pagination { display: flex; gap: .5rem; justify-content: center; margin: 2rem 0; flex-wrap: wrap; }
.am-page {
	min-width: 2rem; text-align: center; padding: .35rem .6rem;
	border: 1px solid #d0d0d0; border-radius: 6px; text-decoration: none; color: inherit;
}
.am-page-current { background: var(--am-primary); border-color: var(--am-primary); color: #fff; }

/* Profile */
.am-profile { max-width: 760px; margin: 0 auto; }
.am-profile-header { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; }
.am-profile-photo { width: 160px; height: 160px; border-radius: var(--am-radius); object-fit: cover; background: #f0f0f0; flex-shrink: 0; }
.am-profile-name { font-size: 1.8rem; margin: 0 0 .25rem; }
.am-profile-licenses { color: #666; margin: 0 0 .5rem; }
.am-profile-badges { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.am-section { margin-top: 1.75rem; }
.am-section p { white-space: pre-line; }
.am-cta-wrap { margin-top: 2rem; text-align: center; }
.am-cta {
	display: inline-block; padding: .75rem 1.5rem;
	background: var(--am-primary); color: #fff; border: none;
	border-radius: var(--am-radius); font-size: 1rem; cursor: pointer; text-decoration: none;
}

/* Drawer */
.am-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99998; }
.am-drawer {
	position: fixed; top: 0; right: 0; height: 100%; width: min(560px, 100%);
	background: #fff; z-index: 99999; overflow-y: auto; padding: 1.5rem;
	box-shadow: -4px 0 20px rgba(0,0,0,.15);
}
.am-drawer-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* Inline intake form iframe */
.am-form-frame { width: 100%; border: 0; display: block; min-height: 600px; }
.am-back { display: inline-flex; align-items: center; gap: .25rem; background: none; border: none; color: var(--am-primary); cursor: pointer; margin-bottom: 1rem; font-size: .95rem; }
