/* Module-local profile composition; the theme owns the enclosing site width/tokens. */
.re-business-profile { width: 100%; min-width: 0; margin-inline: auto; padding-block: 1rem 2rem; overflow-wrap: anywhere; }
.re-business-profile *, .re-business-profile *::before, .re-business-profile *::after { box-sizing: border-box; }
.re-business-profile .re-profile-breadcrumbs { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 1.25rem; color: var(--re-muted); font-size: .875rem; }
.re-business-profile .re-profile { overflow: hidden; box-shadow: var(--re-shadow); }
.re-business-profile .re-profile__cover { height: 12rem; background: linear-gradient(125deg, var(--re-surface-muted), var(--re-surface) 60%, var(--re-border)); position: relative; }
.re-business-profile .re-profile__cover::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 5rem, color-mix(in srgb, var(--re-surface) 40%, transparent) 5rem 5.1rem), repeating-linear-gradient(0deg, transparent 0 3rem, color-mix(in srgb, var(--re-surface) 30%, transparent) 3rem 3.1rem); pointer-events: none; }
.re-business-profile .re-profile__identity { margin-top: -3.5rem; padding: 0 1.25rem 1.5rem; gap: .65rem; }
.re-business-profile .re-profile__identity > .re-avatar { width: 7rem; height: 7rem; border: 5px solid var(--re-surface); border-radius: var(--re-radius); background: var(--re-surface-muted); box-shadow: var(--re-shadow); }
.re-business-profile .re-profile__identity > .re-avatar img { object-fit: contain; background: var(--re-surface); }
.re-business-profile[data-agent-profile] .re-profile__identity > .re-avatar img { object-fit: cover; }
.re-business-profile .re-profile__name { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -.025em; }
.re-business-profile .re-profile__actions { padding: 1rem 1.25rem; border-top: 1px solid var(--re-border); background: var(--re-surface-muted); justify-content: flex-start; gap: .75rem; }
.re-business-profile .re-profile__actions > .re-btn { min-height: 2.75rem; white-space: normal; }
.re-business-profile .re-section { margin-block: 1.5rem; }
.re-business-profile .re-stats { gap: .75rem; }
.re-business-profile .re-stat { display: flex; flex-direction: column-reverse; gap: .35rem; padding: 1.25rem; background: var(--re-surface-muted); border-color: transparent; }
.re-business-profile .re-stat__value { font-size: 2rem; color: var(--re-text); }
.re-business-profile .re-stat__label { font-size: .875rem; }
.re-business-profile article.re-ui > .re-section:not(:has(.re-stats)), .re-business-profile > .re-section, .re-business-profile .re-tabpanel { padding: 1.25rem; border: 1px solid var(--re-border); border-radius: var(--re-radius); background: var(--re-surface); }
.re-business-profile .re-profile-grid, .re-business-profile .re-profile-listings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.re-business-profile .re-profile-grid > *, .re-business-profile .re-profile-listings > * { min-width: 0; }
.re-business-profile .re-agent-card { padding: 1.25rem; display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; }
.re-business-profile .re-agent-card .re-section__heading, .re-business-profile .re-agent-card p { margin: 0; }
.re-business-profile .re-agent-card .re-card__specs { flex-wrap: wrap; margin-top: auto; padding-top: .5rem; }
.re-business-profile .re-agent-card .re-btn { font-size: .875rem; padding: .5rem .75rem; }
.re-business-profile .re-tabs { flex-wrap: wrap; }
.re-business-profile #contact-agency, .re-business-profile #contact-agent { margin-block: 1.5rem; padding: 1.5rem; scroll-margin-top: 2rem; }
.re-business-profile input, .re-business-profile textarea, .re-business-profile select { max-width: 100%; min-width: 0; }
.re-business-profile .re-profile-listings .re-property-card { height: 100%; }
@media (min-width: 640px) {
    .re-business-profile .re-profile-grid, .re-business-profile .re-profile-listings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .re-business-profile .re-profile__cover { height: 11rem; }
    .re-business-profile .re-profile__identity { display: grid; grid-template-columns: 8rem minmax(0, 1fr); align-items: start; padding: 1.5rem 2rem; margin-top: 0; gap: .5rem 1.5rem; }
    .re-business-profile .re-profile__identity > .re-avatar { grid-column: 1; grid-row: 1 / span 6; margin-top: -4rem; width: 8rem; height: 8rem; }
    .re-business-profile .re-profile__identity > :not(.re-avatar) { grid-column: 2; justify-self: start; }
    .re-business-profile .re-profile__actions { padding-inline: 2rem; }
    .re-business-profile .re-profile-grid, .re-business-profile .re-profile-listings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Embedded search owns its layout; retain the other profile panels. */
.re-business-profile #agency-listings-panel { padding: 0; border: 0; }

/* RE-511: profile proportions within the theme's 1200px content area. */
.re-business-profile .re-profile-columns { display:grid; grid-template-columns:minmax(0,1fr); gap:24px; }
.re-business-profile .re-profile-main, .re-business-profile .re-profile-sidebar { min-width:0; }
.re-business-profile .re-profile-sidebar .re-section { padding:20px; border:1px solid var(--re-border); border-radius:12px; background:var(--re-surface-muted); }
.re-business-profile .re-profile-sidebar .re-profile-grid { grid-template-columns:minmax(0,1fr); }
.re-business-profile .re-profile-sidebar .re-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.re-business-profile .re-profile-sidebar .re-stat { padding:8px; }
.re-business-profile .re-profile-sidebar .re-stat__value { font-size:24px; }
.re-profile-clamp { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.re-business-profile .re-profile__actions .re-btn, .re-business-profile .re-agent-card .re-btn, .re-business-profile [data-card-contacts] .re-btn { background:color-mix(in srgb,var(--re-text) 7%,var(--re-surface)); color:var(--re-text); border:0; min-height:44px; display:inline-flex; align-items:center; gap:6px; }
.re-business-profile .re-profile__actions .re-btn:hover, .re-business-profile .re-agent-card .re-btn:hover, .re-business-profile [data-card-contacts] .re-btn:hover { background:color-mix(in srgb,var(--re-text) 14%,var(--re-surface)); }
.re-business-profile .re-profile__compact-name { font-weight:700; margin-right:auto; }
.re-business-profile .re-profile__actions { display:flex; flex-wrap:wrap; }
.re-business-profile .re-agency-agent-rows { display:grid; gap:21px; }
.re-business-profile .re-agent-card { border:0; padding:0; display:grid; grid-template-columns:88px minmax(0,1fr); gap:16px; overflow:hidden; }
.re-business-profile .re-agent-card > .re-avatar { width:88px; height:88px; border-radius:8px; }
.re-business-profile .re-agent-card > .re-avatar img { width:100%; height:100%; object-fit:cover; }
.re-business-profile .re-agent-card__body { padding:12px 12px 12px 0; min-width:0; display:grid; gap:4px; font-size:14px; }
.re-business-profile .re-agent-card .re-section__heading { font-size:18px; line-height:1.25; }
.re-business-profile .re-agent-card .re-card__specs { display:flex; gap:8px; }
.re-business-profile .re-agent-card .re-card__specs .re-btn { padding:8px; }
.re-business-profile[data-agent-profile] .re-profile { border:0; box-shadow:none; overflow:visible; }
.re-business-profile[data-agent-profile] .re-profile__cover { height:96px; border-radius:8px; overflow:hidden; }
.re-business-profile[data-agent-profile] .re-profile__identity { margin-top:-35px; position:relative; }
.re-business-profile[data-agent-profile] .re-profile__identity > .re-avatar { border-radius:50%; width:120px; height:120px; margin:0; }
.re-business-profile[data-agent-profile] .re-profile__name { font-size:28px; }
.re-business-profile[data-agent-profile] .re-profile-about { padding:20px; border-radius:12px; background:var(--re-surface-muted); }
.re-business-profile .re-agent-agency img { object-fit:contain; margin-bottom:16px; }
.re-agency-profile .re-profile { position:relative; border:0; overflow:visible; box-shadow:none; background:var(--re-surface-muted); }
.re-agency-profile .re-profile__cover { position:absolute; inset:0; height:100%; overflow:hidden; opacity:.15; }
.re-agency-profile .re-profile__identity { position:relative; margin:0; padding:24px 16px; }
.re-agency-profile .re-profile__identity > .re-avatar { width:120px; height:120px; margin:0; border-radius:8px; background:var(--re-surface); }
.re-agency-profile .re-tabs { margin:0; min-height:56px; padding-block:5px; }
.re-business-profile .re-tab { min-height:44px; display:inline-flex; align-items:center; }
.re-business-profile .re-tab[aria-selected="true"] { border-bottom:3px solid currentColor; }
.re-business-profile .re-profile-main > .re-section { padding:0; }
@media (min-width:768px) {
 .re-business-profile .re-profile__actions--sticky { position:fixed; top:0; left:0; right:0; z-index:40; min-height:56px; padding:6px max(16px,calc((100% - 1200px)/2)); box-shadow:var(--re-shadow); }
 .re-business-profile .re-agent-card { grid-template-columns:193px minmax(0,1fr); min-height:193px; }
 .re-business-profile .re-agent-card > .re-avatar { width:193px; height:193px; border-radius:0; }
 .re-business-profile .re-agent-card__body { padding:12px 16px 12px 0; }
}
@media (min-width:1024px) {
 .re-business-profile .re-profile-columns { grid-template-columns:minmax(0,850fr) minmax(0,305fr); gap:45px; }
 .re-business-profile[data-agent-profile] .re-profile-columns { grid-template-columns:minmax(0,812fr) minmax(0,343fr); }
 .re-agency-profile .re-profile { box-shadow:0 0 0 100vmax var(--re-surface-muted); clip-path:inset(0 -100vmax); }
 .re-agency-profile .re-profile__identity { min-height:260px; padding:30px 0; display:grid; grid-template-columns:200px minmax(0,1fr); gap:0 24px; align-content:center; }
 .re-agency-profile .re-profile__identity > .re-avatar { width:200px; height:200px; grid-row:1 / span 9; }
 .re-business-profile[data-agent-profile] .re-profile__identity { min-height:200px; padding:0 16px; grid-template-columns:200px minmax(0,1fr); margin-top:-35px; gap:8px 24px; align-content:start; }
 .re-business-profile[data-agent-profile] .re-profile__identity > .re-avatar { width:200px; height:200px; grid-row:1 / span 6; }
 .re-business-profile[data-agent-profile] .re-profile__name { margin-top:48px; }
 .re-business-profile[data-agent-profile] .re-profile__actions { justify-content:flex-end; background:var(--re-surface); border:0; }
}
.re-agency-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; min-height:56px; margin-bottom:24px; }
.re-agency-toolbar > .re-profile__actions { padding:6px 0; border:0; background:var(--re-surface); gap:8px; }
.re-profile__compact-name { display:flex; align-items:center; gap:8px; }
.re-profile__compact-name img { width:32px; height:32px; object-fit:contain; }
.re-agency-profile #agency-agents-panel { padding:0; border:0; }
@media (min-width:1024px) {
 .re-business-profile[data-agent-profile] .re-profile { display:grid; grid-template-columns:minmax(0,1fr) auto; }
 .re-business-profile[data-agent-profile] .re-profile__cover { grid-column:1 / -1; }
 .re-business-profile[data-agent-profile] .re-profile__identity { grid-column:1; }
 .re-business-profile[data-agent-profile] .re-profile__actions { grid-column:2; grid-row:2; align-self:center; max-width:640px; padding:12px 0; }
}
