/* ==========================================================
   BuddySocial v10.07
   SITEWIDE COLOR HARMONY
   EXCLUDES:
   - user profile rendering
   - Pimp mijn profiel
   - Super Admin Pimp studio
   - chat UI
   ========================================================== */

:root{
  --bs-page-bg:#eaf4fa;
  --bs-surface:#ffffff;
  --bs-surface-soft:#f7fbfd;
  --bs-surface-blue:#eef7fc;

  --bs-blue-50:#f4f9fc;
  --bs-blue-100:#e4f1f9;
  --bs-blue-200:#c7deed;
  --bs-blue-300:#9fc4dc;
  --bs-blue-400:#72a7cc;
  --bs-blue-500:#4d8fc0;
  --bs-blue-600:#2f6fa8;
  --bs-blue-700:#245983;
  --bs-blue-800:#1e496d;

  --bs-orange-100:#fff3dc;
  --bs-orange-200:#f6d7a0;
  --bs-orange-400:#f4ad37;
  --bs-orange-500:#eb9817;
  --bs-orange-600:#c97b08;

  --bs-text:#2d4356;
  --bs-text-strong:#214e70;
  --bs-text-soft:#5e7485;
  --bs-link:#255f91;
  --bs-link-hover:#174970;

  --bs-line:#bfd1dd;
  --bs-line-soft:#d6e2e9;
  --bs-success:#467a41;
  --bs-danger:#9b3f3f;
  --bs-warning:#7b5b19;

  --bs-shadow:0 2px 8px rgba(36,79,112,.08);
}

/* ----------------------------------------------------------
   ONLY FIXED / NON-PIMP PAGES
   ---------------------------------------------------------- */
body:not([data-page="profile"])
    :not(#friend-chat)
    :not(#friend-chat *),
body:not([data-page="pimp_profile"])
    :not(#friend-chat)
    :not(#friend-chat *),
body:not([data-page="admin_pimp_profile"])
    :not(#friend-chat)
    :not(#friend-chat *){
  text-rendering:optimizeLegibility;
}

/* Core body color on non-pimp pages */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"]){
  color:var(--bs-text);
}

/* Main content text */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  main,
  .retro-content,
  .classic-subpage,
  .classic-page-shell,
  .page-shell,
  .admin-console,
  .settings-page,
  .notifications-page,
  .messages-layout,
  .message-center-layout
){
  color:var(--bs-text);
}

/* ----------------------------------------------------------
   STANDARD BOXES
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .retro-box,
  .classic-home-box,
  .classic-card,
  .classic-subpage,
  .classic-page-tools,
  .classic-subpage-head,
  .friend-card,
  .member-card,
  .photo-card,
  .video-card,
  .album-card,
  .poll-card,
  .event-card,
  .gift-card,
  .game-card,
  .notification-card,
  .message-card,
  .settings-card,
  .admin-card
):not(.friend-chat):not(.friend-chat-window){
  background-color:var(--bs-surface) !important;
  border-color:var(--bs-line) !important;
  color:var(--bs-text) !important;
  box-shadow:var(--bs-shadow);
}

/* Secondary inner surfaces */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .retro-pad,
  .card-body,
  .settings-row,
  .admin-row,
  .form-row,
  .mini-card,
  .feed-item,
  .post-card,
  .scrap,
  .comment,
  .reply,
  .notification-item
):not(.friend-chat *){
  color:var(--bs-text);
}

/* ----------------------------------------------------------
   TITLES / SECTION HEADERS
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .retro-box-title,
  .classic-home-title,
  .classic-page-title,
  .classic-subpage-title,
  .card-title,
  .section-title,
  .panel-title
):not(.friend-chat *){
  background:linear-gradient(180deg,var(--bs-blue-100),var(--bs-blue-200)) !important;
  color:var(--bs-text-strong) !important;
  border-color:var(--bs-blue-300) !important;
  text-shadow:none !important;
}

/* Warm / highlighted titles */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .home-news-box,
  .announcement-box,
  .birthday-box,
  .requests-box,
  .highlight-box,
  .warning-box
) :is(
  .retro-box-title,
  .classic-home-title,
  .card-title
){
  background:linear-gradient(180deg,var(--bs-orange-100),var(--bs-orange-200)) !important;
  color:#765100 !important;
  border-color:#dfbd73 !important;
}

/* ----------------------------------------------------------
   TEXT
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  h1,h2,h3,h4,h5,h6,
  strong,b
):not(.friend-chat *){
  color:var(--bs-text-strong);
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  p,
  li,
  td,
  th,
  label,
  legend,
  .body-text,
  .content-text
):not(.friend-chat *){
  color:var(--bs-text);
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  small,
  .muted,
  .meta,
  .subtext,
  .hint,
  .description,
  .help-text,
  .form-hint,
  .feed-meta,
  .post-meta
):not(.friend-chat *){
  color:var(--bs-text-soft) !important;
  opacity:1 !important;
}

/* Links */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
main a:not(.blue-btn):not(.orange-btn):not(.primary-btn):not(.accent-btn):not(.friend-chat *){
  color:var(--bs-link);
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
main a:not(.blue-btn):not(.orange-btn):not(.primary-btn):not(.accent-btn):not(.friend-chat *):hover{
  color:var(--bs-link-hover);
}

/* ----------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .blue-btn,
  .primary-btn,
  button.primary,
  input[type="submit"].primary
):not(.friend-chat *){
  background:linear-gradient(180deg,var(--bs-blue-500),var(--bs-blue-600)) !important;
  border-color:var(--bs-blue-700) !important;
  color:#fff !important;
  text-shadow:0 1px rgba(0,0,0,.16) !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .blue-btn,
  .primary-btn,
  button.primary,
  input[type="submit"].primary
):not(.friend-chat *):hover{
  background:linear-gradient(180deg,var(--bs-blue-600),var(--bs-blue-700)) !important;
  color:#fff !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .orange-btn,
  .accent-btn
):not(.friend-chat *){
  background:linear-gradient(180deg,var(--bs-orange-400),var(--bs-orange-500)) !important;
  border-color:var(--bs-orange-600) !important;
  color:#fff !important;
  text-shadow:0 1px rgba(0,0,0,.15) !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .secondary-btn,
  .gray-btn,
  .light-btn,
  button:not(.primary):not(.blue-btn):not(.orange-btn):not(.accent-btn)
):not(.friend-chat *){
  color:#31556e;
}

/* Danger actions */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .danger-btn,
  .delete-btn,
  .remove-btn
):not(.friend-chat *){
  color:#fff !important;
  background:#a94a4a !important;
  border-color:#853636 !important;
}

/* ----------------------------------------------------------
   FORMS
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="number"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  textarea,
  select
):not(.friend-chat *){
  background:#fff !important;
  color:#263b4e !important;
  border-color:#b9cddb !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  input,
  textarea
):not(.friend-chat *)::placeholder{
  color:#758896 !important;
  opacity:1 !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="number"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  textarea,
  select
):not(.friend-chat *):focus{
  border-color:var(--bs-blue-400) !important;
  box-shadow:0 0 0 2px rgba(77,143,192,.12) !important;
}

/* ----------------------------------------------------------
   FEEDS / POSTS / COMMENTS
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .home-post,
  .feed-post,
  .classic-feed-item,
  .post-card,
  .scrap,
  .comment,
  .reply,
  .message-item,
  .notification-item
):not(.friend-chat *){
  background-color:var(--bs-surface) !important;
  border-color:var(--bs-line-soft) !important;
  color:var(--bs-text) !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .post-author,
  .feed-author,
  .message-author,
  .comment-author
):not(.friend-chat *){
  color:var(--bs-text-strong) !important;
}

/* ----------------------------------------------------------
   FRIENDS / MEMBERS
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .friend-card,
  .member-card,
  .mini-person,
  .home-friend-card,
  .friend-row
):not(.friend-chat *){
  color:var(--bs-text) !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .friend-card,
  .member-card,
  .mini-person,
  .home-friend-card,
  .friend-row
) :is(b,strong,a):not(.friend-chat *){
  color:var(--bs-link) !important;
}

/* ----------------------------------------------------------
   PHOTOS / VIDEO / MEDIA
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .photo-card,
  .video-card,
  .album-card,
  .media-card,
  .hyves-media-box
):not(.friend-chat *){
  color:var(--bs-text) !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .photo-card,
  .video-card,
  .album-card,
  .media-card
) :is(small,.meta,.caption):not(.friend-chat *){
  color:var(--bs-text-soft) !important;
}

/* ----------------------------------------------------------
   MESSAGES / NOTIFICATIONS
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .message-list,
  .messages-sidebar,
  .notification-list,
  .inbox-sidebar
):not(.friend-chat *){
  background:var(--bs-surface-soft) !important;
  border-color:var(--bs-line) !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .message-item.unread,
  .notification-item.unread
):not(.friend-chat *){
  background:var(--bs-blue-50) !important;
  border-color:var(--bs-blue-200) !important;
}

/* ----------------------------------------------------------
   BLOGS / POLLS / EVENTS / GUESTBOOK / GAMES
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .blog-card,
  .poll-card,
  .event-card,
  .guestbook-entry,
  .questionnaire-card,
  .game-card
):not(.friend-chat *){
  background:#fff !important;
  color:var(--bs-text) !important;
  border-color:var(--bs-line) !important;
}

/* ----------------------------------------------------------
   SETTINGS / ADMIN
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .settings-section,
  .settings-card,
  .admin-section,
  .admin-card,
  .admin-panel,
  .superadmin-panel
):not(.friend-chat *){
  background:var(--bs-surface) !important;
  border-color:var(--bs-line) !important;
  color:var(--bs-text) !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .settings-section-title,
  .admin-section-title,
  .admin-card-title
):not(.friend-chat *){
  color:var(--bs-text-strong) !important;
}

/* ----------------------------------------------------------
   LOGIN / REGISTER / PUBLIC PAGES
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .login-box,
  .register-box,
  .public-profile-shell,
  .guest-home-start-box,
  .guest-home-privacy-box
):not(.friend-chat *){
  color:var(--bs-text) !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .login-box,
  .register-box
) :is(h1,h2,h3,b,strong):not(.friend-chat *){
  color:var(--bs-text-strong) !important;
}

/* ----------------------------------------------------------
   BADGES / STATUS
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .badge,
  .tag,
  .status-badge,
  .count-badge,
  .privacy-badge
):not(.friend-chat *){
  opacity:1 !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .success,
  .success-text
):not(.friend-chat *){
  color:var(--bs-success) !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .error,
  .danger-text
):not(.friend-chat *){
  color:var(--bs-danger) !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(
  .warning,
  .warning-text
):not(.friend-chat *){
  color:var(--bs-warning) !important;
}

/* ----------------------------------------------------------
   FOOTER
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
.retro-footer{
  background:rgba(246,250,252,.94) !important;
  border-top-color:var(--bs-line) !important;
  color:var(--bs-text-soft) !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
.retro-footer a{
  color:var(--bs-link) !important;
}

/* ----------------------------------------------------------
   KEEP THE RESTORED OLD MENU COLORS
   ---------------------------------------------------------- */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
.retro-nav{
  background:linear-gradient(#4c8ac2,#2f6fa8) !important;
  border-top-color:#79a7ce !important;
  border-bottom-color:#1f537f !important;
}

body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
.retro-nav :is(
  .nav-primary>a,
  .nav-utilities>a,
  .nav-more>summary,
  .nav-status-control,
  .nav-sound-toggle
){
  color:#fff !important;
}

/* ----------------------------------------------------------
   ABSOLUTE EXCLUSIONS
   ---------------------------------------------------------- */

/* User profiles stay 100% controlled by Pimp */
body[data-page="profile"] main,
body[data-page="profile"] .classic-profile,
body[data-page="profile"] .retro-box,
body[data-page="profile"] .retro-box-title{
  /* intentionally untouched by v10.07 */
}

/* Pimp pages stay untouched */
body[data-page="pimp_profile"] main,
body[data-page="admin_pimp_profile"] main{
  /* intentionally untouched by v10.07 */
}

/* Chat remains untouched */
#friend-chat,
#friend-chat *,
.friend-chat-window,
.friend-chat-window *{
  /* intentionally untouched by v10.07 */
}
