/* Powerpack Extra: AdminCP branding (Self-contained) */

/* Default page gradients (overridden by settings via inline CSS if present) */
body#elLogin {
  background: radial-gradient(circle, rgba(237, 237, 237, 1) 0%, rgba(181, 181, 181, 1) 100%);
}

html[data-ips-scheme='dark'] body#elLogin {
  background:
    radial-gradient(1200px at 80% 80%, rgb(30 33 39) 0%, rgba(0, 0, 0, 0.35) 35%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(315deg, #1c1c1c 0%, #292e3d 50%, #1a1919 100%);
}

/* Login page logo settings */
body#elLogin .cAcpLoginBox_logo img {
  display: none;
  transition: opacity 0.3s ease;
}

body#elLogin .cAcpLoginBox_logo {
  background-image: url("acp_logo.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 80% auto;
  min-height: 80px;
  transition: background-image 0.3s ease;
}

/* Admin header logo: hide img and paint link background */
#elLogo a:not(.ppxAcpCircularBrand) > img {
  display: none !important; /* Hide only the native/core logo image. */
}

#elLogo a {
  background-image: url("acp_logo.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  display: block;
  width: 100%;
  height: 100%;
}

#elLogo a.ppxAcpCircularBrand {
  background-image: none !important;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#elLogo a.ppxAcpCircularBrand .ppxAcpCircularBrand__logo {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.14;
  pointer-events: none;
}

html[data-ips-scheme='dark'] #elLogo a.ppxAcpCircularBrand .ppxAcpCircularBrand__logo {
  opacity: 0.2;
}

#elLogo a.ppxAcpCircularBrand .ppxAcpCircularBrand__image {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(17, 24, 39, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

html[data-ips-scheme='dark'] #elLogo a.ppxAcpCircularBrand .ppxAcpCircularBrand__image {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
}

#elLogo a.ppxAcpCircularBrand .ppxAcpCircularBrand__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
}

/* PREMIUM "View Join Answer" Button Style (Member List) */
.ppxViewJoin i.fa-comments {
  color: #5b6c7a;
}

html[data-ips-scheme='dark'] .ppxViewJoin i.fa-comments {
  color: #97a1ac;
}

.ppxViewJoin {
  background: transparent;
  border-radius: 5px;
  min-width: 2.4em;
  min-height: 2.4em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

/* Ultra-high specificity for hover states to ensure white icon on blue */
body.ipsApp_admin .ppxViewJoin:hover,
body.ipsApp_admin .ipsTable .ppxViewJoin:hover,
html[data-ips-scheme='dark'] .ipsApp_admin .ppxViewJoin:hover {
  background: #0076ff !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

body.ipsApp_admin .ppxViewJoin:hover i,
body.ipsApp_admin .ppxViewJoin:hover svg,
html[data-ips-scheme="dark"] body.ipsApp_admin .ipsTable tr .ppxViewJoin:hover i,
html[data-ips-scheme="dark"] body.ipsApp_admin .ipsTable tr .ppxViewJoin:hover svg,
html[data-ips-scheme="dark"] body.ipsApp_admin .ppxViewJoin:hover i.fa-comments,
html[data-ips-scheme="dark"] body.ipsApp_admin .ppxViewJoin:hover i.ipsControlStrip_icon {
  color: #ffffff !important;
  fill: #ffffff !important;
}

body.ipsApp_admin .ppxViewJoin:hover span.ipsControlStrip_item,
html[data-ips-scheme="dark"] body.ipsApp_admin .ipsTable tr .ppxViewJoin:hover span.ipsControlStrip_item {
  color: #ffffff !important;
}

/* HARDENED REDESIGN: Awaiting Approval / Member Validation Banner */
/* Using high specificity to reduce !important usage */
body.ipsApp_admin .ipsMessage.ipsMessage--general.acpMemberView_message {
  position: relative;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e1e4e8;
  border-left: 6px solid #5b6c7a;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 30px;
}

/* Hide core decorations */
.ipsApp_admin .ipsMessage.ipsMessage--general.acpMemberView_message::before,
.ipsApp_admin .ipsMessage.ipsMessage--general.acpMemberView_message::after,
.ipsApp_admin .acpMemberView_message h4.ipsMessage__title::before,
.ipsApp_admin .acpMemberView_message h4.ipsMessage__title::after {
  display: none;
  content: none;
}

/* Dark Mode Integration */
html[data-ips-scheme='dark'] .ipsApp_admin .ipsMessage.ipsMessage--general.acpMemberView_message {
  background: #1a1e26;
  border-color: #2c313a;
  border-left-color: #97a1ac;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Typography Layout */
.ipsApp_admin .acpMemberView_message h4.ipsMessage__title {
  order: 1;
  font-size: 1.25em;
  font-weight: 700;
  color: #1a1e26;
  margin: 0;
}

html[data-ips-scheme='dark'] .ipsApp_admin .acpMemberView_message h4.ipsMessage__title {
  color: #f8f9fa;
}

.ipsApp_admin .acpMemberView_message p {
  order: 2;
  color: #5b6c7a;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

html[data-ips-scheme='dark'] .ipsApp_admin .acpMemberView_message p {
  color: #97a1ac;
}

/* Actions Area - Forced to BOTTOM using Flexbox order */
.ipsApp_admin .acpMemberView_message .ipsMessage_actions,
.ipsApp_admin .acpMemberView_message ul.ipsList_inline,
.ipsApp_admin .acpMemberView_message ul.ipsButton_split {
  order: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  float: none;
  clear: both;
}

/* Button Styling (Standardized) */
.ipsApp_admin .acpMemberView_message .ipsButton {
  border-radius: 6px;
  font-weight: 700;
  padding: 10px 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  border: none;
}

/* Hide icons inside buttons to maintain clean look */
.ipsApp_admin .acpMemberView_message .ipsButton i,
.ipsApp_admin .acpMemberView_message .ipsButton .fa {
  display: none;
}

/* View Join Answer Button specific style */
.ipsApp_admin .acpMemberView_message .ppxViewJoin {
  background: #0076ff;
  color: #ffffff;
}

.ipsApp_admin .acpMemberView_message .ppxViewJoin::after {
  content: "View Join Answer";
}

/* Use !important sparingly only where core state-based classes must be overridden */
.ipsApp_admin .acpMemberView_message .ipsButton--positive {
  background: #28a745 !important;
}

.ipsApp_admin .acpMemberView_message .ipsButton--negative {
  background: #dc3545 !important;
}

.ipsApp_admin .acpMemberView_message .ipsButton--inherit {
  background: #5b6c7a !important;
  color: #fff !important;
}

html[data-ips-scheme='dark'] .ipsApp_admin .acpMemberView_message .ipsButton--inherit {
  background: #2c313a !important;
}
/* ACP Members list: keep core validation / Spam Defense status compact. The
 * original full status remains available through the native tooltip title set
 * by powerpackextra-validate-list.js. */
body.ipsApp_admin .ipsTable .ppxMemberValidationInlineNotice {
  display: block;
  max-width: 100%;
  margin-top: 0.2rem;
  line-height: 1.25;
  font-size: 0.82em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* Theme Links generated URL table: moved from inline style attributes for CSP safety. */
.ppxThemeLinksTable {
	table-layout: fixed;
	width: 100%;
}
.ppxThemeLinksTable__theme { width: 20%; }
.ppxThemeLinksTable__slug { width: 34%; }
.ppxThemeLinksTable__url { width: 46%; }
.ppxThemeLinkUrlRow {
	display: flex;
	gap: .5rem;
	align-items: center;
	min-width: 0;
}
.ppxThemeLinkUrlInput {
	min-width: 0;
	flex: 1 1 auto;
}


/* Phase 23: ACP utility fallbacks without runtime inline styles. */
.ppxAdminNoticeHidden { display: none !important; }
#elAcpTools_menu .ppxQuickLinksMenu--cols-1 { grid-template-columns: repeat(1, 42px); }
#elAcpTools_menu .ppxQuickLinksMenu--cols-2 { grid-template-columns: repeat(2, 42px); }
#elAcpTools_menu .ppxQuickLinksMenu--cols-3 { grid-template-columns: repeat(3, 42px); }
#elAcpTools_menu .ppxQuickLinksMenu--cols-4 { grid-template-columns: repeat(4, 42px); }
#elAcpTools_menu .ppxQuickLinksMenu--cols-5 { grid-template-columns: repeat(5, 42px); }
#elAcpTools_menu .ppxQuickLinksMenu--cols-6 { grid-template-columns: repeat(6, 42px); }

/* Dynamic ACP logos use real <img> elements so strict CSP does not depend on runtime style attributes. */
body#elLogin .cAcpLoginBox_logo.ppxAcpHasCustomLogo { background-image: none !important; }
body#elLogin .cAcpLoginBox_logo img.ppxAcpLoginCustomLogo {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  filter: none !important;
  margin: 0 auto;
  max-width: 80%;
  max-height: 80px;
  object-fit: contain;
}
#elLogo a.ppxAcpHeaderBrand {
  background-image: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
#elLogo a.ppxAcpHeaderBrand > img.ppxAcpHeaderBrand__image {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#elLogo a.ppxAcpCircularBrand .ppxAcpCircularBrand__logo > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.ppxViewJoin__icon { margin-right: 5px; }
