/* CALE control polish. Loaded after style.css; all behaviors stay in app.js. */

/* Cohesive neutral theme slider on every workspace page */
.theme-quick-toggle{width:56px;min-width:56px;height:32px}
.theme-toggle-track{width:56px;height:32px;padding:0 9px;border-radius:999px;
  background:#f0ede7;border-color:#ded9d0}
.theme-toggle-icon{font-size:12px;color:#8d8275}
.theme-toggle-knob,html[data-theme="light"] .theme-toggle-knob{
  left:3px;top:3px;width:24px;height:24px;transform:translateX(0);
  background:#c8bdad;box-shadow:0 1px 3px rgba(35,31,25,.14)}
html[data-theme="light"] .theme-toggle-track{background:#f0ede7}
html[data-theme="light"] .theme-toggle-icon-moon,
html[data-theme="light"] .theme-toggle-icon-sun{color:#8d8275}
html[data-theme="dark"] .theme-toggle-track{
  background:#322f2a!important;border-color:#514b42!important}
html[data-theme="dark"] .theme-toggle-knob{
  transform:translateX(24px);background:#c9bdaa!important;
  box-shadow:0 1px 4px rgba(0,0,0,.25)!important}
html[data-theme="dark"] .theme-toggle-icon-moon,
html[data-theme="dark"] .theme-toggle-icon-sun{color:#bfb5a6!important}

/* Find only: more horizontal room without widening Dashboard or Settings. */
.app-content.find-content-wide{max-width:1260px}
#app-find .prompt-wrap{width:100%;max-width:1040px;margin:20px auto 0}
#app-find .prompt{
  border-radius:17px;
  padding:14px 17px 12px;
}
#app-find .prompt textarea{
  display:block;
  box-sizing:border-box;
  width:100%;
  height:62px;
  min-height:62px;
  max-height:104px;
  padding:13px 12px 8px;
  font-size:18px;
  line-height:1.45;
  resize:none;
  overflow-y:auto;
}
#app-find .prompt textarea::-webkit-resizer{display:none}
#app-find .lead-search-options{
  gap:16px;
  margin:0 11px;
  padding:9px 3px 8px;
}
#app-find .prompt-bottom{
  gap:12px;
  padding:8px 11px 9px;
}
#app-find #appFindBtn{min-height:34px;padding:7px 15px;border-radius:9px;box-shadow:none}
/* Find hero: compact introduction so search remains the primary action. */
#app-find .find-hero{
  min-height:186px;
  padding:21px 34px;
  gap:22px;
  margin-bottom:16px;
  border-radius:20px;
  background:linear-gradient(120deg,#fff 0%,#fcfcfc 63%,#f3f8fa 100%);
  box-shadow:0 4px 20px rgba(40,60,75,.025);
}
#app-find .find-hero .eyebrow{margin-bottom:9px}
#app-find .find-hero h1{font-size:32px;line-height:1.07;letter-spacing:-.045em}
#app-find .find-hero p{margin-top:10px;font-size:11.5px;line-height:1.5}
#app-find .find-capabilities{margin-top:13px}
#app-find .find-capability{padding:5px 9px}
#app-find .find-hero-visual{min-height:136px}
#app-find .find-orbit{
  width:132px;height:132px;top:2px;right:37px;
  box-shadow:0 12px 26px rgba(70,145,180,.06);
}
#app-find .find-orbit::before{inset:18px}
#app-find .find-orbit-core{width:58px;height:58px;border-radius:19px;font-size:19px}
#app-find .find-orbit-node{padding:5px 7px;font-size:7px}
@media(max-width:900px){
  #app-find .find-hero{padding:24px}
  #app-find .find-hero-visual{min-height:120px}
  #app-find .find-orbit{left:50%;right:auto;transform:translateX(-50%)}
}
@media(max-width:600px){
  #app-find .find-hero{padding:20px}
  #app-find .find-hero h1{font-size:29px}
  #app-find .find-hero-visual{display:none}
}

/* Align the four Find workflow stages with the hero and search prompt. */
#app-find .find-workflow-steps{width:100%;max-width:1040px}
#app-find .find-workflow-steps .find-stage{min-height:108px;padding:18px 19px}
#app-find .find-workflow-steps .find-stage .num{
  font-size: 10px;
  margin-bottom: 7px;
}

#app-find .find-workflow-steps .find-stage strong{
  font-size: 13px;
  line-height: 1.3;
  margin-bottom: 6px;
}

#app-find .find-workflow-steps .find-stage small{
  font-size: 10px;
  line-height: 1.45;
}
#app-find .panel{max-width:1510px}

/* 10 / 20 / 40 / 60 selection */
#app-find .lead-limit-group{padding:3px;gap:3px;border:1px solid #ddd9cf;
  background:#f4f2ed;border-radius:10px}
#app-find .lead-limit-btn{height:29px;min-width:37px;padding:0 10px;
  border-radius:7px;color:#77736b;background:transparent;box-shadow:none}
#app-find .lead-limit-btn:hover{color:#302d26;background:#e9e6df}
#app-find .lead-limit-btn.active{background:#ded8ce;color:#302d26;
  box-shadow:0 1px 3px rgba(45,36,24,.08)}
#app-find .lead-limit-btn:focus-visible{outline:2px solid #a49278;outline-offset:2px}

/* Email/Socials switches — existing checkbox and change handlers retained */
#app-find .lead-switch-control{min-height:35px;padding:0 11px;
  border-radius:10px;border:1px solid #ddd9cf;background:#f9f8f5;gap:9px}
#app-find .lead-switch-control:hover{border-color:#c9c4b8;background:#f2efe9}
#app-find .lead-switch-track{width:31px;height:18px;flex-basis:31px;
  background:#e9e6df;border:1px solid #d2cec4;border-radius:999px}
#app-find .lead-switch-thumb{width:12px;height:12px;top:2px;left:2px;
  background:#fffefa;border:1px solid #e0dace}
#app-find .lead-switch-control input:checked + .lead-switch-track{
  background:#c6bbaa;border-color:#b7aa95}
#app-find .lead-switch-control input:checked + .lead-switch-track .lead-switch-thumb{
  transform:translateX(13px)}
#app-find .lead-switch-control input:focus-visible + .lead-switch-track{
  outline:2px solid #a49278;outline-offset:2px}
#app-find .lead-switch-label,
#app-find .lead-switch-control input:checked ~ .lead-switch-label{
  color:#4d4a43;font-weight:600}
#app-find .lead-switch-control.is-disabled{opacity:.42;cursor:not-allowed}

/* Dark: matching beige/charcoal rather than saturated green */
html[data-theme="dark"] #app-find .lead-limit-group{
  background:#292722!important;border-color:#474139!important}
html[data-theme="dark"] #app-find .lead-limit-btn{
  color:#b6aa99!important;background:transparent!important}
html[data-theme="dark"] #app-find .lead-limit-btn:hover{
  color:#f5ede1!important;background:#38332c!important}
html[data-theme="dark"] #app-find .lead-limit-btn.active{
  color:#efe5d8!important;background:#574d40!important;box-shadow:none!important}
html[data-theme="dark"] #app-find .lead-switch-control{
  background:#262520!important;border-color:#474239!important;color:#e7dfd2!important}
html[data-theme="dark"] #app-find .lead-switch-control:hover{
  background:#333029!important;border-color:#645b4e!important}
html[data-theme="dark"] #app-find .lead-switch-track{
  background:#433e36!important;border-color:#62594e!important}
html[data-theme="dark"] #app-find .lead-switch-control input:checked + .lead-switch-track{
  background:#8e806d!important;border-color:#ad9b82!important}
html[data-theme="dark"] #app-find .lead-switch-thumb{
  background:#eee8df!important;border-color:#e6dfd5!important}
html[data-theme="dark"] #app-find .lead-switch-label,
html[data-theme="dark"] #app-find .lead-switch-control input:checked ~ .lead-switch-label{
  color:#e0d6c7!important}

@media(max-width:700px){
  .app-content.find-content-wide{padding:28px 16px 50px}
  #app-find .prompt-wrap{margin-top:20px}
  #app-find .prompt{padding:10px}
  #app-find .prompt textarea{height:62px;min-height:62px;font-size:16px}
  #app-find .lead-search-options{margin:0 5px;padding:10px 0;gap:10px}
  #app-find .prompt-bottom{padding:10px 5px}
}
@media(prefers-reduced-motion:reduce){.theme-toggle-track,.theme-toggle-knob{transition:none}}


/* Actions inside the four Find workflow panels follow the current theme. */
#app-find .find-stage-runtime{margin:0 0 14px;color:var(--theme-text-soft,#777);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#app-find .find-stage-action{display:inline-flex;align-items:center;justify-content:center;margin-top:12px;max-width:100%;padding:8px 12px;border:1px solid var(--theme-border,#d8d2c9);border-radius:10px;background:var(--theme-surface,#fff);color:var(--theme-text,#222);font-family:inherit;font-size:12px;font-weight:600;line-height:1.4;text-align:left;cursor:pointer;white-space:normal}
#app-find .find-stage-action:hover:not(:disabled){background:var(--theme-surface-hover,#f2f3ef);border-color:var(--theme-text-soft,#777)}
#app-find .find-stage-action:focus-visible{outline:2px solid #7fada0;outline-offset:3px}
#app-find .find-stage-action:disabled{opacity:.5;cursor:default}
#app-find .find-stage-detail-main{min-width:0}

/* An ended search with a shortfall must not display the completed checkmark. */
#app-find .find-workflow-steps .find-stage.is-partial{opacity:1;background:var(--theme-surface-soft);border-color:var(--theme-border)}
#app-find .find-workflow-steps .find-stage.is-partial .num{color:var(--theme-text-muted)}

/* Public company social profiles; source and match strength stay visible. */
#app-find .lead-socials{margin:12px 0;padding:12px;border:1px solid var(--theme-border);border-radius:14px;background:var(--theme-surface-soft);color:var(--theme-text);overflow-wrap:anywhere}
#app-find .lead-socials-heading{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px;font-size:12px}
#app-find .lead-socials-heading small,#app-find .lead-socials-status,#app-find .lead-socials-list small{color:var(--theme-text-soft);font-size:11px;line-height:1.5}
#app-find .lead-socials-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin:10px 0;padding:0;list-style:none}
#app-find .lead-socials-list li{display:flex;flex-direction:column;align-items:flex-start;gap:3px}
#app-find .lead-socials a{color:var(--theme-text);font-size:12px;text-decoration:underline;text-underline-offset:3px}
#app-find .lead-socials a.lead-socials-source{font-size:10px;color:var(--theme-text-soft)}
#app-find .lead-socials .lead-socials-button{margin-top:8px;background:var(--theme-surface);border-color:var(--theme-border);color:var(--theme-text);font-size:11px;white-space:normal}
#app-find .lead-socials .lead-socials-button:hover:not(:disabled){background:var(--theme-surface-hover);color:var(--theme-text);border-color:var(--theme-border-strong)}
#app-find .lead-socials .lead-socials-button:disabled{opacity:.5;cursor:default}
#app-find #socialsAvailability[hidden]{display:none!important}

/* Saved social profiles shared by Searches and Campaigns. */
.workspace-socials {
  margin: 12px 0; padding: 14px 16px; border: 1px solid var(--theme-border, var(--line, #dedbd5));
  border-radius: 16px; background: var(--theme-surface, var(--surface, #fff)); color: var(--theme-text, var(--text, #171717));
}
.workspace-socials-heading, .workspace-socials-profiles { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.workspace-socials-heading { justify-content: space-between; margin-bottom: 12px; }
.workspace-social-profile { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.workspace-socials a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.workspace-socials small, .workspace-social-source, .workspace-socials p { color: var(--theme-text-muted, var(--muted, #777)); font-size: 12px; }
.workspace-socials p { margin: 12px 0 0; }
.workspace-socials a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 3px; }
@media (max-width: 600px) { .workspace-socials { padding: 12px; } .workspace-social-profile { min-width: 0; flex-basis: 100%; } }

.monthly-usage-section { margin: 24px 0; padding: 20px; border: 1px solid var(--theme-border, var(--line)); border-radius: 14px; color: var(--theme-text, var(--text)); }
.monthly-usage-section[hidden] { display: none !important; }
.monthly-usage-section h3 { margin: 0 0 10px; font-size: 16px; }
.monthly-usage-section .usage-note { margin: 8px 0 0; color: var(--theme-text-muted, var(--muted)); font-size: 12px; line-height: 1.6; }
@media (max-width: 600px) { .monthly-usage-section { padding: 16px; } }
