/* /home/hkiugcom/website.airplay/assets/audit/audit_base.css */
/* A11y helper */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------
   Audit base
   ------------------------------------------------------------ */
.audit-skin {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans",
    "Helvetica Neue", Arial, sans-serif;
  color: #e6e8ef;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.35;
}

.audit-skin table {
  border-collapse: collapse;
  width: 100%;
}

.audit-skin th,
.audit-skin td {
  padding: 8px 10px;
  border-bottom: 1px solid #23283a;
  text-align: left;
}

.audit-skin th {
  background: #151926;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: pre-line;
}

.audit-skin td {
  font-size: 14px;
  line-height: 1.35;
}

.audit-skin tr:hover {
  background: #141a2a;
}

.audit-skin .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.audit-skin .num {
  text-align: left;
  font-variant-numeric: tabular-nums;
}

/* Ratio colors */
.ratio-na { color: #9aa3b2; }
.ratio-good { color: #00e676; }
.ratio-warn { color: #f4e900; }
.ratio-bad { color: #ff5252; }

.col-last {
  white-space: nowrap;
  min-width: 120px;
  width: 1%;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------
   Risk pill
   ------------------------------------------------------------ */
.risk-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 82, 82, 0.35);
  background: rgba(255, 82, 82, 0.10);
  color: #ff5252;
  margin-left: 8px;
  vertical-align: middle;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.risk-pill:hover { filter: brightness(1.08); }

.risk-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5252;
  box-shadow: 0 0 0 2px rgba(255, 82, 82, 0.15);
}

/* ------------------------------------------------------------
   Impact icon (base)
   ------------------------------------------------------------ */
.impact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  cursor: pointer;
  color: rgba(226, 232, 240, 0.65);
  flex: 0 0 auto;
}

.impact-icon:hover { color: rgba(226, 232, 240, 0.95); }

.impact-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Controls */
.audit-compact-select {
  height: 34px;
  padding: 4px 28px 4px 8px;
  font-size: 13px;
}

/* ------------------------------------------------------------
   Topbar layout
   ------------------------------------------------------------ */
.audit-topbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
}

.audit-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  min-width: 0;
}

.audit-mid {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  min-width: 0;
}

.audit-right {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  min-width: 0;
}

/* Listed */
.audit-listed {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}

.audit-listed-kicker {
  font-size: 11px;
  color: #9aa3b2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audit-listed-num {
  font-size: 22px;
  font-weight: 800;
  color: #e6e8ef;
  font-variant-numeric: tabular-nums;
}

.audit-listed-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ------------------------------------------------------------
   Kebab actions (Listed area)
   ------------------------------------------------------------ */
.audit-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.audit-kebab {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(43, 50, 71, 0.9);
  background: rgba(21, 25, 38, 0.45);
  color: rgba(230, 232, 239, 0.85);
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.10) inset;
}

.audit-kebab:hover { filter: brightness(1.06); }

.audit-kebab svg {
  width: 18px;
  height: 18px;
  display: block;
}

.audit-menu {
  position: absolute;
  top: 38px;
  right: 0;
  min-width: 180px;
  border-radius: 14px;
  border: 1px solid #2b3247;
  background: rgba(12, 14, 22, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  padding: 6px;
  z-index: 60;
}

.audit-menu.hidden { display: none; }

.audit-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: #e6e8ef;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.audit-menu-item:hover { background: rgba(230, 232, 239, 0.08); }

.audit-menu-item.is-muted { color: rgba(154, 163, 178, 0.92); }

.audit-menu-sep {
  height: 1px;
  background: rgba(43, 50, 71, 0.9);
  margin: 6px;
}

.lc24h-mini { flex: 0 0 auto; }

/* lc24h + kebab ankkuri oikeaan reunaan */
.audit-right-lc24h{
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
}

/* Two separate buttons: do NOT stack them on top of each other */
#auditView.is-by-lc24h,
#auditActions.is-by-lc24h{
  position: absolute;
  bottom: -8px;
  z-index: 70;
}

/* Gear (View) further left */
#auditView.is-by-lc24h{
  left: -80px;
}

/* Dots (Actions) closer to lc24h corner */
#auditActions.is-by-lc24h{
  left: -38px;
}

/* Desktop fine-tune */
@media (min-width: 768px) {
  .audit-topbar{
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: end;
  }

  .audit-right{
    justify-self: end;
    justify-content: flex-end;
    flex-wrap: nowrap;
    text-align: right;
  }

  .audit-mid{
    min-width: 0;
    overflow: hidden;
  }

  .audit-listed-row{
    min-width: 0;
  }

  .audit-teaser{
    flex: 1 1 320px;
    min-width: 220px;
    max-width: 100%;
  }

  #auditView.is-by-lc24h{ left: -90px; bottom: -10px; }
  #auditActions.is-by-lc24h{ left: -46px; bottom: -10px; }
}

/* FORCE: lc24h-kebab menu vasemmalle (override all) */
#auditActions.is-by-lc24h #auditActionsMenu{
  right: auto !important;
  left: -22px !important;
  top: auto !important;
  bottom: 38px !important;
  transform: none !important;
}

/* ------------------------------------------------------------
   Mobile topbar layout (custom rows)
   ------------------------------------------------------------ */
.audit-topbar.is-mobile{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Row 1: filters + listed on one line */
.audit-mobile-row1{
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}

.audit-mobile-filters{
  display: flex;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

/* Make selects narrower on mobile */
.audit-topbar.is-mobile .audit-compact-select{
  height: 32px;
  padding: 4px 22px 4px 8px;
  font-size: 12px;
}

/* CHANGED: Listed label above number (stack) */
.audit-mobile-listed{
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.audit-mobile-listed-label{
  font-size: 11px;
  color: #9aa3b2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1;
}

.audit-mobile-listed-num{
  font-size: 18px;
  font-weight: 800;
  color: #e6e8ef;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Row 2: teaser full width */
.audit-mobile-row2 .audit-teaser{
  margin-left: 0 !important;
  border-left: 0;
  padding-left: 0;
  max-width: 100%;
  min-width: 0;
}

/* Row 3: lc24h full width */
.audit-mobile-row3 .lc24h-mini{
  width: 100%;
}

/* Audit View (gear) icon size only */
#auditViewBtn .ap-ico{
  width: 16px;
  height: 16px;
  display: block;
}

/* Audit view menu: constrain panel height */
#auditViewPanel {
  max-height: min(60vh, 420px);
  overflow: auto;
}
