/* /home/hkiugcom/website.airplay/assets/audit/audit_columns_modal.css */

.ap-audit-modal {
  position: fixed;
  z-index: 9997;
  inset: 0;
}

.ap-audit-modal.hidden { display: none; }

.ap-audit-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.ap-audit-modal-panel {
  position: absolute;
  top: 18px;
  right: 18px;

  width: min(560px, calc(100vw - 36px));
  max-width: 560px;
  min-width: 340px;

  height: min(400px, calc(100vh - 36px));
  max-height: 400px;

  border-radius: 16px;
  border: 1px solid #2b3247;
  background: rgba(12, 14, 22, 0.98);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  overflow: hidden;

  display: flex;
  flex-direction: column;
}

/* Ratio info panel: center on top of Options (normal colours), dim Options via JS */
#auditRatioInfoPanel {
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);

  width: min(520px, calc(100vw - 36px));
  max-width: 520px;
  min-width: 280px;

  height: auto;
  max-height: min(340px, calc(100vh - 36px));
}

/* Make its body behave like info text block (not grid chips) */
#auditRatioInfoPanel .ap-audit-modal-body {
  display: block;
  padding: 12px 14px;
  overflow: auto;
  color: rgba(230, 232, 239, 0.86);
  font-size: 12px;
  line-height: 1.35;
}

.ap-audit-modal-head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(43, 50, 71, 0.9);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ap-audit-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e6e8ef;
}

.ap-audit-modal-sub {
  margin-top: 3px;
  font-size: 11px;
  color: rgba(154, 163, 178, 0.92);
  max-width: 420px;
  line-height: 1.25;
}

.ap-audit-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.ap-audit-modal-iconbtn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  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;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
}

.ap-audit-modal-body {
  padding: 20px 14px 14px 14px;  /* kasvatettu ylapadding */
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ap-audit-zone {
  border: 1px solid rgba(43, 50, 71, 0.9);
  border-radius: 14px;
  background: rgba(21, 25, 38, 0.35);
  padding: 10px;
  min-height: 0;
  overflow: hidden;
}

.ap-audit-chipwrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  overflow: auto;
  max-height: 100%;
  padding-right: 2px;
}

.ap-audit-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(43, 50, 71, 0.9);
  background: rgba(21, 25, 38, 0.55);
  color: #e6e8ef;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

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

.ap-audit-chip.is-ghost {
  color: rgba(154, 163, 178, 0.92);
  border-style: dashed;
  background: rgba(21, 25, 38, 0.25);
}

.ap-audit-chip-handle {
  display: inline-flex;
  width: 12px;
  justify-content: center;
  color: rgba(154, 163, 178, 0.92);
  font-weight: 900;
}

.ap-audit-btn {
  border-radius: 12px;
  border: 1px solid rgba(43, 50, 71, 0.9);
  background: rgba(21, 25, 38, 0.45);
  color: #e6e8ef;
  cursor: pointer;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ap-audit-btn.is-slim {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
}

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

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

/* Disabled buttons: apply becomes "not white" until there is something to save */
.ap-audit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

.ap-audit-btn:disabled:hover {
  filter: none;
}

/* OPTIONS layout */
.ap-audit-opts-body {
  display: block;
}

.ap-audit-opts-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 520px) {
  .ap-audit-opts-top {
    grid-template-columns: 1fr;
  }
}

.ap-audit-opts-box {
  border: 1px solid rgba(43, 50, 71, 0.9);
  border-radius: 14px;
  background: rgba(21, 25, 38, 0.35);
  padding: 10px;
  overflow: hidden;
}

.ap-audit-opts-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(230, 232, 239, 0.9);
}

.ap-audit-opts-help {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(154, 163, 178, 0.92);
  line-height: 1.25;
}

.ap-audit-opts-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ap-audit-range {
  width: 100%;
}

.ap-audit-opts-out {
  min-width: 44px;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: rgba(230, 232, 239, 0.9);
}

/* Simple switch */
.ap-audit-switch {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.ap-audit-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.ap-audit-switch-ui {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(43, 50, 71, 0.9);
  background: rgba(21, 25, 38, 0.45);
  position: relative;
  display: inline-block;
}

.ap-audit-switch-ui:after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(230, 232, 239, 0.85);
  transition: transform 160ms ease;
}

.ap-audit-switch input:checked + .ap-audit-switch-ui:after {
  transform: translateX(20px);
}

.ap-audit-opts-ratio-wrap {
  margin-top: 10px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* INFO popup: smaller, top-left of columns panel */
.ap-audit-info-panel {
  position: absolute;
  top: 18px;
  right: 18px;
  width: min(520px, calc(100vw - 36px));
  height: min(320px, calc(100vh - 36px));
  max-width: 520px;
  max-height: 320px;
  border-radius: 16px;
  border: 1px solid #2b3247;
  background: rgba(12, 14, 22, 0.98);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ap-audit-info-body {
  padding: 12px 14px;
  overflow: auto;
  color: rgba(230, 232, 239, 0.86);
  font-size: 12px;
  line-height: 1.35;
}

.ap-audit-info-sub {
  margin-top: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(230, 232, 239, 0.86);
}

.ap-audit-info-line {
  margin-top: 6px;
  color: rgba(154, 163, 178, 0.92);
  font-size: 12px;
}

.ap-audit-opts-label-center {
  text-align: center;
}

.ap-audit-info-panel-left {
  top: 18px;
  right: 18px;
  transform: translateX(calc(-1 * (min(560px, calc(100vw - 36px)) + 18px)));
}

@media (max-width: 620px) {
  .ap-audit-info-panel-left {
    transform: none;
    right: 18px;
  }
}

.ap-audit-title-accent {
  color: #facc15; /* Tailwind text-yellow-400 */
}

.ap-audit-info-sub {
  color: #fbbf24;
}


/* Circle toggle for Options header
   OFF = grey ring
   ON  = grey ring + yellow filled center
*/


.ap-audit-circle-toggle {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  cursor: pointer;
  user-select: none;
}

.ap-audit-circle-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ap-audit-circle-ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;

  /* Always grey ring */
  background: transparent;
  border: 3px solid #6b7280; /* thicker ring */

  transition: transform 0.15s ease;
}

/* Inner yellow fill (hidden by default) */
.ap-audit-circle-ui:before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 999px;

  background: #facc15; /* yellow */
  transform: scale(0);
  transition: transform 0.15s ease;
}

/* ON state */
.ap-audit-circle-toggle input:checked + .ap-audit-circle-ui:before {
  transform: scale(1);
}

/* Subtle hover */
.ap-audit-circle-toggle:hover .ap-audit-circle-ui {
  transform: scale(1.05);
}

/* Keyboard focus */
.ap-audit-circle-toggle input:focus-visible + .ap-audit-circle-ui {
  outline: 2px solid rgba(250, 204, 21, 0.4);
  outline-offset: 3px;
}