/*
 * Sngine Sunshine exact presentation layer
 * Visual measurements/palette are adapted from the user-supplied WoWonder Sunshine theme.
 * Sngine data flow, AJAX hooks, IDs and plugin templates remain intact.
 */
:root {
  --sun-red: #C64D53;
  --sun-red-dark: #ad3e44;
  --sun-red-soft: rgba(198,77,83,.10);
  --sun-red-soft-2: rgba(198,77,83,.18);
  --sun-bg: #f9f9f9;
  --sun-card: #fff;
  --sun-text: #202124;
  --sun-muted: #7a7d85;
  --sun-border: #ececef;
  --sun-input: #f2f2f2;
  --sun-radius: 16px;
  --sun-radius-sm: 8px;
  --sun-shadow: none;
}

/* BASIC */
html, body { min-height: 100%; }
body.sunshine-exact-theme {
  background: var(--sun-bg) !important;
  color: var(--sun-text);
  font-family: "Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif !important;
  font-size: 14.5px;
  padding-top: 64px;
}
body.sunshine-exact-theme .main-wrapper { background: transparent !important; }
body.sunshine-exact-theme a { text-decoration: none; }
body.sunshine-exact-theme .text-primary,
body.sunshine-exact-theme .link-primary { color: var(--sun-red) !important; }
body.sunshine-exact-theme .main-icon,
body.sunshine-exact-theme .main-icon *,
body.sunshine-exact-theme .x-form-tools { color: var(--sun-red) !important; fill: var(--sun-red) !important; }
body.sunshine-exact-theme ::selection { background: var(--sun-red); color: #fff; }
body.sunshine-exact-theme ::-webkit-scrollbar { width: 8px; height: 4px; }
body.sunshine-exact-theme ::-webkit-scrollbar-thumb { background: #808080; border-radius: 5px; }

/* HEADER */
body.sunshine-exact-theme .main-header {
  height: 64px !important;
  min-height: 64px !important;
  background: #fff !important;
  border: 0 !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.04) !important;
  position: fixed !important;
  top: 0; left: 0; right: 0;
  z-index: 1050;
}
body.sunshine-exact-theme .main-header > .container,
body.sunshine-exact-theme .main-header > .container-fluid { height: 64px; max-width: 1540px; margin: 0 auto; }
body.sunshine-exact-theme .main-header .row { height: 64px; align-items: center; margin: 0; }
body.sunshine-exact-theme .main-header .logo-wrapper { height: 64px; display: flex; align-items: center; padding: 0 8px; }
body.sunshine-exact-theme .main-header .logo { font-size: 22px; font-weight: 700; color: #18191a !important; }
body.sunshine-exact-theme .main-header .logo img { max-width: 172px; max-height: 34px; object-fit: contain; }
body.sunshine-exact-theme .sunshine-header-main { display: flex; align-items: center; width: 100%; gap: 10px; }
body.sunshine-exact-theme .sunshine-home-shortcut {
  height: 40px; padding: 0 18px; border-radius: 8px; gap: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sun-red); color: #fff !important; font-weight: 600; font-size: 14px;
  box-shadow: none; flex: 0 0 auto;
}
body.sunshine-exact-theme .sunshine-home-shortcut:hover { background: var(--sun-red-dark); color: #fff !important; }
body.sunshine-exact-theme .sunshine-apps-shortcut {
  width: 40px; height: 40px; border-radius: 8px; background: #f2f2f2; color: #3f4354 !important;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
body.sunshine-exact-theme .sunshine-apps-shortcut:hover { background: #e9e9e9; }
body.sunshine-exact-theme .sunshine-search-box { flex: 1; min-width: 0; }
body.sunshine-exact-theme .main-header .search-wrapper { margin: 0; }
body.sunshine-exact-theme .main-header .search-wrapper .form-control,
body.sunshine-exact-theme .main-header .search-wrapper input {
  height: 40px !important; min-height: 40px !important; border: 0 !important;
  border-radius: 8px !important; background: #f2f2f2 !important; box-shadow: none !important;
  color: #3f4354 !important; font-size: 13px !important;
}
body.sunshine-exact-theme .navbar-wrapper { height: 64px; display: flex; justify-content: flex-end; align-items: center; }
body.sunshine-exact-theme .navbar-wrapper > ul { display: flex; align-items: center; gap: 4px; }
body.sunshine-exact-theme .navbar-wrapper > ul > li > a:not(.user-menu) {
  width: 40px; height: 40px; padding: 0 !important; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
body.sunshine-exact-theme .navbar-wrapper > ul > li > a:not(.user-menu):hover { background: #f2f2f2; }
body.sunshine-exact-theme .header-icon,
body.sunshine-exact-theme .header-icon * { color: #3f4354 !important; fill: #3f4354 !important; }
body.sunshine-exact-theme .header-icon.active,
body.sunshine-exact-theme .header-icon.active * { color: var(--sun-red) !important; fill: var(--sun-red) !important; }
body.sunshine-exact-theme .navbar-wrapper .user-menu img { width: 38px !important; height: 38px !important; object-fit: cover; border-radius: 50%; }
body.sunshine-exact-theme .navbar-wrapper .badge,
body.sunshine-exact-theme .counter { background: var(--sun-red) !important; border-color: #fff !important; }

/* HOME GRID: mirrors Sunshine desktop proportions */
body.sunshine-exact-theme .sunshine-home-grid { max-width: 1540px !important; margin: 20px auto 0 !important; padding: 0 68px 0 12px !important; }
body.sunshine-exact-theme .sunshine-home-grid > .row { --bs-gutter-x: 20px; }
body.sunshine-exact-theme .sunshine-home-grid > .row > .sg-offcanvas-sidebar {
  width: 18.666667% !important; flex: 0 0 18.666667% !important; max-width: 18.666667% !important;
}
body.sunshine-exact-theme .sunshine-home-grid > .row > .sg-offcanvas-mainbar {
  width: 81.333333% !important; flex: 0 0 81.333333% !important; max-width: 81.333333% !important;
}
body.sunshine-exact-theme .sunshine-home-grid .sg-offcanvas-mainbar > .row { --bs-gutter-x: 20px; }
body.sunshine-exact-theme .sunshine-home-grid .sunshine-center-feed {
  width: 65.57377% !important; flex: 0 0 65.57377% !important; max-width: 65.57377% !important;
}
body.sunshine-exact-theme .sunshine-home-grid .sunshine-right-rail {
  width: 34.42623% !important; flex: 0 0 34.42623% !important; max-width: 34.42623% !important;
}
/* Exact reference proportions preserved in vars for maintenance: 18.666667% / 53.333333% / 28% */
body.sunshine-exact-theme .sunshine-home-grid { --sun-left:18.666667%; --sun-middle:53.333333%; --sun-right:28%; }

/* LEFT SIDE + UTILITY RAIL */
body.sunshine-exact-theme .sunshine-side-shell { position: relative; min-height: 600px; padding-left: 58px; }
body.sunshine-exact-theme .sunshine-utility-rail {
  position: absolute; left: 0; top: 0; width: 48px; gap: 16px; align-items: center; flex-direction: column;
}
body.sunshine-exact-theme .sunshine-utility-btn {
  width: 48px; border: 0; background: transparent; color: #3f4354; padding: 5px 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; line-height: 1.2;
}
body.sunshine-exact-theme .sunshine-utility-btn i {
  width: 40px; height: 40px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); font-size: 17px;
}
body.sunshine-exact-theme .sunshine-utility-btn:hover i { background: var(--sun-red-soft); color: var(--sun-red); }
body.sunshine-exact-theme .sunshine-side-nav {
  background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
}
body.sunshine-exact-theme .sunshine-side-nav .main-side-nav { margin: 0; padding: 0; }
body.sunshine-exact-theme .sunshine-side-nav .main-side-nav > li { margin: 4px 0; }
body.sunshine-exact-theme .sunshine-side-nav .main-side-nav > li > a {
  display: flex !important; align-items: center; min-height: 42px; padding: 5px 10px !important;
  border-radius: 8px; color: #333 !important; font-size: 14px; font-weight: 500; line-height: 18px;
  border: 0 !important; background: transparent; transition: all .18s ease;
}
body.sunshine-exact-theme .sunshine-side-nav .main-side-nav > li > a i {
  width: 30px; height: 30px; padding: 5px; margin-right: 10px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; color: #3f4354; font-size: 16px;
}
body.sunshine-exact-theme .sunshine-side-nav .main-side-nav > li > a:hover { background: rgba(0,0,0,.05); color: #050505 !important; }
body.sunshine-exact-theme .sunshine-side-nav .main-side-nav > li.active > a {
  background: var(--sun-red) !important; color: #fff !important; box-shadow: none !important;
}
body.sunshine-exact-theme .sunshine-side-nav .main-side-nav > li.active > a i { color: #fff !important; }
body.sunshine-exact-theme .sunshine-nav-divider { height: 1px; background: #e5e5e5; margin: 12px 7px !important; }

/* COMMON SUNSHINE SURFACES */
body.sunshine-exact-theme .card,
body.sunshine-exact-theme .post,
body.sunshine-exact-theme .x-form.publisher,
body.sunshine-exact-theme .widget,
body.sunshine-exact-theme .profile-header,
body.sunshine-exact-theme .panel-messages,
body.sunshine-exact-theme .modal-content,
body.sunshine-exact-theme .dropdown-menu:not(.reactions-container) {
  background: #fff !important; border: 0 !important; border-radius: var(--sun-radius) !important; box-shadow: none !important;
}
body.sunshine-exact-theme .card,
body.sunshine-exact-theme .post,
body.sunshine-exact-theme .x-form.publisher { margin-bottom: 14px; }
body.sunshine-exact-theme .card-header {
  min-height: 48px; padding: 15px !important; background: transparent !important; border-bottom: 1px solid #f1f1f1 !important;
  color: #25262b; font-weight: 600;
}
body.sunshine-exact-theme .card-body { padding: 15px; }
body.sunshine-exact-theme .dropdown-menu:not(.reactions-container) {
  padding: 8px !important; box-shadow: rgba(0,0,0,.10) 0 10px 15px -3px, rgba(0,0,0,.10) 0 4px 6px -4px !important;
}
body.sunshine-exact-theme .dropdown-item { border-radius: 8px; padding: 8px 12px; }
body.sunshine-exact-theme .dropdown-item:hover,
body.sunshine-exact-theme .dropdown-item:focus { background: #f4f4f4; }

/* STORIES */
body.sunshine-exact-theme .sunshine-stories-card { background: transparent !important; overflow: visible !important; margin-bottom: 10px; }
body.sunshine-exact-theme .sunshine-stories-card .card-body { padding: 0 !important; }
body.sunshine-exact-theme .stories-wrapper { padding: 0 !important; }
body.sunshine-exact-theme #stories { min-height: 112px; display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding: 0 0 7px; }
body.sunshine-exact-theme #stories .story,
body.sunshine-exact-theme #stories .add-story {
  width: 86px !important; min-width: 86px !important; height: 108px !important; border-radius: 16px !important;
  overflow: hidden; background: #fff !important; border: 0 !important; box-shadow: none !important;
}
body.sunshine-exact-theme #stories .story .img,
body.sunshine-exact-theme #stories .add-story .img { width: 100%; height: 100%; background-size: cover; background-position: center; }
body.sunshine-exact-theme #stories .add-story .add {
  width: 28px; height: 28px; border-radius: 50%; background: var(--sun-red) !important; border: 3px solid #fff !important;
}

/* PUBLISHER */
body.sunshine-exact-theme #publisher-wapper,
body.sunshine-exact-theme #publisher-box { margin-bottom: 14px; }
body.sunshine-exact-theme .sunshine-publisher {
  padding: 0 !important; overflow: hidden; border-radius: 16px !important; background: #fff !important;
}
body.sunshine-exact-theme .publisher-message { display: flex; align-items: flex-start; padding: 16px 16px 12px !important; }
body.sunshine-exact-theme .publisher-avatar { width: 44px !important; height: 44px !important; border-radius: 50% !important; object-fit: cover; margin-right: 12px !important; }
body.sunshine-exact-theme .publisher-message .colored-text-wrapper {
  min-height: 44px; flex: 1; border-radius: 22px; background: #f2f2f2 !important; padding: 9px 15px !important;
}
body.sunshine-exact-theme .publisher-message textarea,
body.sunshine-exact-theme .publisher-message .ql-editor {
  min-height: 26px !important; padding: 2px 0 !important; font-size: 14px !important; color: #3f4354 !important;
}
body.sunshine-exact-theme .publisher-tools-tabs { border-top: 1px solid #f1f1f1; padding: 8px 10px 10px !important; }
body.sunshine-exact-theme .publisher-tools-tabs > ul { margin: 0 !important; row-gap: 4px; }
body.sunshine-exact-theme .publisher-tools-tab {
  min-height: 40px; border-radius: 8px; padding: 9px 10px !important; color: #4b4f56; font-size: 13px; font-weight: 500;
}
body.sunshine-exact-theme .publisher-tools-tab:hover { background: #f4f4f4; }
body.sunshine-exact-theme .publisher-footer { border-top: 1px solid #f1f1f1; padding: 10px 15px !important; }
body.sunshine-exact-theme .publisher-footer .btn-primary,
body.sunshine-exact-theme .publisher-footer-buttons .btn-primary,
body.sunshine-exact-theme #publisher-box .btn-primary { background: var(--sun-red) !important; border-color: var(--sun-red) !important; }

/* POSTS */
body.sunshine-exact-theme .sunshine-center-feed .posts-filter { display: none !important; }
body.sunshine-exact-theme .sunshine-post { border-radius: 16px !important; overflow: hidden; }
body.sunshine-exact-theme .sunshine-post .post-body { padding-top: 0; }
body.sunshine-exact-theme .post .post-header,
body.sunshine-exact-theme .post .post-heading { padding: 15px 15px 10px !important; }
body.sunshine-exact-theme .post .post-avatar img,
body.sunshine-exact-theme .post .post-avatar { width: 44px !important; height: 44px !important; border-radius: 50% !important; object-fit: cover; }
body.sunshine-exact-theme .post .post-meta { color: #8a8d91 !important; font-size: 12px; }
body.sunshine-exact-theme .post .post-text { padding: 0 15px 12px !important; font-size: 14.5px; line-height: 1.55; color: #202124; }
body.sunshine-exact-theme .post .post-media img,
body.sunshine-exact-theme .post .post-media video { border-radius: 0 !important; }
body.sunshine-exact-theme .post .post-stats { padding: 10px 15px !important; color: #777c84; border-bottom: 1px solid #f0f0f0; font-size: 12px; }
body.sunshine-exact-theme .post .post-actions { padding: 5px 8px !important; border-top: 0 !important; border-bottom: 1px solid #f2f2f2; }
body.sunshine-exact-theme .post .post-actions .action-btn {
  min-height: 40px; border-radius: 8px; color: #5b5f66 !important; display: flex; align-items: center; justify-content: center; font-weight: 500;
}
body.sunshine-exact-theme .post .post-actions .action-btn:hover { background: #f3f3f3; color: var(--sun-red) !important; }
body.sunshine-exact-theme .post .post-actions .action-icon,
body.sunshine-exact-theme .post .post-actions .action-icon * { color: #5b5f66 !important; fill: #5b5f66 !important; }
body.sunshine-exact-theme .post .post-footer { padding: 8px 15px 14px !important; background: #fff !important; }
body.sunshine-exact-theme .post .comment .comment-data,
body.sunshine-exact-theme .post .comment .comment-body { border-radius: 12px; }
body.sunshine-exact-theme .post .comment .comment-avatar img { border-radius: 50%; }
body.sunshine-exact-theme .reactions-container { border-radius: 28px !important; box-shadow: rgba(0,0,0,.12) 0 5px 18px !important; }

/* RIGHT PROFILE CARD */
body.sunshine-exact-theme .sunshine-right-rail { position: relative; }
body.sunshine-exact-theme .sunshine-right-rail > .card { border-radius: 16px !important; }
body.sunshine-exact-theme .sunshine-profile-widget { overflow: hidden; }
body.sunshine-exact-theme .sunshine-profile-cover {
  height: 118px; background-color: #665a5c; background-size: cover; background-position: center;
  position: relative;
}
body.sunshine-exact-theme .sunshine-profile-cover:after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.28));
}
body.sunshine-exact-theme .sunshine-profile-widget .card-body { position: relative; padding: 58px 18px 18px !important; }
body.sunshine-exact-theme .sunshine-profile-avatar {
  position: absolute; top: -47px; left: 50%; transform: translateX(-50%); width: 90px; height: 90px;
  border: 4px solid #fff; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.13);
}
body.sunshine-exact-theme .sunshine-profile-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
body.sunshine-exact-theme .sunshine-online-dot { position: absolute; width: 14px; height: 14px; right: 4px; bottom: 7px; border: 2px solid #fff; border-radius: 50%; background: #38b36b; }
body.sunshine-exact-theme .sunshine-profile-name { display: block; color: #222 !important; font-size: 18px; font-weight: 700; line-height: 1.25; }
body.sunshine-exact-theme .sunshine-profile-handle { color: #999; margin-top: 3px; font-size: 12px; }
body.sunshine-exact-theme .sunshine-profile-copy { margin: 13px auto; max-width: 260px; color: #73767c; font-size: 12px; line-height: 1.5; }
body.sunshine-exact-theme .sunshine-edit-profile { display: block; border-radius: 8px; background: #f2f2f2; color: #333 !important; padding: 10px 12px; font-weight: 600; font-size: 13px; }
body.sunshine-exact-theme .sunshine-edit-profile:hover { background: var(--sun-red-soft); color: var(--sun-red) !important; }

/* TRENDING */
body.sunshine-exact-theme .sunshine-trending-card { overflow: hidden; }
body.sunshine-exact-theme .sunshine-widget-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 10px !important; }
body.sunshine-exact-theme .sunshine-widget-icon { width: 34px; height: 34px; border-radius: 7px; background: var(--sun-red-soft); color: var(--sun-red); display: flex; align-items: center; justify-content: center; }
body.sunshine-exact-theme .sunshine-widget-title { font-size: 15px; font-weight: 700; color: #24262b; }
body.sunshine-exact-theme .sunshine-widget-subtitle { font-size: 10.5px; color: #9a9da3; margin-top: 1px; }
body.sunshine-exact-theme .sunshine-trending-body { padding: 2px 15px 14px !important; }
body.sunshine-exact-theme .sunshine-trending-item { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #f1f1f1; }
body.sunshine-exact-theme .sunshine-trending-item:last-child { border-bottom: 0; }
body.sunshine-exact-theme .sunshine-trending-hash { color: #303237; font-size: 13px; font-weight: 600; }
body.sunshine-exact-theme .sunshine-trending-count { color: #9a9da3; font-size: 11px; }
body.sunshine-exact-theme .ch-people-card,
body.sunshine-exact-theme .ch-events-card,
body.sunshine-exact-theme .ch-groups-card { margin-top: 14px; }
body.sunshine-exact-theme .sunshine-right-rail .with-list li { padding: 8px 0; }

/* FLOATING RIGHT PEOPLE/CHAT RAIL */
body.sunshine-exact-theme .sunshine-floating-rail {
  position: fixed; right: 12px; top: 82px; bottom: 18px; width: 48px; z-index: 1030;
  flex-direction: column; align-items: center; gap: 12px;
}
body.sunshine-exact-theme .sunshine-floating-rail a {
  width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #555 !important;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
body.sunshine-exact-theme .sunshine-floating-rail a:hover { color: var(--sun-red) !important; background: var(--sun-red-soft); }
body.sunshine-exact-theme .sunshine-floating-rail img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

/* BUTTONS / FORMS */
body.sunshine-exact-theme .btn-primary,
body.sunshine-exact-theme .bg-primary { background-color: var(--sun-red) !important; border-color: var(--sun-red) !important; color: #fff !important; }
body.sunshine-exact-theme .btn-primary:hover,
body.sunshine-exact-theme .btn-primary:focus,
body.sunshine-exact-theme .btn-primary:active { background: var(--sun-red-dark) !important; border-color: var(--sun-red-dark) !important; }
body.sunshine-exact-theme .btn-outline-primary { color: var(--sun-red) !important; border-color: var(--sun-red) !important; }
body.sunshine-exact-theme .btn-outline-primary:hover { background: var(--sun-red) !important; color: #fff !important; }
body.sunshine-exact-theme .form-control,
body.sunshine-exact-theme .form-select,
body.sunshine-exact-theme .x-form input[type=text],
body.sunshine-exact-theme .x-form input[type=password],
body.sunshine-exact-theme .x-form textarea {
  border: 1px solid #ececec !important; background: #f7f7f7 !important; border-radius: 8px !important; box-shadow: none !important;
}
body.sunshine-exact-theme .form-control:focus,
body.sunshine-exact-theme .form-select:focus,
body.sunshine-exact-theme textarea:focus { border-color: rgba(198,77,83,.55) !important; box-shadow: 0 0 0 3px rgba(198,77,83,.10) !important; }
body.sunshine-exact-theme .form-check-input:checked { background-color: var(--sun-red) !important; border-color: var(--sun-red) !important; }
body.sunshine-exact-theme .nav-tabs .nav-link.active,
body.sunshine-exact-theme .nav-pills .nav-link.active { color: #fff !important; background: var(--sun-red) !important; border-color: var(--sun-red) !important; }
body.sunshine-exact-theme .pagination .page-item.active .page-link { background: var(--sun-red); border-color: var(--sun-red); }

/* PROFILE / PAGE / GROUP / EVENT */
body.sunshine-exact-theme .profile-header { overflow: hidden; margin-top: 20px; }
body.sunshine-exact-theme .profile-cover-wrapper { min-height: 300px; border-radius: 16px 16px 0 0; overflow: hidden; background: #ddd; }
body.sunshine-exact-theme .profile-cover-wrapper > img { width: 100%; height: 100%; object-fit: cover; }
body.sunshine-exact-theme .profile-avatar-wrapper img { border-radius: 50% !important; border: 5px solid #fff !important; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
body.sunshine-exact-theme .profile-header .profile-name { font-weight: 700; }
body.sunshine-exact-theme .profile-tabs-wrapper,
body.sunshine-exact-theme .profile-tabs { background: #fff !important; border-radius: 0 0 16px 16px !important; }
body.sunshine-exact-theme .profile-tabs a.active,
body.sunshine-exact-theme .profile-tabs .active a { color: var(--sun-red) !important; border-color: var(--sun-red) !important; }
body.sunshine-exact-theme .page-header { border-radius: 16px !important; background: #fff !important; color: #222 !important; box-shadow: none !important; }

/* MESSAGES */
body.sunshine-exact-theme .panel-messages { overflow: hidden; }
body.sunshine-exact-theme .panel-messages .card-header { background: #fff !important; }
body.sunshine-exact-theme .chat-conversations { background: #fff; }
body.sunshine-exact-theme .chat-form { border-top: 1px solid #f1f1f1; background: #fff; }
body.sunshine-exact-theme .chat-form-message textarea { background: #f2f2f2 !important; border: 0 !important; border-radius: 18px !important; }
body.sunshine-exact-theme .x-form-tools-post { color: var(--sun-red) !important; }
body.sunshine-exact-theme .conversation.active,
body.sunshine-exact-theme .conversation:hover { background: var(--sun-red-soft) !important; }

/* SETTINGS / MARKET / LIST PAGES */
body.sunshine-exact-theme .settings-sidebar,
body.sunshine-exact-theme .settings-content,
body.sunshine-exact-theme .table-responsive,
body.sunshine-exact-theme .list-group { border-radius: 16px !important; overflow: hidden; }
body.sunshine-exact-theme .list-group-item { border-color: #f0f0f0 !important; }
body.sunshine-exact-theme .list-group-item.active { background: var(--sun-red) !important; border-color: var(--sun-red) !important; color: #fff !important; }
body.sunshine-exact-theme .table { --bs-table-bg: transparent; }
body.sunshine-exact-theme .table > :not(caption) > * > * { border-color: #f0f0f0; }
body.sunshine-exact-theme .alert { border-radius: 12px; border: 0; }

/* CHAT SIDEBAR */
body.sunshine-exact-theme .chat-sidebar { right: 66px !important; }
body.sunshine-exact-theme .chat-sidebar-content { background: transparent !important; border: 0 !important; box-shadow: none !important; }
body.sunshine-exact-theme .chat-avatar { width: 40px !important; height: 40px !important; margin-bottom: 8px; }
body.sunshine-exact-theme .chat-avatar img { border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
body.sunshine-exact-theme .chat-sidebar-footer .btn-chat { background: #fff !important; border-radius: 50% !important; border: 0 !important; }

/* NIGHT MODE */
body.sunshine-exact-theme.night-mode { --sun-bg:#18191a; --sun-card:#242526; --sun-text:#e4e6eb; --sun-muted:#b0b3b8; --sun-border:#3a3b3c; --sun-input:#3a3b3c; background:#18191a !important; color:#e4e6eb; }
body.sunshine-exact-theme.night-mode .main-header,
body.sunshine-exact-theme.night-mode .card,
body.sunshine-exact-theme.night-mode .post,
body.sunshine-exact-theme.night-mode .x-form.publisher,
body.sunshine-exact-theme.night-mode .profile-header,
body.sunshine-exact-theme.night-mode .panel-messages,
body.sunshine-exact-theme.night-mode .sunshine-floating-rail a,
body.sunshine-exact-theme.night-mode .sunshine-utility-btn i { background:#242526 !important; color:#e4e6eb !important; }
body.sunshine-exact-theme.night-mode .sunshine-side-nav .main-side-nav > li > a { color:#e4e6eb !important; }
body.sunshine-exact-theme.night-mode .sunshine-side-nav .main-side-nav > li > a i { color:#b0b3b8; }
body.sunshine-exact-theme.night-mode .form-control,
body.sunshine-exact-theme.night-mode .form-select,
body.sunshine-exact-theme.night-mode .publisher-message .colored-text-wrapper,
body.sunshine-exact-theme.night-mode .chat-form-message textarea { background:#3a3b3c !important; color:#e4e6eb !important; border-color:#3a3b3c !important; }
body.sunshine-exact-theme.night-mode .card-header,
body.sunshine-exact-theme.night-mode .post .post-stats,
body.sunshine-exact-theme.night-mode .post .post-actions,
body.sunshine-exact-theme.night-mode .publisher-tools-tabs { border-color:#3a3b3c !important; }
body.sunshine-exact-theme.night-mode .sunshine-profile-name,
body.sunshine-exact-theme.night-mode .sunshine-widget-title,
body.sunshine-exact-theme.night-mode .sunshine-trending-hash { color:#e4e6eb !important; }
body.sunshine-exact-theme.night-mode .sunshine-edit-profile { background:#3a3b3c; color:#e4e6eb !important; }

/* RESPONSIVE */
@media (max-width: 1399.98px) {
  body.sunshine-exact-theme .sunshine-home-grid { padding-right: 18px !important; }
  body.sunshine-exact-theme .sunshine-floating-rail { display: none !important; }
  body.sunshine-exact-theme .chat-sidebar { right: 8px !important; }
}
@media (max-width: 1199.98px) {
  body.sunshine-exact-theme .sunshine-home-grid > .row > .sg-offcanvas-sidebar { width: 23% !important; flex-basis: 23% !important; max-width: 23% !important; }
  body.sunshine-exact-theme .sunshine-home-grid > .row > .sg-offcanvas-mainbar { width: 77% !important; flex-basis: 77% !important; max-width: 77% !important; }
  body.sunshine-exact-theme .sunshine-home-grid .sunshine-center-feed { width: 100% !important; flex-basis: 100% !important; max-width: 100% !important; }
  body.sunshine-exact-theme .sunshine-right-rail { display: none !important; }
}
@media (max-width: 991.98px) {
  body.sunshine-exact-theme { padding-top: 58px; }
  body.sunshine-exact-theme .main-header { height: 58px !important; min-height: 58px !important; }
  body.sunshine-exact-theme .main-header > .container,
  body.sunshine-exact-theme .main-header > .container-fluid,
  body.sunshine-exact-theme .main-header .row,
  body.sunshine-exact-theme .main-header .logo-wrapper,
  body.sunshine-exact-theme .navbar-wrapper { height: 58px; }
  body.sunshine-exact-theme .sunshine-home-grid { margin-top: 12px !important; padding: 0 10px !important; }
  body.sunshine-exact-theme .sunshine-home-grid > .row > .sg-offcanvas-mainbar { width:100% !important; max-width:100% !important; flex-basis:100% !important; }
  body.sunshine-exact-theme .sunshine-home-grid > .row > .sg-offcanvas-sidebar { width:280px !important; max-width:280px !important; flex-basis:280px !important; }
  body.sunshine-exact-theme .sunshine-side-shell { padding-left: 0; }
  body.sunshine-exact-theme .sunshine-utility-rail { display:none !important; }
}
@media (max-width: 767.98px) {
  body.sunshine-exact-theme .main-header .logo img { max-width: 130px; }
  body.sunshine-exact-theme .sunshine-home-grid { padding: 0 8px !important; }
  body.sunshine-exact-theme .sunshine-center-feed { padding-left: 0 !important; padding-right: 0 !important; }
  body.sunshine-exact-theme .card,
  body.sunshine-exact-theme .post,
  body.sunshine-exact-theme .x-form.publisher { border-radius: 12px !important; margin-bottom: 10px; }
  body.sunshine-exact-theme #stories { gap: 8px; }
  body.sunshine-exact-theme #stories .story,
  body.sunshine-exact-theme #stories .add-story { width: 76px !important; min-width: 76px !important; height: 98px !important; border-radius: 12px !important; }
  body.sunshine-exact-theme .profile-cover-wrapper { min-height: 190px; }
}

/* Messages page marker / Sunshine card shell */
body.sunshine-exact-theme .messages,
body.sunshine-exact-theme .sunshine-messages-page,
body.sunshine-exact-theme .card-messages {
  background: #fff;
  border-radius: var(--sun-radius);
}

/* GLOBAL PAGE SHELLS — keep Sngine behavior, give every major screen Sunshine presentation */
body.sunshine-exact-theme .sunshine-profile-page,
body.sunshine-exact-theme .sunshine-settings-page,
body.sunshine-exact-theme .sunshine-directory-page,
body.sunshine-exact-theme .sunshine-messages-page {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}
body.sunshine-exact-theme .sunshine-profile-page .profile-header {
  border-radius: 16px !important;
  overflow: hidden;
  background: #fff !important;
}
body.sunshine-exact-theme .sunshine-profile-page .profile-cover-wrapper { border-radius: 16px 16px 0 0; overflow: hidden; }
body.sunshine-exact-theme .sunshine-profile-page .profile-tabs,
body.sunshine-exact-theme .sunshine-profile-page .profile-buttons { background: #fff; }
body.sunshine-exact-theme .sunshine-settings-page .nav-pills .nav-link.active,
body.sunshine-exact-theme .sunshine-directory-page .content-tabs .active > a,
body.sunshine-exact-theme .sunshine-directory-page .content-tabs .active { color: var(--sun-red) !important; }
body.sunshine-exact-theme .sunshine-directory-page .content-tabs {
  background: #fff !important; border: 0 !important; border-radius: 16px !important; box-shadow: none !important;
}
body.sunshine-exact-theme .sunshine-messages-page .card,
body.sunshine-exact-theme .sunshine-messages-page .panel-messages { min-height: 100%; }

/* Sunshine line-icon system — matches the reference theme's thin outlined iconography */
body.sunshine-exact-theme .sunshine-icon {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  display: inline-block;
  flex: 0 0 22px;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
body.sunshine-exact-theme .sunshine-icon * {
  fill: none !important;
  stroke: currentColor !important;
  vector-effect: non-scaling-stroke;
}
body.sunshine-exact-theme .sunshine-icon [fill="currentColor"] {
  fill: currentColor !important;
  stroke: none !important;
}
body.sunshine-exact-theme .sunshine-home-shortcut .sunshine-icon {
  width: 20px;
  height: 20px;
  color: #fff !important;
}
body.sunshine-exact-theme .sunshine-apps-shortcut .sunshine-icon {
  width: 20px;
  height: 20px;
  color: #252a35 !important;
}
body.sunshine-exact-theme .navbar-wrapper .sunshine-icon.header-icon {
  width: 22px;
  height: 22px;
  color: #20242d !important;
  fill: none !important;
}
body.sunshine-exact-theme .navbar-wrapper .sunshine-icon.header-icon * {
  fill: none !important;
  stroke: currentColor !important;
}
body.sunshine-exact-theme .sunshine-utility-btn .sunshine-icon {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  color: #252a35;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
body.sunshine-exact-theme .sunshine-utility-btn:hover .sunshine-icon {
  background: var(--sun-red-soft);
  color: var(--sun-red);
}
body.sunshine-exact-theme .sunshine-side-nav .main-side-nav > li > a > .sunshine-icon {
  width: 30px;
  height: 30px;
  max-width: 30px;
  max-height: 30px;
  padding: 5px;
  margin-right: 10px;
  border-radius: 6px;
  color: var(--sun-red) !important;
  flex: 0 0 30px;
}
body.sunshine-exact-theme .sunshine-side-nav .main-side-nav > li.active > a > .sunshine-icon {
  color: #fff !important;
}
body.sunshine-exact-theme .sunshine-side-nav .main-side-nav > li > a:hover > .sunshine-icon {
  color: var(--sun-red-dark) !important;
}
body.sunshine-exact-theme .sunshine-floating-rail a .sunshine-icon {
  width: 21px;
  height: 21px;
  max-width: 21px;
  max-height: 21px;
  color: #252a35 !important;
}
body.sunshine-exact-theme .sunshine-floating-rail a.sunshine-floating-rail-primary {
  background: var(--sun-red) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(198,77,83,.25);
}
body.sunshine-exact-theme .sunshine-floating-rail a.sunshine-floating-rail-primary .sunshine-icon {
  color: #fff !important;
}
body.sunshine-exact-theme .sunshine-floating-rail a:hover .sunshine-icon {
  color: var(--sun-red) !important;
}
body.sunshine-exact-theme .sunshine-floating-rail a.sunshine-floating-rail-primary:hover .sunshine-icon {
  color: #fff !important;
}
body.sunshine-exact-theme .publisher-tools-tab .sunshine-icon.publisher-sun-icon {
  width: 23px;
  height: 23px;
  max-width: 23px;
  max-height: 23px;
  margin-right: 8px;
  color: #343942 !important;
  vertical-align: middle;
}
body.sunshine-exact-theme .publisher-tools-tab .sunshine-icon.publisher-sun-icon.sunshine-icon-accent {
  color: var(--sun-red) !important;
}
body.sunshine-exact-theme.night-mode .sunshine-utility-btn .sunshine-icon,
body.sunshine-exact-theme.night-mode .sunshine-floating-rail a .sunshine-icon,
body.sunshine-exact-theme.night-mode .navbar-wrapper .sunshine-icon.header-icon {
  color: #e4e6eb !important;
}
body.sunshine-exact-theme.night-mode .sunshine-side-nav .main-side-nav > li > a > .sunshine-icon {
  color: #e36a70 !important;
}
body.sunshine-exact-theme.night-mode .sunshine-side-nav .main-side-nav > li.active > a > .sunshine-icon {
  color: #fff !important;
}

/* ============================================================
   Recovery patch: keep Sngine publisher functional and visible
   ============================================================ */
/* Sngine hides .publisher-slider until the editor is focused. Sunshine keeps
   the post actions visible, so expose the slider without changing Sngine JS. */
body.sunshine-exact-theme .sunshine-publisher .publisher-slider {
  display: block !important;
}

/* Keep the publisher's hidden meta panels hidden until Sngine activates them. */
body.sunshine-exact-theme .sunshine-publisher .publisher-meta {
  display: none;
}
body.sunshine-exact-theme .sunshine-publisher .publisher-attachments.x-hidden {
  display: none !important;
}

/* Make the Themes/Modes glyphs clearly visible without changing their hit area. */
body.sunshine-exact-theme .sunshine-utility-btn .sunshine-icon {
  stroke-width: 2.2 !important;
}


/* ============================================================
   Sunshine compact publisher + fluid design patch
   ============================================================ */

/* Admin CP Fluid Design: remove the Sunshine desktop cap only when Sngine
   explicitly enables fluid mode. Boxed mode keeps the reference proportions. */
body.sunshine-exact-theme.sunshine-fluid .main-header > .container-fluid {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}
body.sunshine-exact-theme.sunshine-fluid .sunshine-home-grid {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.sunshine-exact-theme.sunshine-fluid .sunshine-profile-page,
body.sunshine-exact-theme.sunshine-fluid .sunshine-settings-page,
body.sunshine-exact-theme.sunshine-fluid .sunshine-directory-page,
body.sunshine-exact-theme.sunshine-fluid .sunshine-messages-page {
  max-width: none !important;
  width: 100% !important;
}

/* Slightly larger Sunshine left-nav icons while keeping them inside each row. */
body.sunshine-exact-theme .sunshine-side-nav .main-side-nav > li > a > .sunshine-icon {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  flex: 0 0 32px !important;
  padding: 4px !important;
  stroke-width: 2 !important;
}

/* Keep the compact Sunshine toolbar visible immediately on page load. */
body.sunshine-exact-theme .sunshine-publisher .publisher-slider {
  display: block !important;
}
body.sunshine-exact-theme .sunshine-publisher {
  position: relative;
}
body.sunshine-exact-theme .sunshine-publisher .publisher-tools-tabs {
  border-top: 1px solid #f1f1f1;
  padding: 7px 12px 10px !important;
}
body.sunshine-exact-theme .sunshine-publisher .publisher-tools-tabs > ul {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
}
body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-tools-tabs > ul > li:not(.sunshine-primary-tool):not(.sunshine-more-toggle-li) {
  display: none !important;
}
body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-tools-tabs > ul > li.sunshine-primary-tool,
body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-tools-tabs > ul > li.sunshine-more-toggle-li {
  display: block !important;
  flex: 1 1 0 !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 3px !important;
  min-width: 0;
}
body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-tools-tab {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 8px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-tools-tab:hover {
  background: #f5f5f5 !important;
}
body.sunshine-exact-theme .publisher-tools-tab .sunshine-icon.publisher-sun-icon {
  width: 26px !important;
  height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  flex: 0 0 26px !important;
  margin-right: 0 !important;
}
body.sunshine-exact-theme .sunshine-more-toggle {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  color: #343942;
  font: inherit;
}
body.sunshine-exact-theme .sunshine-more-label-less { display: none; }
body.sunshine-exact-theme .sunshine-publisher.sunshine-publisher-expanded .sunshine-more-label-more { display: none; }
body.sunshine-exact-theme .sunshine-publisher.sunshine-publisher-expanded .sunshine-more-label-less { display: inline; }

/* Default Sunshine view keeps advanced post settings out of the feed. */
body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-footer-options,
body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-footer-buttons > .js_publisher-privacy {
  display: none !important;
}
body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-footer {
  border-top: 0 !important;
  padding: 0 !important;
}
body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-message {
  padding-right: 150px !important;
}
body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-footer-buttons {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 4;
  display: block !important;
}
body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-footer-buttons .d-grid {
  display: block !important;
}
body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-footer-buttons .js_publisher-btn {
  height: 44px;
  min-width: 124px;
  margin: 0 !important;
  padding: 0 18px !important;
  border-radius: 8px !important;
}

/* More expands the original Sngine tools/options without replacing their hooks. */
body.sunshine-exact-theme .sunshine-publisher.sunshine-publisher-expanded .publisher-tools-tabs > ul {
  flex-wrap: wrap !important;
}
body.sunshine-exact-theme .sunshine-publisher.sunshine-publisher-expanded .publisher-tools-tabs > ul > li {
  display: block !important;
  flex: 0 0 50% !important;
  width: 50% !important;
  max-width: 50% !important;
  padding: 4px !important;
}
body.sunshine-exact-theme .sunshine-publisher.sunshine-publisher-expanded .sunshine-more-toggle-li {
  order: 999;
}
body.sunshine-exact-theme .sunshine-publisher.sunshine-publisher-expanded .publisher-tools-tab {
  background: #f7f7f7 !important;
}

@media (max-width: 767.98px) {
  body.sunshine-exact-theme.sunshine-fluid .main-header > .container-fluid {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-message {
    padding-right: 16px !important;
  }
  body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-footer-buttons {
    position: static;
    padding: 0 14px 10px;
  }
  body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-footer-buttons .js_publisher-btn {
    width: 100%;
  }
  body.sunshine-exact-theme .sunshine-publisher .publisher-tools-tabs > ul {
    flex-wrap: wrap !important;
  }
  body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-tools-tabs > ul > li.sunshine-primary-tool,
  body.sunshine-exact-theme .sunshine-publisher:not(.sunshine-publisher-expanded) .publisher-tools-tabs > ul > li.sunshine-more-toggle-li {
    flex: 0 0 calc(50% - 3px) !important;
    width: calc(50% - 3px) !important;
  }
}


/* ============================================================
   Sngine Fluid Design hard binding
   Uses the actual container-fluid class output by Sngine when
   Admin CP -> Design -> Fluid Design is enabled. This does not
   depend on a body helper class, so the setting works reliably.
   ============================================================ */
@media (min-width: 992px) {
  body.sunshine-exact-theme .main-header > .container-fluid {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  body.sunshine-exact-theme .container-fluid.sunshine-home-grid {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 12px !important;
    padding-right: 78px !important;
  }

  body.sunshine-exact-theme .container-fluid.sunshine-profile-page,
  body.sunshine-exact-theme .container-fluid.sunshine-settings-page,
  body.sunshine-exact-theme .container-fluid.sunshine-directory-page,
  body.sunshine-exact-theme .container-fluid.sunshine-messages-page {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
