/*
============================================================
FILE: assets/css/tool-float-bar.css
LINKS TO: includes/tool-float-bar.php
PURPOSE: Standalone styles for the floating left tool bar.
NOTES: Own :root and [hidden] rule. Not in aggregator.
       Updated 2026-10-19 (Phase 23 r2): Matched wizard button styling.
============================================================*/
[hidden]{display:none!important}

.tool-bar{
  position:fixed;left:12px;top:110px;bottom:20px;width:56px;
  background:#fff;border:1px solid #c8d1dd;border-radius:10px;
  box-shadow:0 6px 22px rgba(20,40,80,.14);
  z-index:8500;overflow:hidden;
  display:flex;flex-direction:column;
  transition:width .22s ease;
}
.tool-bar.expanded{width:290px}
.tool-bar-toggle{
  position:absolute;right:6px;top:6px;width:32px;height:32px;
  border:0;background:transparent;cursor:pointer;color:#0a1520;
  display:flex;align-items:center;justify-content:center;
  border-radius:6px;font-size:16px;z-index:2;
}
.tool-bar-toggle:hover{background:#eef2f7}
.tool-bar-inner{
  display:flex;flex-direction:column;gap:4px;
  padding:44px 8px 12px;overflow-y:auto;flex:1;
}
.tool-bar.expanded .tool-bar-inner{padding-left:12px;padding-right:12px}
.tool-bar-brand{
  display:flex;align-items:center;gap:10px;padding:6px 4px 10px;
  border-bottom:1px solid #e2e9f2;margin-bottom:6px;
}
.tool-bar-brand-icon{font-size:20px;line-height:1;flex-shrink:0;width:24px;text-align:center}
.tool-bar-brand-label{font-weight:700;font-size:14px;color:#0a1520;white-space:nowrap;opacity:0;transition:opacity .15s}
.tool-bar.expanded .tool-bar-brand-label{opacity:1}

.tool-bar-section{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
.tool-bar-user{
  font-size:11px;color:#5a6875;padding:6px 6px 8px;line-height:1.35;
  white-space:nowrap;opacity:0;transition:opacity .15s;overflow:hidden;
}
.tool-bar.expanded .tool-bar-user{opacity:1;white-space:normal}
.tool-bar-user small{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:#8896a6;font-weight:700}

/* ----- BUTTON STYLING (Matched to Wizard .ra-btn-secondary) ----- */
.tool-bar-action{
  display:flex;align-items:center;gap:10px;
  padding:9px 12px;border-radius:6px;
  background:#fff; /* White background */
  border:1px solid #c8d1dd; /* Light grey border */
  color:#0a1520; /* Dark text */
  font-size:13px;font-weight:600;cursor:pointer;
  text-decoration:none;white-space:nowrap;width:100%;text-align:left;
  font-family:inherit;transition:all .15s;
}
.tool-bar-action:hover{
  background:#f4f8ff;
  border-color:#0050d0;
  color:#0050d0;
}
.tool-bar-icon{font-size:16px;line-height:1;flex-shrink:0;width:22px;text-align:center}
.tool-bar-label{opacity:0;transition:opacity .15s;overflow:hidden;flex-grow:1}
.tool-bar.expanded .tool-bar-label{opacity:1}

/* Primary action (like .ra-btn-primary) */
.tool-bar-action-primary{
  background:linear-gradient(135deg,#0050d0,#0090ff);
  color:#fff;
  border:0;
}
.tool-bar-action-primary:hover{
  filter:brightness(1.08);
  color:#fff;
}
.tool-bar-action-primary .tool-bar-icon{filter:brightness(2)}

/* Collapsible sections */
.tool-bar-section-group{display:flex;flex-direction:column;gap:4px;margin-bottom:4px}
.tool-bar-section-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:6px 6px;font-size:10px;font-weight:800;text-transform:uppercase;
  letter-spacing:.06em;color:#8896a6;cursor:pointer;background:transparent;
  border:0;font-family:inherit;width:100%;text-align:left;border-radius:4px;
  white-space:nowrap;
}
.tool-bar-section-head:hover{color:#3f4a5a}
.tool-bar-section-caret{transition:transform .15s;font-size:9px;flex-shrink:0;opacity:0}
.tool-bar.expanded .tool-bar-section-caret{opacity:1}
.tool-bar-section-group.collapsed .tool-bar-section-caret{transform:rotate(-90deg)}
.tool-bar-section-group.collapsed .tool-bar-section-body{display:none}
.tool-bar-section-body{display:flex;flex-direction:column;gap:6px}
.tool-bar:not(.expanded) .tool-bar-section-head,
.tool-bar:not(.expanded) .tool-bar-section-body{display:none}

/* Action counts */
.tool-bar-action .tool-bar-count{
  margin-left:auto;background:#b3001b;color:#fff;font-size:10px;
  font-weight:700;padding:1px 7px;border-radius:10px;line-height:1.4;
  flex-shrink:0;opacity:0;transition:opacity .15s;
}
.tool-bar.expanded .tool-bar-action .tool-bar-count{opacity:1}

/* To-do widget */
.tool-bar-todo-wrap{order:-1;margin-bottom:6px}
.tool-bar-todo-trigger{
  display:flex;align-items:center;gap:10px;width:100%;padding:9px 12px;
  border:1px solid #c8d1dd;background:#fff;font:inherit;font-size:13px;font-weight:600;
  color:#0a1520;cursor:pointer;border-radius:6px;text-align:left;
  font-family:inherit;position:relative;transition:all .15s;
}
.tool-bar-todo-trigger:hover{background:#f4f8ff;border-color:#0050d0;color:#0050d0}
.tool-bar-todo-trigger .tool-bar-count{
  position:absolute;right:8px;top:50%;transform:translateY(-50%);
  background:#b3001b;color:#fff;font-size:10px;font-weight:700;
  padding:1px 6px;border-radius:10px;line-height:1.4;
}
.tool-bar-todo-trigger .tool-bar-count.zero{display:none}
.tool-bar:not(.expanded) .tool-bar-todo-trigger .tool-bar-label{display:none}

.tool-bar-todo-panel{
  position:fixed;left:80px;top:130px;width:360px;max-height:70vh;overflow:hidden;
  background:#fff;border:1px solid #c8d1dd;border-radius:10px;
  box-shadow:0 8px 30px rgba(20,40,80,.18);z-index:8600;
  display:flex;flex-direction:column;font-family:system-ui,-apple-system,Arial,sans-serif;
}
@media (max-width:900px){
  .tool-bar-todo-panel{left:8px;right:8px;width:auto;top:auto;bottom:80px;max-height:60vh}
}
.tool-bar-todo-tabs{display:flex;border-bottom:1px solid #e2e9f2}
.tool-bar-todo-tab{
  flex:1;padding:10px;background:transparent;border:0;font:inherit;font-size:12px;
  font-weight:700;color:#5a6875;cursor:pointer;border-bottom:2px solid transparent;
  font-family:inherit;
}
.tool-bar-todo-tab:hover{color:#0050d0}
.tool-bar-todo-tab.active{color:#0050d0;border-bottom-color:#0050d0}
.tool-bar-todo-body{padding:10px 12px;overflow-y:auto;flex:1;min-height:80px;max-height:calc(70vh - 90px)}
.tool-bar-todo-body[hidden]{display:none!important}
.tool-bar-todo-item{
  display:block;padding:10px 12px;border-radius:6px;text-decoration:none;
  color:#0a1520;border:1px solid #e2e9f2;margin-bottom:6px;font-size:12px;
  line-height:1.4;background:#fff;
}
.tool-bar-todo-item:hover{background:#f4f8ff;border-color:#cfe0ff;color:#0a1520}
.tool-bar-todo-item.unread{background:#f4f8ff;border-color:#cfe0ff}
.tool-bar-todo-title{font-weight:700;color:#0a1520;margin-bottom:2px}
.tool-bar-todo-meta{color:#5a6875;font-size:11px;margin-top:2px}
.tool-bar-todo-empty{color:#8896a6;font-size:12px;text-align:center;padding:20px 10px;margin:0}
.tool-bar-todo-foot{border-top:1px solid #e2e9f2;padding:8px 12px;text-align:right;min-height:20px}
.tool-bar-todo-foot button{
  background:transparent;border:0;color:#0050d0;font:inherit;font-size:11px;
  font-weight:700;cursor:pointer;padding:0;font-family:inherit;
}
.tool-bar-todo-foot button:hover{text-decoration:underline}

/* Promo card */
.tool-bar-promo-wrap{border-top:1px solid #e2e9f2;padding-top:8px;margin-top:auto}
.tool-promo{
  display:block;text-decoration:none;color:inherit;
  background:#f4f8ff;border:1px solid #cfe0ff;border-radius:8px;
  overflow:hidden;transition:transform .18s,border-color .18s;
}
.tool-promo:hover{transform:translateY(-2px);border-color:#0090ff}
.tool-promo-img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;background:#e6f0ff}
.tool-promo-body{padding:10px 12px}
.tool-promo-name{font-weight:700;font-size:12px;color:#0a1520;line-height:1.3;margin:0 0 6px}
.tool-promo-price{font-size:13px;font-weight:800;color:#0a2540;margin:0}
.tool-promo-price-was{font-size:11px;color:#8896a6;text-decoration:line-through;font-weight:600;margin-left:6px}
.tool-promo-cta{
  display:inline-block;margin-top:8px;font-size:11px;font-weight:700;
  color:#0050d0;text-decoration:none;text-transform:uppercase;letter-spacing:.04em;
}
.tool-promo-button{
  display:block;width:100%;padding:10px;border:0;cursor:pointer;
  background:linear-gradient(135deg,#0050d0,#0090ff);color:#fff;
  font:inherit;font-size:12px;font-weight:700;text-align:center;
}
.tool-bar:not(.expanded) .tool-promo,
.tool-bar:not(.expanded) .tool-bar-user{display:none}

/* Modal */
.tool-lead-modal{position:fixed;inset:0;z-index:9500;display:flex;align-items:center;justify-content:center}
.tool-lead-bg{position:absolute;inset:0;background:rgba(15,25,45,.6)}
.tool-lead-card{
  position:relative;background:#fff;border-radius:12px;
  box-shadow:0 20px 50px rgba(15,25,45,.4);
  max-width:480px;width:92%;padding:28px;max-height:92vh;overflow:auto;
  font-family:system-ui,-apple-system,Arial,sans-serif;color:#111a26;
}
.tool-lead-x{position:absolute;top:10px;right:14px;background:none;border:0;font-size:24px;color:#5a6875;cursor:pointer}
.tool-lead-h{margin:0 0 6px;font-size:20px;color:#0a1520}
.tool-lead-sub{margin:0 0 18px;font-size:13px;color:#3f4a5a;line-height:1.5}
.tool-lead-card label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#3f4a5a;font-weight:700;text-transform:uppercase;letter-spacing:.02em;margin-bottom:12px}
.tool-lead-card input,.tool-lead-card textarea{padding:10px 12px;border:1px solid #c8d1dd;border-radius:6px;font:inherit;font-size:14px;color:#111a26;font-family:inherit;text-transform:none;letter-spacing:normal;font-weight:500}
.tool-lead-card input:focus,.tool-lead-card textarea:focus{outline:2px solid #0050d0;outline-offset:-1px}
.tool-lead-card textarea{resize:vertical;min-height:80px}
.tool-lead-submit{display:block;width:100%;padding:12px;border:0;cursor:pointer;background:linear-gradient(135deg,#0050d0,#0090ff);color:#fff;font:inherit;font-size:14px;font-weight:700;border-radius:6px;margin-top:8px}
.tool-lead-submit:hover{filter:brightness(.96)}
.tool-lead-submit:disabled{opacity:.6;cursor:default}
.tool-lead-status{padding:10px 12px;border-radius:6px;font-size:13px;margin-bottom:10px;font-weight:500}
.tool-lead-status.ok{background:#d4eed4;color:#0a2a0a}
.tool-lead-status.err{background:#fbe0df;color:#7a1a17}

@media (max-width:900px){
  .tool-bar{left:8px;top:auto;bottom:12px;width:56px;height:56px;border-radius:32px;flex-direction:row;overflow:visible}
  .tool-bar.expanded{width:56px;height:auto;border-radius:16px}
  .tool-bar-inner{position:absolute;bottom:0;left:0;right:0;background:#fff;border:1px solid #c8d1dd;border-radius:16px;padding:52px 12px 12px;box-shadow:0 -8px 30px rgba(20,40,80,.2);max-height:70vh}
  .tool-bar:not(.expanded) .tool-bar-inner{display:none}
  .tool-bar.expanded .tool-bar-inner{display:flex}
}
@media print{.tool-bar,.tool-lead-modal,.tool-bar-todo-panel,.pt-tier-modal{display:none!important}}

/* Impersonation - 2026-10-12 */
.tool-bar-impersonating{border:2px solid #ff7a00}
.tool-bar-imp-banner{margin:6px 0 10px;padding:8px 10px;background:#fff3e0;border:1px solid #ffb56b;border-radius:6px;font-size:11px;color:#5a2c00;line-height:1.35;white-space:normal}
.tool-bar-imp-banner strong{color:#7a3d00;font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.tool-bar-imp-stop{display:block;width:100%;margin-top:8px;padding:7px;border:0;border-radius:4px;background:#ff7a00;color:#fff;font:inherit;font-size:12px;font-weight:700;cursor:pointer}
.tool-bar-imp-stop:hover{filter:brightness(.94)}
.tool-bar-imp-wrap{border-top:1px solid #e2e9f2;padding-top:10px;margin-top:8px}
.tool-bar-imp-form{display:block;padding:0 4px}
.tool-bar-imp-select{width:100%;padding:6px 8px;border:1px solid #c8d1dd;border-radius:4px;font:inherit;font-size:11px;background:#fff;color:#0a1520;cursor:pointer}
.tool-bar:not(.expanded) .tool-bar-imp-wrap{display:none}
.tool-bar:not(.expanded) .tool-bar-imp-banner{display:none}
.tool-bar-impersonating .tool-bar-toggle{background:#ffe8c8}