/* JS&A Working Evaluation - lightweight styles (inherits site theme where possible) */

/* ------------------------------------------------------------
   Brand tokens (subtle JS&A-ish teal + warm accent)
   ------------------------------------------------------------ */
:root{
  --jsa-we-brand: #0ea5a8;          /* existing primary */
  --jsa-we-brand-2: #0891b2;        /* deeper teal */
  --jsa-we-accent: #ff6b3d;         /* warm accent (matches your Bookology orange) */
  --jsa-we-ink: #0f172a;            /* slate-ish text */
  --jsa-we-muted: rgba(15, 23, 42, .62);
  --jsa-we-border: rgba(15, 23, 42, .10);
  --jsa-we-bg: #f6fbfb;            /* soft teal-tinted background */
  --jsa-we-card: #ffffff;
  --jsa-we-shadow: 0 10px 30px rgba(2, 6, 23, .06);
  --jsa-we-radius: 12px;
}

.jsa-we-wrap{max-width:1200px;margin:0 auto;}

/* Give the page a little life without forcing the site background */
.jsa-we-wrap{
  background: linear-gradient(180deg, var(--jsa-we-bg) 0%, rgba(255,255,255,0) 50%);
  border-radius: 18px;
  padding: 4px;
}

.jsa-we-header{display:flex;align-items:center;justify-content:space-between;margin:10px 0 16px;}
.jsa-we-header h2{
  margin:0;
  font-size:28px;
  color: var(--jsa-we-ink);
  letter-spacing: -.02em;
  position: relative;
  padding-left: 12px;
}
.jsa-we-header h2:before{
  content:'';
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
  width:4px;
  height:22px;
  border-radius:999px;
  background: linear-gradient(180deg, var(--jsa-we-brand) 0%, var(--jsa-we-brand-2) 100%);
  box-shadow: 0 6px 16px rgba(14,165,168,.35);
}

.jsa-we-card{
  background:var(--jsa-we-card);
  border:1px solid var(--jsa-we-border);
  border-radius:var(--jsa-we-radius);
  padding:16px;
  margin:0 0 16px;
  box-shadow: var(--jsa-we-shadow);
  position: relative;
  overflow: hidden;
}

/* Subtle top glow on cards */
.jsa-we-card:before{
  content:'';
  position:absolute;
  left:0; top:0; right:0;
  height:3px;
  background: linear-gradient(90deg, rgba(14,165,168,.0) 0%, rgba(14,165,168,.55) 20%, rgba(255,107,61,.55) 80%, rgba(255,107,61,0) 100%);
  opacity:.9;
}

.jsa-we-card-title{
  font-weight:800;
  margin-bottom:10px;
  color: var(--jsa-we-ink);
  letter-spacing: -.01em;
}

.jsa-we-context{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
@media(max-width:900px){.jsa-we-context{grid-template-columns:1fr;}}

.jsa-we-context-grid{display:grid;gap:8px;}
.jsa-we-context-row{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:12px;
  padding:6px 0;
  border-bottom:1px solid rgba(15, 23, 42, .06);
}
.jsa-we-context-row:last-child{border-bottom:none;}
.jsa-we-context-label{font-weight:700;color:var(--jsa-we-muted);}
.jsa-we-context-value{color:rgba(15,23,42,.92);word-break:break-word;}

.jsa-we-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.jsa-we-input,.jsa-we-select{
  padding:10px 12px;
  border:1px solid rgba(15, 23, 42, .16);
  border-radius:10px;
  min-width:220px;
  background:#fff;
  color: var(--jsa-we-ink);
  box-shadow: 0 2px 10px rgba(2,6,23,.03);
  transition: box-shadow .12s ease, border-color .12s ease, transform .12s ease;
}
.jsa-we-input:focus,.jsa-we-select:focus{
  outline: none;
  border-color: rgba(14,165,168,.45);
  box-shadow: 0 0 0 4px rgba(14,165,168,.14);
}
.jsa-we-input::placeholder{color: rgba(15,23,42,.45);}

.jsa-we-btn{
  padding:10px 14px;
  border-radius:10px;
  border:1px solid rgba(15,23,42,.16);
  background:#f7f7f7;
  color:var(--jsa-we-ink);
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition: transform .10s ease, box-shadow .10s ease, filter .10s ease, background .10s ease;
}
.jsa-we-btn:hover{
  filter:brightness(.99);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(2,6,23,.08);
}
.jsa-we-btn:active{
  transform: translateY(0px);
  box-shadow: 0 4px 10px rgba(2,6,23,.06);
}
.jsa-we-btn:disabled{opacity:.6;cursor:not-allowed;transform:none;box-shadow:none;}

.jsa-we-btn-primary{
  background: linear-gradient(180deg, var(--jsa-we-brand) 0%, var(--jsa-we-brand-2) 100%);
  color:#fff;
  border-color: rgba(0,0,0,.05);
  box-shadow: 0 10px 22px rgba(14,165,168,.20);
}
.jsa-we-btn-primary:hover{filter:brightness(1.01);}
.jsa-we-btn-light{background:#fff;}

.jsa-we-results{margin-top:12px;}
.jsa-we-result-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:12px;
  margin-bottom:10px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 6px 18px rgba(2,6,23,.05);
}
.jsa-we-result-main{min-width:0;}
.jsa-we-result-title{font-weight:800;margin-bottom:4px;word-break:break-word;color: var(--jsa-we-ink);}
.jsa-we-result-meta{font-size:12px;color:var(--jsa-we-muted);}
.jsa-we-result-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.jsa-we-muted{color:rgba(15,23,42,.55);}

.jsa-we-alert{padding:10px 12px;border-radius:10px;border:1px solid rgba(15,23,42,.10);}
.jsa-we-alert-error{
  background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
  border-color:#f5c2c7;
  color:#842029;
}

/* Informational notice (used when an evaluation is already selected) */
.jsa-we-alert-info{
  background: linear-gradient(180deg, rgba(14,165,168,.10) 0%, #fff 100%);
  border-color: rgba(14,165,168,.35);
  color: rgba(15,23,42,.88);
}

.jsa-we-existing-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:10px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  margin-bottom:10px;
  box-shadow: 0 6px 18px rgba(2,6,23,.05);
}
.jsa-we-existing-title{font-weight:800;color: var(--jsa-we-ink);}
.jsa-we-existing-meta{font-size:12px;color:var(--jsa-we-muted);margin-top:4px;}

/* Optional: make the Open links a touch more branded without changing markup */
.jsa-we-existing-row a.jsa-we-btn-light,
.jsa-we-result-actions a.jsa-we-btn-light{
  border-color: rgba(14,165,168,.25);
}
.jsa-we-existing-row a.jsa-we-btn-light:hover,
.jsa-we-result-actions a.jsa-we-btn-light:hover{
  box-shadow: 0 10px 20px rgba(14,165,168,.10);
}

/* ------------------------------------------------------------
   Dropzone styling (if present from JS)
   ------------------------------------------------------------ */
.jsa-we-dropzone{
  border:2px dashed rgba(14,165,168,.35);
  border-radius:12px;
  padding:14px 14px;
  background: linear-gradient(180deg, rgba(14,165,168,.06) 0%, rgba(255,255,255,.98) 100%);
  cursor:pointer;
  user-select:none;
  transition:all .12s ease;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  box-shadow: 0 6px 18px rgba(2,6,23,.05);
}
.jsa-we-dropzone:hover{background: linear-gradient(180deg, rgba(14,165,168,.08) 0%, rgba(255,255,255,1) 100%);}
.jsa-we-dropzone.is-dragover{
  border-color: rgba(255,107,61,.70);
  background: linear-gradient(180deg, rgba(255,107,61,.10) 0%, rgba(255,255,255,1) 100%);
  box-shadow: 0 12px 26px rgba(255,107,61,.12);
}
.jsa-we-dropzone.is-hasfile{border-style:solid;}
.jsa-we-dropzone .dz-title{font-weight:800;font-size:13px;color:var(--jsa-we-ink);}
.jsa-we-dropzone .dz-sub{font-size:12px;color:var(--jsa-we-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.jsa-we-dropzone .dz-pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(14,165,168,.12);
  color: rgba(14,165,168,.95);
  border:1px solid rgba(14,165,168,.20);
  flex:0 0 auto;
}
.jsa-we-dropzone .dz-error{color:#b00020;}

/* Modal */
.jsa-we-modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:99999;display:flex;align-items:center;justify-content:center;padding:20px;}
.jsa-we-modal{
  width:min(1100px,96vw);
  height:min(78vh,900px);
  background:#fff;
  border-radius:16px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 18px 60px rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.25);
}
.jsa-we-modal-header{
  padding:12px 14px;
  border-bottom:1px solid rgba(15,23,42,.08);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background: linear-gradient(90deg, rgba(14,165,168,.10) 0%, rgba(255,107,61,.06) 100%);
}
.jsa-we-modal-title{font-weight:900;color: var(--jsa-we-ink);}
.jsa-we-modal-body{flex:1;min-height:0;}
#jsa-we-preview-iframe{width:100%;height:100%;}
.jsa-we-modal-footer{
  padding:12px 14px;
  border-top:1px solid rgba(15,23,42,.08);
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
  background: linear-gradient(90deg, rgba(14,165,168,.06) 0%, rgba(255,107,61,.04) 100%);
}

#jsa-we-processing {
  position: fixed;
  inset: 0;
  z-index: 999999; /* above WP admin + modals */
}

#jsa-we-processing .jsa-we-processing__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

#jsa-we-processing .jsa-we-processing__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  min-width: 260px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(15,23,42,.10);
}

#jsa-we-processing .jsa-we-processing__text {
  font-size: 14px;
  font-weight: 800;
  color: var(--jsa-we-ink);
}

#jsa-we-processing .jsa-we-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(15,23,42,0.15);
  border-top-color: rgba(14,165,168,0.95);
  animation: jsaWeSpin 0.8s linear infinite;
}

@keyframes jsaWeSpin {
  to { transform: rotate(360deg); }
}
.jsa-we-help-spell{
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(0,0,0,.65);
}
.jsa-we-subsection { margin-top: 14px; }
.jsa-we-subtitle {
  font-weight: 800;
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 8px;
}
.jsa-we-muted { color: #64748b; font-size: 13px; }

.jsa-we-services {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.jsa-we-service-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
.jsa-we-service-row:last-child { border-bottom: 0; }

.jsa-we-service-label { color: #334155; font-size: 13px; font-weight: 600; }
.jsa-we-service-value { color: #0f172a; font-size: 13px; font-weight: 900; }
.jsa-we-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.jsa-we-card-head .jsa-we-card-title{ margin-bottom:0; }
#jsa-we-lock-btn{ white-space:nowrap; }


/* Danger / destructive action */
.jsa-we-btn-danger{
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color:#fff;
  border-color: rgba(0,0,0,.05);
}
.jsa-we-btn-danger:hover{filter:brightness(1.01);}

.jsa-we-existing-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.jsa-we-service-row.has-warning {
  background: #fffbeb;
  border-radius: 10px;
  padding-left: 8px;
  padding-right: 8px;
}
.jsa-we-inline-warning {
  display: inline-flex;
  align-items: center;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
