/* BuddySocial v11.21 — ONE clean Pimp engine. No profile/site colour cross-over. */

/* 1) Pimp control UI: neutral and isolated. It never inherits the viewed profile palette. */
body[data-page="pimp_profile"] .bs-pimp-clean-ui,
body[data-page="admin_pimp_profile"] .bs-pimp-clean-ui,
body[data-page="pimp_profile"] .pimp-page,
body[data-page="admin_pimp_profile"] .admin-pimp-page{
  --bs-ui-bg:#fff;--bs-ui-soft:#f6fbfd;--bs-ui-head:#e5f2f8;--bs-ui-border:#c4d8e3;
  --bs-ui-text:#2d4351;--bs-ui-muted:#647b88;--bs-ui-link:#286f98;--bs-ui-accent:#f39a16;
  color:var(--bs-ui-text)!important;font-family:Arial,Helvetica,sans-serif!important;
}
body[data-page="pimp_profile"] .pimp-page .retro-box,
body[data-page="pimp_profile"] .pimp-page .pimp-hero,
body[data-page="pimp_profile"] .pimp-page .pimp-reset-card,
body[data-page="pimp_profile"] .pimp-page .pimp-layout-column,
body[data-page="pimp_profile"] .pimp-page .pimp-layout-card,
body[data-page="pimp_profile"] .pimp-page .pimp-css-editor,
body[data-page="admin_pimp_profile"] .admin-pimp-page .retro-box{
  background:var(--bs-ui-bg)!important;color:var(--bs-ui-text)!important;border-color:var(--bs-ui-border)!important;text-shadow:none!important;
}
body[data-page="pimp_profile"] .pimp-page .retro-box-title,
body[data-page="pimp_profile"] .pimp-page .pimp-tab-group>span,
body[data-page="admin_pimp_profile"] .admin-pimp-page .retro-box-title{
  background:linear-gradient(#f4fbfe,var(--bs-ui-head))!important;color:var(--bs-ui-link)!important;border-color:var(--bs-ui-border)!important;text-shadow:0 1px #fff!important;
}
body[data-page="pimp_profile"] .pimp-page label,
body[data-page="pimp_profile"] .pimp-page p,
body[data-page="pimp_profile"] .pimp-page small,
body[data-page="admin_pimp_profile"] .admin-pimp-page label,
body[data-page="admin_pimp_profile"] .admin-pimp-page p,
body[data-page="admin_pimp_profile"] .admin-pimp-page small{color:var(--bs-ui-muted)!important}
body[data-page="pimp_profile"] .pimp-page input:not([type="color"]):not([type="range"]):not([type="checkbox"]):not([type="radio"]),
body[data-page="pimp_profile"] .pimp-page textarea,
body[data-page="pimp_profile"] .pimp-page select,
body[data-page="admin_pimp_profile"] .admin-pimp-page input:not([type="color"]):not([type="range"]):not([type="checkbox"]):not([type="radio"]),
body[data-page="admin_pimp_profile"] .admin-pimp-page textarea,
body[data-page="admin_pimp_profile"] .admin-pimp-page select{background:#fff!important;color:#243b49!important;border-color:#b9ced9!important}

/* 2) Real profile blocks: ONLY their own saved block palette wins. General site/theme colours cannot overwrite it. */
body[data-page="profile"] .pimp-controlled-block[data-pimp-block]{
  background-color:var(--bs-pimp-bg-alpha)!important;color:var(--bs-pimp-text)!important;border-color:var(--bs-pimp-border)!important;
}
body[data-page="profile"] .pimp-controlled-block[data-pimp-block] > .retro-box-title,
body[data-page="profile"] .pimp-controlled-block[data-pimp-block] > .profile-friends-title,
body[data-page="profile"] .pimp-managed-wrapper[data-pimp-block] > .retro-box > .retro-box-title,
body[data-page="profile"] .pimp-managed-wrapper[data-pimp-block] > .nostalgia-pet-box > .retro-box-title{
  background:var(--bs-pimp-bg-alpha)!important;color:var(--bs-pimp-text)!important;border-color:var(--bs-pimp-border)!important;text-shadow:none!important;
}
body[data-page="profile"] .pimp-controlled-block[data-pimp-block] > .retro-pad,
body[data-page="profile"] .pimp-controlled-block[data-pimp-block] > .retro-pad p,
body[data-page="profile"] .pimp-controlled-block[data-pimp-block] > .retro-pad small,
body[data-page="profile"] .pimp-controlled-block[data-pimp-block] > .retro-pad b,
body[data-page="profile"] .pimp-controlled-block[data-pimp-block] > .retro-pad strong{
  color:var(--bs-pimp-text)!important;
}
body[data-page="profile"] .pimp-controlled-block[data-pimp-block] a{color:var(--bs-pimp-text)!important}
body[data-page="profile"] .pimp-managed-wrapper[data-pimp-block] > .retro-box,
body[data-page="profile"] .pimp-managed-wrapper[data-pimp-block] > .nostalgia-pet-box{
  background-color:var(--bs-pimp-bg-alpha)!important;color:var(--bs-pimp-text)!important;border-color:var(--bs-pimp-border)!important;
}

/* 3) Structural retro widgets — intentionally NO fixed palette here. */
.buddy-retro-people{display:flex;flex-direction:column;gap:5px}
.buddy-retro-people>a{display:flex;align-items:center;gap:7px;padding:4px 2px;text-decoration:none;border-bottom:1px dotted currentColor}
.buddy-retro-people>a:last-child{border-bottom:0}.buddy-retro-people .tiny-avatar{flex:0 0 auto}.buddy-retro-people a>span:last-child{min-width:0}
.buddy-retro-people b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.buddy-retro-people small{display:flex;align-items:center;gap:4px;font-size:9px}
.buddy-hit-lines,.buddy-retro-stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px}.buddy-retro-stats-grid span.wide{grid-column:1/-1}
.buddy-friendbook-list{display:flex;flex-direction:column;gap:7px}.buddy-poke-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin-bottom:8px}

/* 4) Single exact layout engine. No legacy layout CSS is loaded anymore. */
.buddy-profile-layout-enabled .profile-columns,
.buddy-profile-layout-enabled .profile-left,.buddy-profile-layout-enabled .profile-main,.buddy-profile-layout-enabled .profile-right,
.buddy-profile-layout-enabled .pimp-controlled-block{min-width:0!important;box-sizing:border-box!important}
.pimp-managed-slot{display:contents}.pimp-managed-wrapper{display:contents}
.pimp-page .pimp-layout-columns{align-items:start!important;grid-auto-rows:max-content!important}
.pimp-page .pimp-layout-column{align-self:start!important;height:auto!important;min-height:0!important;max-height:none!important}
.pimp-page .pimp-layout-dropzone{display:flex!important;flex-direction:column!important;align-items:stretch!important;height:auto!important;min-height:132px!important;max-height:560px!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable}
.pimp-page .pimp-layout-card{flex:0 0 auto!important;width:100%!important;min-width:0!important;height:auto!important;box-sizing:border-box!important}
.pimp-page .pimp-layout-card span{min-width:0!important}.pimp-page .pimp-layout-card b,.pimp-page .pimp-layout-card small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pimp-layout-form.is-saving-layout .pimp-layout-actions::before{content:"Opslaan…";font-size:12px;font-weight:700;color:#6a7b88;margin-right:8px}
.pimp-layout-form.is-saved-layout .pimp-layout-actions::before{content:"✓ Opgeslagen";font-size:12px;font-weight:700;color:#2c8b57;margin-right:8px}

/* Pet sizing is structural only; it never sets colour. */
.buddy-profile-layout-enabled .nostalgia-pet-box,.buddy-profile-layout-enabled [data-pimp-block="pet"]{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;align-self:start!important;overflow:hidden!important;box-sizing:border-box!important}
.buddy-profile-layout-enabled .profile-left .nostalgia-pet,.buddy-profile-layout-enabled .profile-right .nostalgia-pet{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-auto-rows:max-content!important;gap:8px!important;padding:8px!important}
.buddy-profile-layout-enabled .profile-left .nostalgia-pet-box .pet-scene,.buddy-profile-layout-enabled .profile-right .nostalgia-pet-box .pet-scene{width:100%!important;height:124px!important;min-height:124px!important;max-height:124px!important;overflow:hidden!important;box-sizing:border-box!important}
.buddy-profile-layout-enabled .profile-main .nostalgia-pet{display:grid!important;grid-template-columns:minmax(145px,182px) minmax(0,1fr)!important;grid-auto-rows:max-content!important;gap:12px!important;align-items:start!important}
.buddy-profile-layout-enabled .profile-main .nostalgia-pet-box .pet-scene{height:148px!important;min-height:148px!important;max-height:148px!important;overflow:hidden!important}

@media(max-width:700px){.pimp-page .pimp-layout-dropzone{max-height:none!important;overflow:visible!important}.buddy-profile-layout-enabled .profile-main .nostalgia-pet{grid-template-columns:1fr!important}.buddy-profile-layout-enabled .profile-main .nostalgia-pet-box .pet-scene{height:132px!important;min-height:132px!important;max-height:132px!important}}
