/* ACE / viruslib additions on top of the andy (GeneratePress) theme and ace2/style.css.
   Palette taken from the theme: text #3a3a3a, link #1e73be, button #666/#3f3f3f, block #EFF4F8 */

:root {
  --ace-text: #3a3a3a;
  --ace-muted: #6b7280;
  --ace-link: #1e73be;
  --ace-block: #EFF4F8;
  --ace-line: #dbe4ec;
  --ace-btn: #666;
  --ace-btn-hover: #3f3f3f;
  --ace-crit: #c62828;
  --ace-high: #e65100;
  --ace-mid: #8d6e00;
  --ace-low: #546e7a;
  --ace-ok: #2e7d32;
}

/* ---------- generic blocks ---------- */
.block { border-radius: 4px; }
.block.stream { border-left: 3px solid var(--ace-link); }
.block.notice2 { margin-left: 0; border-radius: 4px; }   /* -20px pushed it out of the column on mobile */
.ace-lead { color: var(--ace-muted); margin-bottom: 1.2em; }
.ace-meta { color: var(--ace-muted); font-size: 13px; }

/* ---------- search box ---------- */
.ace-search { display: flex; gap: 8px; margin: 0 0 24px; max-width: 640px; }
.ace-search .malware_searchbox_input {
  flex: 1 1 auto; min-width: 0; padding: 9px 12px; font-size: 15px;
  border: 1px solid #ccc; border-radius: 4px; background: #fff; color: var(--ace-text);
}
.ace-search .malware_searchbox_input:focus { outline: none; border-color: var(--ace-link); box-shadow: 0 0 0 3px rgba(30,115,190,.15); }
.ace-search .malware_searchbox_button {
  flex: 0 0 auto; padding: 9px 20px; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--ace-btn); color: #fff; font-size: 15px;
}
.ace-search .malware_searchbox_button:hover,
.ace-search .malware_searchbox_button:focus { background: var(--ace-btn-hover); }

/* ---------- badges ---------- */
.ace-badge, .ace-chip {
  display: inline-block; padding: 1px 8px; margin-right: 6px; border-radius: 3px;
  font-size: 12px; line-height: 18px; font-weight: 600; vertical-align: 1px; white-space: nowrap;
}
.ace-badge { color: #fff; background: var(--ace-low); }
.ace-badge--crit { background: var(--ace-crit); }
.ace-badge--high { background: var(--ace-high); }
.ace-badge--mid  { background: var(--ace-mid); }
.ace-badge--low  { background: var(--ace-low); }
.ace-chip { color: var(--ace-text); background: #fff; border: 1px solid var(--ace-line); font-weight: 500; }

/* risk verdicts (funcs.php mkrisk_*) */
.ace-risk { font-weight: 700; }
.ace-risk--malware { color: var(--ace-crit); }
.ace-risk--warning { color: #F08400; }
.ace-risk--high    { color: #b8860b; }   /* was yellow on white: unreadable */
.ace-risk--ok      { color: #808080; font-weight: 400; }
.ace-risk--clean   { color: var(--ace-ok); }

/* ---------- threat list ---------- */
.ace-threat { padding: 12px 16px; margin-bottom: 12px; }
.ace-threat__head { margin-bottom: 6px; }
.ace-threat__name { font-weight: 700; overflow-wrap: anywhere; }
.ace-threat__body { font-size: 13px; color: var(--ace-muted); word-break: break-all; }

/* ---------- pager ---------- */
.ace-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 24px 0; line-height: 1; }
.ace-pager a, .ace-pager span {
  min-width: 34px; padding: 8px 10px; text-align: center; border-radius: 3px; text-decoration: none;
}
.ace-pager a { background: var(--ace-block); color: var(--ace-link); }
.ace-pager a:hover { background: var(--ace-link); color: #fff; }
.ace-pager span.curr { margin: 0; padding: 8px 10px; border: 0; background: #666; color: #fff; }
.ace-pager span.gap { color: var(--ace-muted); min-width: 0; padding: 8px 2px; }

/* ---------- lists ---------- */
.ace-list { list-style: none; margin: 0 0 12px; padding: 0; }
.ace-list li { padding: 7px 0; border-bottom: 1px dashed #ddd; }
.ace-list li:last-child { border-bottom: 0; }
.ace-list a { word-break: break-all; }
.ace-results { max-width: 720px; }

.ace-more::before, .ace-links a::before { content: "\203A"; margin-right: 6px; color: var(--ace-link); font-weight: 700; }
.ace-links { list-style: none; margin: 0; padding: 0; }
.ace-links li { padding: 3px 0; }

/* ---------- alerts ---------- */
.ace-alert { padding: 10px 14px; margin: 0 0 16px; border-radius: 4px; border-left: 3px solid; }
.ace-alert--error { background: #fdecea; border-color: var(--ace-crit); color: #7f1d1d; }

/* ---------- malware description page ---------- */
.ace-crumbs { font-size: 13px; color: var(--ace-muted); margin-bottom: 6px; }
.ace-title { overflow-wrap: anywhere; margin-bottom: 8px; }
.ace-tags { margin-bottom: 16px; }
.ace-detect { font-family: Consolas, Menlo, monospace; font-size: 13px; word-break: break-all; }
.ace-facts { margin: 8px 0 16px; }
.ace-fact { padding: 12px 16px; margin-bottom: 10px; background: #fff; border: 1px solid var(--ace-line); border-left: 3px solid var(--ace-link); border-radius: 4px; }
.ace-fact h3 { font-size: 17px; margin: 0 0 6px; }
.ace-fact p { margin: 0 0 6px; }
.ace-fact p:last-child { margin-bottom: 0; }
.ace-two { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: start; margin-top: 8px; }
.ace-two h3 { font-size: 17px; margin: 0 0 8px; }
.ace-prevent { margin: 0; }
.ace-prevent ul { margin: 0 0 0 1.2em; }

/* ---------- ACE statistic blocks ---------- */
.ace-stat { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; }
.ace-stat__icon { flex: 0 0 32px; }
.ace-stat__body { flex: 1 1 auto; min-width: 0; }
.ace-stat__body h2, .ace-stat__body h3 { margin: 4px 0 8px; }
.ace-counter b { font-size: 20px; color: var(--ace-text); }
.ace-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.ace-kpi { background: #fff; border: 1px solid var(--ace-line); border-radius: 4px; padding: 10px; }
.ace-kpi b { display: block; font-size: 20px; color: var(--ace-text); }
.ace-kpi span { font-size: 12px; color: var(--ace-muted); }
.ace-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.block.stream .ace-table th { text-align: left; font-weight: 600; color: var(--ace-muted); border-bottom: 1px solid var(--ace-line); padding: 4px 6px; }
.block.stream .ace-table td { padding: 4px 6px; border-bottom: 1px dashed #ddd; }
.ace-cc { width: 60px; }
.ace-ip { width: 130px; font-family: Consolas, Menlo, monospace; white-space: nowrap; }
.ace-host { word-break: break-all; }

/* ---------- sidebar ---------- */
.plugin-static-pages li.current > a { font-weight: 700; color: #000; }
.ace-side-cta { margin-top: 16px; padding: 14px 16px; background: var(--ace-block); border-radius: 4px; }
.ace-side-cta h2 { font-size: 18px; margin-bottom: 6px; }
.ace-side-cta p { margin: 0; }

/* ---------- mobile ---------- */
@media (max-width: 768px) {
  .ace-two { grid-template-columns: 1fr; }
  .ace-kpis { grid-template-columns: repeat(2, 1fr); }
  .ace-ip { display: none; }
  .ace-stat__icon { display: none; }
}
@media (max-width: 420px) {
  .ace-search { flex-direction: column; }
}
.block.stream .ace-table th.ace-ip { font-family: inherit; }

/* ======================================================================
   ACE pages (md5 / url / ip search, latest lists)
   ====================================================================== */
.ace-badge--ok    { background: #78909c; }
.ace-badge--clean { background: var(--ace-ok); }
.ace-hash { font-family: Consolas, Menlo, monospace; letter-spacing: .02em; }
h1.ace-hash { font-size: 26px; }

/* verdict card */
.ace-verdict { padding: 14px 16px; margin: 0 0 16px; border-radius: 4px; border-left: 4px solid; background: #fff; }
.ace-verdict h2 { font-size: 20px; margin: 0 0 6px; }
.ace-verdict p { margin: 0 0 6px; }
.ace-verdict p:last-child { margin-bottom: 0; }
.ace-verdict--danger  { background: #fdecea; border-color: var(--ace-crit); }
.ace-verdict--danger h2 { color: var(--ace-crit); }
.ace-verdict--warning { background: #fff4e5; border-color: var(--ace-high); }
.ace-verdict--warning h2 { color: var(--ace-high); }
.ace-verdict--safe    { background: #edf7ee; border-color: var(--ace-ok); }
.ace-verdict--safe h2 { color: var(--ace-ok); }
.ace-verdict--unknown { background: var(--ace-block); border-color: var(--ace-low); }

/* key / value facts */
.ace-kv { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0 0 16px;
  background: #fff; border: 1px solid var(--ace-line); border-radius: 4px; }
.ace-kv dt, .ace-kv dd { margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--ace-line); }
.ace-kv dt { color: var(--ace-muted); font-weight: 600; font-size: 13px; }
.ace-kv dd { overflow-wrap: anywhere; min-width: 0; }
.ace-kv dt:last-of-type, .ace-kv dd:last-of-type { border-bottom: 0; }

/* data tables outside of stat blocks (theme table borders reset) */
.ace-grid { overflow-x: auto; margin: 0 0 16px; background: #fff; border: 1px solid var(--ace-line); border-radius: 4px; }
.ace-grid table.ace-table { margin: 0; border: 0; font-size: 14px; }
.ace-grid .ace-table th, .ace-grid .ace-table td { border: 0; border-bottom: 1px solid var(--ace-line); padding: 8px 10px; vertical-align: top; }
.ace-grid .ace-table th { text-align: left; font-weight: 600; font-size: 13px; color: var(--ace-muted); background: var(--ace-block); white-space: nowrap; }
.ace-grid .ace-table tbody tr:last-child td { border-bottom: 0; }
.ace-grid .ace-table tbody tr:hover td { background: #f7fafc; }
.ace-grid .ace-table tr.ace-row--danger td:first-child { box-shadow: inset 3px 0 0 var(--ace-crit); }
.ace-table .ace-num  { text-align: right; white-space: nowrap; }
.ace-table .ace-nowrap { white-space: nowrap; }
.ace-table .ace-hash { font-size: 13px; }
.ace-table .ace-url  { word-break: break-all; }

/* small notes under lists */
.ace-notes { margin: 0 0 16px 1.2em; color: var(--ace-muted); font-size: 14px; }
.ace-notes li { margin-bottom: 4px; }

/* quick tools on the ACE dashboard */
.ace-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 20px; }
.ace-tool { display: block; padding: 12px 14px; background: #fff; border: 1px solid var(--ace-line); border-radius: 4px; text-decoration: none; }
.ace-tool:hover { border-color: var(--ace-link); }
.ace-tool b { display: block; color: var(--ace-link); margin-bottom: 2px; }
.ace-tool span { font-size: 13px; color: var(--ace-muted); }

/* public feed files */
.ace-feed { list-style: none; margin: 0 0 16px; padding: 0; }
.ace-feed li { padding: 12px 16px; margin-bottom: 10px; background: #fff; border: 1px solid var(--ace-line); border-left: 3px solid var(--ace-link); border-radius: 4px; }
.ace-feed a { font-weight: 700; }
.ace-feed p { margin: 4px 0 0; }

.ace-alert--ok   { background: #edf7ee; border-color: var(--ace-ok); color: #1b5e20; }
.ace-alert--info { background: var(--ace-block); border-color: var(--ace-link); }

@media (max-width: 768px) {
  .ace-tools { grid-template-columns: 1fr; }
  .ace-kv { grid-template-columns: 1fr; }
  .ace-kv dt { border-bottom: 0; padding-bottom: 0; }
  .ace-hide-sm { display: none; }
  h1.ace-hash { font-size: 20px; word-break: break-all; }
}

/* ======================================================================
   Product pages (engine, cloud engine, Digital Patrol, Autorun Angel) and contact
   ====================================================================== */
.ace-hero { padding: 20px 22px; margin: 0 0 20px; background: var(--ace-block); border-radius: 4px; border-left: 4px solid var(--ace-link); }
.ace-hero h1 { margin: 0 0 8px; }
.ace-hero p { margin: 0 0 12px; font-size: 17px; }
.ace-hero p:last-child { margin-bottom: 0; }
.ace-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ace-btn { display: inline-block; padding: 9px 18px; border-radius: 4px; background: var(--ace-btn); color: #fff !important; text-decoration: none; font-weight: 600; }
.ace-btn:hover, .ace-btn:focus { background: var(--ace-btn-hover); }
.ace-btn--primary { background: var(--ace-link); }
.ace-btn--primary:hover, .ace-btn--primary:focus { background: #155a96; }
.ace-btn small { display: block; font-weight: 400; font-size: 12px; opacity: .85; }

.ace-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 20px; }
.ace-feature { padding: 12px 16px; background: #fff; border: 1px solid var(--ace-line); border-radius: 4px; }
.ace-feature h3 { font-size: 16px; margin: 0 0 4px; }
.ace-feature p { margin: 0; font-size: 14px; color: var(--ace-muted); }

.ace-section { margin: 0 0 20px; }
.ace-checks { list-style: none; margin: 0 0 16px; padding: 0; }
.ace-checks li { position: relative; padding: 3px 0 3px 22px; }
.ace-checks li::before { content: "\2713"; position: absolute; left: 0; color: var(--ace-ok); font-weight: 700; }
.ace-shot { max-width: 100%; height: auto; border: 1px solid var(--ace-line); border-radius: 4px; }
.ace-engine-info { font-size: 14px; }

/* contact form */
.ace-form { max-width: 640px; margin: 0 0 20px; }
.ace-form label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 4px; }
.ace-form .ace-field { margin: 0 0 14px; }
.ace-form input[type=text], .ace-form input[type=email], .ace-form select, .ace-form textarea {
  width: 100%; box-sizing: border-box; padding: 9px 12px; font-size: 15px; color: var(--ace-text);
  border: 1px solid #ccc; border-radius: 4px; background: #fff; font-family: inherit; }
.ace-form textarea { min-height: 180px; resize: vertical; }
.ace-form input:focus, .ace-form select:focus, .ace-form textarea:focus { outline: none; border-color: var(--ace-link); box-shadow: 0 0 0 3px rgba(30,115,190,.15); }
.ace-form .ace-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ace-form button { padding: 10px 22px; border: 0; border-radius: 4px; background: var(--ace-link); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.ace-form button:hover, .ace-form button:focus { background: #155a96; }
.ace-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 768px) {
  .ace-features { grid-template-columns: 1fr; }
  .ace-form .ace-row2 { grid-template-columns: 1fr; gap: 0; }
  .ace-hero p { font-size: 16px; }
}
