/* Lease template upload / editor modal styling (import tabs, dropzone, AI placeholder button, WYSIWYG). The second
   half of the Lease Builder CSS; linked after esign.css, where these rules used to sit. */
  #lz-tpl-detected .det-chip {
    display:inline-block; padding:3px 8px; margin:2px 4px 2px 0; font-size:11px;
    background:var(--bg2); border:1px solid var(--border); border-radius:10px; color:var(--text2);
  }
  #lz-tpl-detected .det-chip.repeat { background:#dbeafe; color:#1e40af; border-color:#93c5fd; }

  /* Import-mode tabs */
  .lz-import-tabs { display:flex; gap:6px; margin-bottom:14px; }
  .lz-import-tabs .lz-tab {
    flex:1 1 0; min-width:0; padding:12px 14px;
    border:1px solid var(--border2); background:var(--bg);
    color:var(--text2); cursor:pointer; border-radius:8px;
    display:flex; flex-direction:column; align-items:flex-start; gap:4px;
    font-size:13px; font-weight:600; transition:all 0.12s;
  }
  .lz-import-tabs .lz-tab:hover { border-color:var(--accent); color:var(--text); }
  .lz-import-tabs .lz-tab.active { border-color:var(--accent); background:var(--accent); color:#fff; }
  .lz-import-tabs .lz-tab.active .lz-tab-hint { color:rgba(255,255,255,0.85); }
  .lz-import-tabs .lz-tab i { width:16px; height:16px; }
  .lz-import-tabs .lz-tab-hint { font-size:10px; font-weight:500; color:var(--text3); text-transform:uppercase; letter-spacing:0.4px; }
  .lz-import-pane { background:var(--bg2); border-radius:6px; padding:12px 14px; margin-bottom:14px; }
  #lz-pane-docx {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    border: 1px solid rgba(200,220,255,0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 2px 8px rgba(20,50,140,0.08);
    border-radius: 10px;
  }
  .lz-import-hint { font-size:12px; color:var(--text2); line-height:1.5; }
  .lz-import-hint kbd {
    background:var(--bg); border:1px solid var(--border2); border-radius:3px;
    padding:1px 5px; font-family:monospace; font-size:11px;
  }
  .lz-warn-banner {
    display:flex; gap:10px; padding:10px 12px; margin-bottom:8px;
    background:#fef3c7; color:#78350f; border:1px solid #fcd34d; border-radius:6px;
    font-size:12px; line-height:1.5;
  }
  .lz-warn-banner i { flex-shrink:0; color:#b45309; margin-top:2px; }

  /* File dropzone — matches the app's screening drop style */
  .lz-dropzone {
    margin-top:10px; border:2px dashed var(--border2); border-radius:10px;
    padding:24px 16px; text-align:center; cursor:pointer; background:var(--bg);
    transition:border-color 0.15s, background 0.15s;
  }
  .lz-dropzone:hover { border-color:var(--accent); background:var(--bg2); }
  .lz-dropzone.dragover { border-color:var(--accent); background:rgba(60,120,255,0.07); }
  .lz-dropzone .lz-dz-icon {
    width:42px; height:42px; margin:0 auto 8px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    background:var(--bg2); color:var(--accent);
  }
  .lz-dropzone .lz-dz-icon i { width:20px; height:20px; }
  .lz-dropzone .lz-dz-title { font-size:13px; font-weight:600; color:var(--text); }
  .lz-dropzone .lz-dz-title .lz-dz-browse { color:var(--accent); text-decoration:underline; }
  .lz-dropzone .lz-dz-sub { font-size:11px; color:var(--text3); margin-top:3px; }
  .lz-dropzone.has-file { border-style:solid; border-color:var(--accent); }
  .lz-dropzone.has-file .lz-dz-icon { background:rgba(60,120,255,0.12); }

  /* AI auto-placeholder button */
  .lz-ai-ph {
    display:inline-flex; align-items:center; gap:6px; padding:7px 12px;
    border:1px solid var(--accent); border-radius:7px; cursor:pointer;
    font-size:12px; font-weight:600; color:#fff;
    background:linear-gradient(135deg,#6d5efc,#4f7bff);
    transition:opacity 0.12s, transform 0.06s;
  }
  .lz-ai-ph:hover { opacity:0.92; }
  .lz-ai-ph:active { transform:translateY(1px); }
  .lz-ai-ph:disabled { opacity:0.55; cursor:default; }
  .lz-ai-ph i { width:15px; height:15px; }
  .lz-ai-ph-row { display:flex; align-items:center; gap:10px; margin:14px 0 6px; flex-wrap:wrap; }
  .lz-ai-ph-note { font-size:11px; color:var(--text3); }

  .lz-meta-row { display:flex; gap:6px; margin:14px 0; }
  .lz-meta-row > div { flex:0 0 auto; overflow:hidden; }
  .lz-meta-row > div .form-input { width:100%; box-sizing:border-box; }
  .lz-meta-row > div:nth-child(1) { width:170px; }
  .lz-meta-row > div:nth-child(2) { width:170px; }
  .lz-meta-row > div:nth-child(3) { width:170px; }
  @media (max-width: 640px) { .lz-meta-row { flex-wrap:wrap; } .lz-meta-row > div { flex:1 1 100%; width:auto !important; } }
  .lz-meta-row label { font-size:11px; color:var(--text2); display:block; margin-bottom:3px; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; }

  /* WYSIWYG toolbar */
  .lz-toolbar {
    display:flex; gap:4px; align-items:center; flex-wrap:wrap;
    padding:6px; background:var(--bg2); border:1px solid var(--border2);
    border-bottom:none; border-radius:6px 6px 0 0;
  }
  .lz-tb {
    width:30px; height:28px; padding:0; border:1px solid transparent; background:transparent;
    color:var(--text); cursor:pointer; border-radius:4px; font-size:13px;
    display:inline-flex; align-items:center; justify-content:center;
  }
  .lz-tb:hover { background:var(--bg); border-color:var(--border); }
  .lz-tb.active { background:var(--accent); color:#fff; border-color:var(--accent); }
  .lz-tb-sep { width:1px; height:18px; background:var(--border); margin:0 2px; }
  .lz-tb-select {
    height:28px; padding:0 8px; font-size:11px; background:var(--bg);
    border:1px solid var(--border); border-radius:4px; color:var(--text2); cursor:pointer;
    margin-left:auto;
  }

  /* WYSIWYG body */
  .lz-wysiwyg {
    min-height:280px; max-height:50vh; overflow-y:auto;
    padding:14px 18px; border:1px solid var(--border2); border-top:none;
    border-radius:0 0 6px 6px; background:var(--bg);
    font: 13px/1.55 'Times New Roman', Times, serif; color:var(--text);
    outline:none; -webkit-user-select:text; user-select:text;
  }
  .lz-wysiwyg p { margin:0 0 10px; }
  .lz-wysiwyg h1, .lz-wysiwyg h2, .lz-wysiwyg h3 { font-weight:bold; margin:14px 0 6px; font-family:Arial,Helvetica,sans-serif; }
  .lz-wysiwyg h1 { font-size:15px; }
  .lz-wysiwyg h2 { font-size:13px; }
  .lz-wysiwyg ul, .lz-wysiwyg ol { margin:6px 0 10px 24px; }
  .lz-wysiwyg li { margin:2px 0; }
  .lz-wysiwyg table { border-collapse:collapse; margin:6px 0; }
  .lz-wysiwyg td, .lz-wysiwyg th { border:1px solid var(--border); padding:4px 8px; }
  .lz-wysiwyg .ph {
    background:#dbeafe; color:#1e40af; padding:1px 5px; border-radius:3px;
    font-family: 'SFMono-Regular', Consolas, monospace; font-size:88%; white-space:nowrap;
  }
  .lz-wysiwyg:empty::before {
    content: attr(data-placeholder);
    color: var(--text3); pointer-events:none; display:block;
  }

