/*
 * WeaselWorks page shells (loaded only by the plugin's own page templates).
 *  - Standalone managed Workspace page (templates/workspace-app.php)
 *  - Entry / sign-in / no-access page (templates/workspace-entry.php)
 * Organization colors arrive as --wslwks-navy / --wslwks-teal tokens.
 */

/* ---- Standalone Workspace page ---- */
html:has(> body.wslwks-workspace-app-body),
body.wslwks-workspace-app-body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  min-height: 100%;
  background: var(--wslwks-bg, #eee);
}
body.wslwks-workspace-app-body {
  overflow-x: hidden;
}
body.wslwks-workspace-app-body .wslwks-front-wrap {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---- Entry / access states ---- */
body.wslwks-entry-body,
body.wslwks-entry-body * {
  box-sizing: border-box;
}
body.wslwks-entry-body {
  margin: 0;
  background: var(--wslwks-bg, #eee);
  color: var(--wslwks-text, #333);
  font-family:
    Mulish,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}
.wslwks-entry-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 20px;
}
.wslwks-entry-state {
  width: min(520px, 100%);
  min-height: 355px;
  background: var(--wslwks-card, #fff);
  border: 1px solid var(--wslwks-border, #d3d3d3);
  border-radius: 6px;
  padding: 38px 36px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.wslwks-entry-logo {
  width: min(285px, 78%);
  height: auto;
  max-height: 235px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.wslwks-entry-login .wslwks-entry-logo {
  margin-bottom: 28px;
}
.wslwks-entry-message {
  margin-top: 36px;
  font-size: 16px;
  line-height: 1.5;
  color: #5f6e8c;
}
.wslwks-entry-message p {
  margin: 0 0 4px;
}
.wslwks-entry-message p:last-child {
  margin-bottom: 0;
}
.wslwks-entry-message a {
  color: var(--wslwks-navy);
  font-weight: 700;
  text-decoration: none;
}
.wslwks-entry-message a:hover {
  text-decoration: underline;
}
.wslwks-entry-primary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 5px;
  background: var(--wslwks-navy);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  box-shadow: none;
}
.wslwks-entry-primary:hover {
  filter: brightness(0.96);
}
.wslwks-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.wslwks-entry-secondary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 5px;
  border: 1px solid var(--wslwks-navy);
  background: #fff;
  color: var(--wslwks-navy) !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 700;
}
.wslwks-entry-secondary:hover {
  background: #f6f7fb;
}
.wslwks-entry-no-access > .wslwks-entry-secondary {
  margin-top: 22px;
}
@media (max-width: 600px) {
  .wslwks-entry-state {
    min-height: 320px;
    padding: 30px 22px;
  }
  .wslwks-entry-logo {
    width: min(250px, 84%);
  }
  .wslwks-entry-message {
    font-size: 15px;
    margin-top: 30px;
  }
}

/* ---- v1.0.90 WeaselWorks sign-in form (Entry page, signed-out people only) ---- */
.wslwks-entry-state.wslwks-signin {
  width: min(420px, 100%);
  min-height: 0;
  padding: 30px 34px;
  text-align: left;
  align-items: stretch;
  justify-content: flex-start;
}
.wslwks-signin .wslwks-entry-logo {
  width: 150px;
  margin: 0 auto 18px;
}
.wslwks-signin h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  color: #1d2333;
  text-align: center;
}
.wslwks-signin-sub {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.45;
  color: #5f6e8c;
  text-align: center;
}
.wslwks-signin h1 + .wslwks-signin-form,
.wslwks-signin h1 + .wslwks-signin-msg {
  margin-top: 16px;
}
.wslwks-signin-form {
  margin: 0;
}
.wslwks-signin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
}
.wslwks-signin-field label {
  font-size: 13px;
  font-weight: 700;
  color: #333;
}
.wslwks-signin-input {
  position: relative;
}
.wslwks-signin-input input {
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #959595;
  border-radius: 5px;
  background: #fff;
  color: #1d2333;
  font: 15px/1.2 inherit;
  font-family: inherit;
  box-shadow: none;
}
.wslwks-signin-input:has(.wslwks-signin-show) input {
  padding-right: 64px;
}
.wslwks-signin-input input:focus {
  outline: none;
  border-color: var(--wslwks-navy);
  box-shadow: 0 0 0 3px rgba(41, 56, 104, 0.18);
}
.wslwks-signin-show {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--wslwks-navy);
  font: 700 12px/1 inherit;
  font-family: inherit;
  cursor: pointer;
}
.wslwks-signin-show:hover,
.wslwks-signin-show:focus-visible {
  background: #f1f3f8;
}
.wslwks-signin-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 18px;
  font-size: 14px;
}
.wslwks-signin-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #333;
  cursor: pointer;
}
.wslwks-signin-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--wslwks-navy);
}
.wslwks-signin-link {
  color: var(--wslwks-navy) !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
}
.wslwks-signin-link:hover,
.wslwks-signin-link:focus-visible {
  text-decoration: underline !important;
}
.wslwks-entry-primary.wslwks-signin-submit {
  width: 100%;
  min-height: 42px;
  border: 0;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.wslwks-signin-msg {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1.45;
}
.wslwks-signin-msg--error {
  background: #fbe7f0;
  color: #8e1450;
  border-left: 3px solid #be1e69;
}
.wslwks-signin-msg--ok {
  background: #e6f5f6;
  color: #046c73;
  border-left: 3px solid #03838c;
}
.wslwks-signin-back {
  margin: 16px 0 0;
  text-align: center;
}
.wslwks-signin-foot {
  margin: 18px 0 0;
  font-size: 12px;
  color: #6b6b6b;
  text-align: center;
}
@media (max-width: 600px) {
  .wslwks-entry-state.wslwks-signin {
    padding: 26px 22px;
  }
}

/* ---- v1.0.98 Host-theme isolation for the Entry and sign-in card ----
   The Entry page still runs wp_head(), so the site's theme (and other plugins) load their own
   heading and form styles. Some of them use stronger selectors than ours (for example a theme
   font on every h1, or "padding: 0" on every text input), which put the heading in the theme's
   font and the typed text against the field's left edge. These rules pin the card's own
   typography and field geometry. */
body.wslwks-entry-body .wslwks-entry-state,
body.wslwks-entry-body .wslwks-entry-state :is(h1, h2, p, span, label, a, input, button) {
  font-family:
    Mulish,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}
body.wslwks-entry-body .wslwks-signin h1 {
  margin: 0 0 4px !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  font-style: normal !important;
  line-height: 1.25 !important;
  color: #1d2333 !important;
  text-align: center !important;
}
body.wslwks-entry-body .wslwks-signin .wslwks-signin-input input {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 1px solid #959595 !important;
  border-radius: 5px !important;
  background: #fff !important;
  color: #1d2333 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-indent: 0 !important;
  box-shadow: none !important;
}
body.wslwks-entry-body .wslwks-signin .wslwks-signin-input:has(.wslwks-signin-show) input {
  padding-right: 64px !important;
}
body.wslwks-entry-body .wslwks-signin .wslwks-signin-input input:focus {
  outline: none !important;
  border-color: var(--wslwks-navy) !important;
  box-shadow: 0 0 0 3px rgba(41, 56, 104, 0.18) !important;
}
