/* Shared PHP shell adjustments, loaded after the original site styles. */
.php-staging-note{padding:3px 12px;background:#fff3cd;color:#633c00;text-align:center;font-size:11px;line-height:1.4}
.header-search #suggestions:empty,.header-search #search-status:empty{display:none}
.header-search #suggestions{list-style:none;margin:0;padding:0}
/* Keep the main search prominent and readable across public and admin pages. */
.search-site-header #lookup{
  padding:10px 12px;
  border:1px solid #adc4e5;
  border-top:3px solid #285ba8;
  border-left:4px solid #b91f40;
  border-radius:14px;
  background:linear-gradient(115deg,#eaf2ff,#f8fbff 62%,#fff);
  box-shadow:0 5px 18px #173e7a20;
}
.search-site-header #lookup:focus-within{border-color:#285ba8;box-shadow:0 0 0 3px #285ba827,0 6px 20px #173e7a20}
.search-site-header #lookup>label{
  display:block;position:static;width:auto;height:auto;padding:0;margin:0 0 7px;
  overflow:visible;clip-path:none;white-space:normal;
  color:#173e7a;font-size:.88rem;font-weight:750;line-height:1.35;
}
.search-site-header #lookup .search-field-row{display:flex;flex-direction:row;align-items:stretch;gap:10px;min-width:0}
.search-site-header #lookup .search-field{position:relative;flex:1;min-width:0}
.search-site-header #lookup input{
  width:100%;min-width:0;height:50px;min-height:50px;
  padding:11px 13px 11px 48px;border:2px solid #789acb;border-radius:10px;
  background:#fff;color:#172d4e;font-size:16px;line-height:1.4;box-shadow:0 2px 4px #173e7a08;
}
.search-site-header #lookup input::placeholder{color:#566b88;opacity:1}
.search-site-header #lookup input:focus{border-color:#285ba8;outline:2px solid #285ba833;outline-offset:1px}
.search-site-header #lookup .search-symbol{
  display:flex;align-items:center;justify-content:center;top:50%;left:11px;transform:translateY(-50%);
  width:27px;height:29px;border-radius:7px;background:#e8f0fc;color:#2459a8;font-size:21px;font-weight:800;line-height:1;
}
.search-site-header #lookup .search-submit{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;flex:0 0 auto;
  width:auto;min-width:112px;min-height:50px;margin:0;padding:10px 17px;
  border:1px solid #184684;border-radius:10px;background:linear-gradient(135deg,#2b65bc,#17498f);
  color:#fff;font-size:1rem;font-weight:750;line-height:1.2;box-shadow:0 3px 7px #173e7a29;
}
.search-site-header #lookup .search-button-text{
  position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip-path:none;white-space:nowrap;
}
.search-site-header #lookup .search-submit:hover{background:linear-gradient(135deg,#245aaa,#133e7b)}
.search-site-header #lookup .search-submit:focus-visible{outline:3px solid #b91f40;outline-offset:3px}
html[data-theme="dark"] .search-site-header #lookup{background:linear-gradient(115deg,#172a47,#142238);border-color:#5275a5;border-left-color:#ef7692;box-shadow:0 5px 18px #0005}
html[data-theme="dark"] .search-site-header #lookup>label{color:#e4eeff}
html[data-theme="dark"] .search-site-header #lookup input{background:#0f1e33;color:#f3f7ff;border-color:#7192bf}
html[data-theme="dark"] .search-site-header #lookup input::placeholder{color:#b4c6df}
html[data-theme="dark"] .search-site-header #lookup .search-symbol{background:#263e61;color:#d9e8ff}
@media(max-width:600px){
  .search-site-header #lookup{padding:8px;border-radius:12px}
  .search-site-header #lookup>label{margin-bottom:6px;font-size:.8rem}
  .search-site-header #lookup .search-field-row{gap:7px}
  .search-site-header #lookup input{height:46px;min-height:46px;padding-left:39px;padding-right:8px}
  .search-site-header #lookup .search-symbol{left:8px;width:23px;height:26px;font-size:19px}
  .search-site-header #lookup .search-submit{min-width:80px;min-height:46px;padding:9px 10px;gap:5px;font-size:.88rem}
}
.hashtag-summary-card h1{--tag-title-fluid:14}
.php-network-0{border-left-color:#92400e!important}.php-network-0 strong{color:#92400e}
.php-network-1{border-left-color:#2154a0!important}.php-network-1 strong{color:#2154a0}
.php-network-2{border-left-color:#854d0e!important}.php-network-2 strong{color:#854d0e}
.php-network-3{border-left-color:#116647!important}.php-network-3 strong{color:#116647}
.php-network-4{border-left-color:#6d28a5!important}.php-network-4 strong{color:#6d28a5}
.php-network-5{border-left-color:#a12d55!important}.php-network-5 strong{color:#a12d55}
.php-network-6{border-left-color:#2459a8!important}.php-network-6 strong{color:#2459a8}
.php-network-7{border-left-color:#0e647c!important}.php-network-7 strong{color:#0e647c}

.ai-settings-panel{max-width:780px;margin:20px auto;padding:18px;border:1px solid #adc4e5;border-radius:12px;background:var(--surface,#fff)}
.ai-settings-panel label{display:block;font-weight:700;margin-bottom:6px}
.ai-settings-panel input{box-sizing:border-box;width:100%;min-height:46px;padding:10px;border:2px solid #789acb;border-radius:8px;font-size:16px}
.ai-settings-panel button{margin:4px 4px 4px 0;min-height:44px}
.ai-settings-panel #ai-key-state{padding:10px;border-left:3px solid #285ba8;background:#285ba812;overflow-wrap:anywhere}
html[data-theme="dark"] .ai-settings-panel{background:#142238;color:#e4eeff}

.admin-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.admin-header-actions[hidden]{display:none}.admin-header-actions .admin-cache-button{background:#e8f5f0;color:#12634a;border:1px solid #9ccebb}.admin-header-actions .admin-logout-button{background:#b91f40;color:#fff;border:1px solid #b91f40}.admin-header-actions [role="status"]{flex-basis:100%;text-align:right;font-size:12px;max-width:420px}.admin-header-actions button:disabled{opacity:.6;cursor:wait}@media(max-width:600px){.admin-site-header .header-tools{flex-wrap:wrap;justify-content:flex-end}.admin-header-actions{gap:5px}.admin-header-actions .button{padding:7px 10px;font-size:12px}}

/* Admin-only visibility switch; wraps with the existing compact controls. */
.tag-active-switch input[role="switch"]{appearance:none;-webkit-appearance:none;width:38px;height:22px;min-width:38px;margin:0;position:relative;border:1px solid #a9b3c3;border-radius:20px;background:#697386;vertical-align:middle;cursor:pointer;transition:background .15s}
.tag-active-switch input[role="switch"]:before{content:"";position:absolute;width:16px;height:16px;left:2px;top:2px;border-radius:50%;background:white;box-shadow:0 1px 3px #0003;transition:transform .15s}
.tag-active-switch input[role="switch"]:checked{background:#16764b;border-color:#16764b}
.tag-active-switch input[role="switch"]:checked:before{transform:translateX(16px)}
.tag-active-switch input[role="switch"]:focus-visible{outline:3px solid #92baff;outline-offset:3px}
.tag-active-switch input[role="switch"]:disabled{opacity:.55;cursor:wait}
.admin-readable-tag{font-size:1.0625rem;font-weight:700;line-height:1.35;text-decoration:none}
.admin-readable-tag:hover{text-decoration:underline}
.admin-table .admin-hashtag-row .admin-readable-tag .hashtag-label{font-size:1.0625rem;line-height:1.35}
.admin-row-visibility{display:inline-flex;flex-direction:column;gap:3px;max-width:240px}
.admin-row-visibility .tag-active-switch{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font-size:.8rem;margin:0}
.admin-row-visibility [role="alert"]{white-space:normal;font-size:.75rem;margin:0}
/* Keep bilingual taxonomy labels on separate, aligned lines. */
.taxonomy-dense-grid>a.admin-card{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:4px;padding:9px 10px;text-align:start}
.taxonomy-dense-grid>a.admin-card>strong{display:block;font-size:1rem;line-height:1.35;font-weight:700;margin:0}
.taxonomy-dense-grid>a.admin-card>small{display:block;font-size:.85rem;line-height:1.6;color:var(--muted);margin:0}
.taxonomy-parent-label{display:block;font-size:.75rem;line-height:1.4;color:var(--muted);border-top:1px solid #8195b329;padding-top:4px;margin-top:2px}
.taxonomy-children{margin:12px 0 22px;padding:12px;border:1px solid #d8e2ef;border-radius:12px;background:var(--surface)}
.taxonomy-children h2{margin:0 0 10px;font-size:1.15rem}.taxonomy-children>.button{margin-top:10px}
section[aria-label="HashTags AI workflow"] article>:is(div,label):first-child>:is(a,strong){font-size:17px;font-weight:700;line-height:1.35;min-width:0;overflow-wrap:anywhere}
/* Compact editor dock: distinct settings and left-to-right review actions. */
.admin-editor.admin-form .admin-submit-bar{gap:8px;padding:8px;border-color:#bdcadc;align-items:stretch}
.admin-editor.admin-form .admin-submit-bar .admin-submit-options{gap:8px;margin:0}
.admin-editor.admin-form .admin-submit-bar .admin-choice-card{--choice-tone:#285ba8;--choice-bg:#edf4ff;display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 10px;border:1px solid var(--choice-tone);border-left:4px solid var(--choice-tone);border-radius:8px;background:var(--choice-bg);color:#193552;box-shadow:0 1px 2px #17345d14;line-height:1.3}
.admin-editor.admin-form .admin-submit-bar .admin-uppercase-choice{--choice-tone:#a66a12;--choice-bg:#fff6e5}
.admin-editor.admin-form .admin-submit-bar .admin-publish-choice{--choice-tone:#18805a;--choice-bg:#eaf8f0}
.admin-editor.admin-form .admin-submit-bar .admin-choice-card strong{font-size:14px;line-height:1.3}
.admin-editor.admin-form .admin-submit-bar .admin-choice-card input{width:20px;height:20px;min-height:20px;flex:0 0 20px;margin:0;accent-color:var(--choice-tone)}
.admin-editor.admin-form .admin-submit-bar .admin-choice-card:has(:checked){box-shadow:inset 0 0 0 1px var(--choice-tone),0 1px 2px #17345d14}
.admin-editor.admin-form .admin-submit-bar .admin-choice-card:focus-within{outline:2px solid var(--choice-tone);outline-offset:2px}
.admin-editor.admin-form .admin-submit-bar>.button{min-height:44px;min-width:0;padding:8px 12px;font-size:14px;border-radius:8px;align-self:stretch;line-height:1.3}
.admin-editor.admin-form .admin-submit-bar>.admin-submit-help{grid-column:1/-1;grid-row:auto;margin:0}
.admin-editor.admin-form .admin-submit-bar>.admin-lock-status{grid-column:1/-1;grid-row:auto;margin:0}
.admin-editor.admin-form .admin-submit-bar .admin-submit-tag-card{min-width:0;margin:0;align-content:center}
.admin-editor.admin-form .admin-submit-bar .admin-submit-meaning-card{margin:0;align-content:center}
@media(min-width:1400px){
 .admin-editor.admin-form .admin-submit-bar{grid-template-columns:90px minmax(150px,1fr) 150px 175px minmax(150px,190px) 100px minmax(160px,200px) 90px}
 .admin-editor.admin-form .admin-submit-bar .admin-submit-options{display:contents}
 .admin-editor.admin-form .admin-submit-options>:nth-child(1){grid-column:1;grid-row:1}
 .admin-editor.admin-form .admin-submit-options>:nth-child(2){grid-column:2;grid-row:1}
 .admin-editor.admin-form .admin-submit-options>:nth-child(3){grid-column:3;grid-row:1}
 .admin-editor.admin-form .admin-submit-options>:nth-child(4){grid-column:4;grid-row:1}
 .admin-editor.admin-form .admin-submit-options>:nth-child(5){grid-column:5;grid-row:1}
 .admin-editor.admin-form .admin-submit-bar>button.button-primary{grid-column:7;grid-row:1;max-width:none}
 .admin-editor.admin-form .admin-submit-bar>button[type="button"]:nth-last-of-type(2){grid-column:6;grid-row:1}
 .admin-editor.admin-form .admin-submit-bar>button[type="button"]:last-of-type{grid-column:8;grid-row:1}
}
@media(max-width:1399px){
 .admin-editor.admin-form .admin-submit-bar .admin-submit-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-column:1/-1}
 .admin-editor.admin-form .admin-submit-options .admin-submit-meaning-card{grid-column:1}
 .admin-editor.admin-form .admin-submit-options .admin-submit-tag-card{grid-column:2/-1;order:0}
 .admin-editor.admin-form .admin-submit-options .admin-choice-card{grid-column:auto}
}
@media(max-width:600px){
 .admin-editor.admin-form .admin-submit-bar .admin-submit-options{grid-template-columns:repeat(2,minmax(0,1fr))}
 .admin-editor.admin-form .admin-submit-options .admin-submit-tag-card{grid-column:2}
 .admin-editor.admin-form .admin-submit-options .admin-publish-choice{grid-column:1/-1}
 .admin-editor.admin-form .admin-submit-bar>.button{padding:8px 5px;font-size:12px}
}
html[data-theme="dark"] .admin-editor.admin-form .admin-submit-bar .admin-choice-card{--choice-bg:#1c304d;color:#e7f0ff}
html[data-theme="dark"] .admin-editor.admin-form .admin-submit-bar .admin-uppercase-choice{--choice-bg:#3b2d18;--choice-tone:#dbac58}
html[data-theme="dark"] .admin-editor.admin-form .admin-submit-bar .admin-publish-choice{--choice-bg:#19392d;--choice-tone:#65bf96}
.tag-segment.tag-segment-inactive{color:#985b0b;text-decoration:underline dotted;text-underline-offset:3px}html[data-theme="dark"] .tag-segment.tag-segment-inactive{color:#edbd6a}
