
/* SimPointClick WordPress front-end portal — full-bleed authoring layout */

.spcwp-public-app {
  position: relative;
  left: 50%;
  width: 95vw;
  max-width: 95vw !important;
  margin-left: -47.5vw;
  margin-right: -47.5vw;
  min-height: calc(100vh - 40px);
  background: #eef2f5;
  color: #111827;
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 1;
}

/* Neutralize common WordPress/theme width constraints around the shortcode. */
.entry-content:has(.spcwp-public-app),
.wp-block-post-content:has(.spcwp-public-app),
.site-main:has(.spcwp-public-app),
.content-area:has(.spcwp-public-app),
main:has(.spcwp-public-app) {
  max-width: none !important;
  width: 100% !important;
}

/* Remove paragraph/block spacing themes may inject around the app. */
.spcwp-public-app,
.spcwp-public-app * {
  box-sizing: border-box;
}

.spcwp-public-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 18px;
  background:#041C2C;
  color:#fff;
  min-height:48px;
}
.spcwp-brand {
  display:flex;
  gap:10px;
  align-items:baseline;
}
.spcwp-brand strong { font-size:20px; }
.spcwp-brand span { opacity:.75; }
.spcwp-user {
  display:flex;
  gap:14px;
  align-items:center;
}
.spcwp-user a { color:#fff; }

.spcwp-toolbar {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  padding:8px 14px;
  min-height:46px;
  background:#fff;
  border-bottom:1px solid #dbe2e7;
}
.spcwp-toolbar button {
  border:1px solid #aeb8c1;
  background:#fff;
  padding:7px 12px;
  border-radius:5px;
  cursor:pointer;
  line-height:1.2;
}
.spcwp-toolbar .spcwp-primary {
  background:#003366;
  color:#fff;
  border-color:#003366;
}
.spcwp-toolbar .spcwp-danger {
  color:#C01933;
}
#spcwp-status {
  margin-left:auto;
  color:#5f6b75;
  white-space:nowrap;
}

/* Horizontal application layout:
   narrow project navigator + the rest of the browser for authoring. */
.spcwp-layout {
  display:grid;
  grid-template-columns: 240px minmax(0, 1fr);
  width:100%;
  height:calc(100vh - 94px);
  min-height:700px;
}

.spcwp-sidebar {
  min-width:0;
  padding:10px;
  background:#fff;
  border-right:1px solid #dbe2e7;
  overflow:auto;
}
.spcwp-sidebar-title {
  font-weight:700;
  margin-bottom:8px;
}
#spcwp-filter {
  width:100%;
  padding:8px;
  margin-bottom:10px;
}
.spcwp-project {
  width:100%;
  text-align:left;
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:9px;
  border:1px solid #dbe2e7;
  background:#fff;
  margin-bottom:7px;
  border-radius:5px;
  cursor:pointer;
}
.spcwp-project.active {
  border-color:#003366;
  box-shadow:0 0 0 1px #003366;
}
.spcwp-project span,
.spcwp-project small {
  color:#65717c;
  font-size:12px;
}
.spcwp-empty {
  padding:12px 4px;
  color:#65717c;
}

.spcwp-editor-shell {
  position:relative;
  min-width:0;
  min-height:0;
  width:100%;
  height:100%;
  background:#111;
  overflow:hidden;
}

#spcwp-editor {
  display:block;
  width:100% !important;
  max-width:none !important;
  height:100% !important;
  min-height:700px;
  border:0;
  background:#fff;
}

/* Login remains centered and intentionally not full-screen authoring UI. */
.spcwp-login-wrap {
  min-height:65vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:30px 15px;
}
.spcwp-login-card {
  width:min(430px,100%);
  padding:28px;
  background:#fff;
  border:1px solid #dbe2e7;
  border-radius:8px;
  box-shadow:0 12px 32px rgba(0,0,0,.08);
  font-family:Arial,Helvetica,sans-serif;
}
.spcwp-login-card h2 {
  margin-top:0;
  color:#003366;
}
.spcwp-login-card label {
  display:block;
  font-weight:700;
  margin-top:10px;
}
.spcwp-login-card input[type=text],
.spcwp-login-card input[type=password] {
  width:100%;
  padding:9px;
}
.spcwp-login-card input[type=submit] {
  background:#003366;
  color:#fff;
  border:0;
  border-radius:5px;
  padding:9px 16px;
  cursor:pointer;
}

/* On smaller screens collapse project list above editor. */
@media (max-width: 900px) {
  .spcwp-layout {
    grid-template-columns:1fr;
    grid-template-rows:auto minmax(650px,1fr);
    height:auto;
  }
  .spcwp-sidebar {
    border-right:0;
    border-bottom:1px solid #dbe2e7;
    max-height:220px;
  }
  .spcwp-editor-shell {
    height:75vh;
    min-height:650px;
  }
  #spcwp-editor {
    min-height:650px;
  }
}


/* Hide the WordPress page/post title on the page hosting Gemini Simulation Builder. */
body:has(.spcwp-public-app) .entry-title,
body:has(.spcwp-public-app) .wp-block-post-title,
body:has(.spcwp-public-app) .page-title,
body:has(.spcwp-public-app) header.entry-header,
body:has(.spcwp-public-app) .wp-block-query-title {
  display: none !important;
}

/* Give the application a little breathing room from the browser edges. */
.spcwp-public-app {
  margin-top: 12px;
  margin-bottom: 18px;
  border-radius: 6px;
}

/* Make sure the iframe/editor itself does not touch the outer edge visually. */
.spcwp-editor-shell {
  padding-right: 6px;
  padding-bottom: 6px;
}


/* Additional title suppression for themes that render the page heading outside
   the normal entry-title/content hierarchy. JavaScript also verifies the exact
   text before hiding it. */
body .entry-title,
body .page-title,
body .wp-block-post-title {
  /* Do not globally hide arbitrary titles here; JS performs exact-text match. */
}


/* Large, unmistakable upload progress overlay. */
.spcwp-upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 28, 44, .62);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.spcwp-upload-overlay.active {
  display: flex;
}
.spcwp-upload-card {
  width: min(520px, calc(100vw - 40px));
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 14px;
  background: #fff;
  color: #111827;
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
}
.spcwp-upload-ring {
  --spc-upload-progress: 0deg;
  width: 118px;
  height: 118px;
  flex: 0 0 118px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(
      #003366 0deg,
      #003366 var(--spc-upload-progress),
      #dbe2e7 var(--spc-upload-progress),
      #dbe2e7 360deg
    );
}
.spcwp-upload-ring-center {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
}
#spcwp-upload-percent {
  color: #003366;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.spcwp-upload-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.spcwp-upload-copy strong {
  color: #003366;
  font-size: 23px;
  line-height: 1.15;
}
#spcwp-upload-file {
  overflow: hidden;
  color: #263746;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#spcwp-upload-detail {
  color: #65717c;
  font-size: 13px;
  line-height: 1.35;
}
