/* Product-facing polish overrides */
#status {
  display: none !important;
}

.country-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  margin-right: .45rem;
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
}

.cookie-dropzone {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cookie-dropzone > * {
  margin-inline: auto;
}

.toggle-grid input[type="checkbox"],
.settings-card input[type="checkbox"],
.privacy-row input[type="checkbox"] {
  appearance: none;
  position: relative;
  width: 48px;
  height: 28px;
  min-width: 48px;
  border: 1px solid rgba(248, 189, 36, .55);
  border-radius: 999px;
  background: #2b2b2b;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  cursor: pointer;
}

.toggle-grid input[type="checkbox"]::after,
.settings-card input[type="checkbox"]::after,
.privacy-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d7dde4;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
  transition: transform .16s ease;
}

.toggle-grid input[type="checkbox"]:checked,
.settings-card input[type="checkbox"]:checked,
.privacy-row input[type="checkbox"]:checked {
  background: linear-gradient(180deg, #ffd35c, #d79708);
  border-color: #f8bd24;
}

.toggle-grid input[type="checkbox"]:checked::after,
.settings-card input[type="checkbox"]:checked::after,
.privacy-row input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.reference-settings .settings-card,
.reference-settings .settings-reset {
  overflow: hidden;
}

.reference-settings .settings-card label,
.reference-settings .toggle-grid label {
  min-width: 0;
}

.reference-settings .settings-card input[type="checkbox"] {
  justify-self: end;
  margin-left: auto;
}

.reference-settings .settings-reset .outline-button {
  flex-shrink: 0;
}

.session-tools {
  padding:0;
  overflow:visible;
  position:relative;
  z-index:2;
}
.session-tools:hover,
.session-tools:focus-within,
.session-tools:has(.help-tip:hover),
.session-tools:has(.help-tip:focus) {
  z-index:80;
}
.session-tools summary {
  min-height:46px;
  display:flex;
  align-items:center;
  padding:0 16px;
  color:#f1e8d7;
  cursor:pointer;
  font-weight:800;
  list-style:none;
}
.session-tools summary::after {
  content:"+";
  margin-left:auto;
  color:var(--gold);
  font-size:20px;
}
.session-tools[open] summary::after { content:"−"; }
.session-tools > .form-grid,
.session-tools > .action-row {
  margin-left:14px;
  margin-right:14px;
}
.session-tools > .form-grid { padding-top:2px; }
.session-tools > .action-row:last-child { padding-bottom:14px; }
.session-tools button:disabled {
  opacity:.45;
  cursor:not-allowed;
}
.profile-selection-card {
  min-height:0;
  padding:16px;
}
.profile-selection-card > p {
  margin:4px 0 12px;
  color:#a8a29a;
}
.profile-selection-card .selection-list {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:8px;
  max-height:190px;
  overflow:auto;
}
.profile-selection-card .selection-list label {
  min-width:0;
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  gap:2px 10px;
  align-items:center;
  padding:10px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:6px;
  background:rgba(255,255,255,.025);
}
.profile-selection-card .selection-list input { grid-row:1 / 3; }
.profile-selection-card .selection-list span,
.profile-selection-card .selection-list small {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.profile-selection-card .selection-list small { color:#817a71; }
.profile-selection-card > .outline-button { margin-top:12px; }

@media (max-width:1100px) {
  .profile-selection-card .selection-list { grid-template-columns:repeat(3, minmax(0, 1fr)); }
}

/* Final layout guards: keep help popovers and action feedback above dense panels. */
.help-tip {
  position:relative;
  z-index:5000;
  isolation:isolate;
}
.help-tip:hover,
.help-tip:focus,
.help-tip:focus-within {
  z-index:300001 !important;
}
.help-popover {
  z-index:300000 !important;
  pointer-events:none;
  filter:none;
}
.help-tip:hover .help-popover,
.help-tip:focus .help-popover,
.help-tip:focus-within .help-popover {
  z-index:300000 !important;
  opacity:1;
  visibility:visible;
}
.panel:has(.help-tip),
.settings-card:has(.help-tip),
.session-tools:has(.help-tip),
.fingerprint-proof-panel:has(.help-tip),
.form-card:has(.help-tip),
.integration-card:has(.help-tip),
.automation-board:has(.help-tip),
.state-banner:has(.help-tip) {
  overflow:visible;
}
.panel:has(.help-tip:hover),
.panel:has(.help-tip:focus),
.settings-card:has(.help-tip:hover),
.settings-card:has(.help-tip:focus),
.session-tools:has(.help-tip:hover),
.session-tools:has(.help-tip:focus),
.fingerprint-proof-panel:has(.help-tip:hover),
.fingerprint-proof-panel:has(.help-tip:focus),
.form-card:has(.help-tip:hover),
.form-card:has(.help-tip:focus),
.integration-card:has(.help-tip:hover),
.integration-card:has(.help-tip:focus),
.automation-board:has(.help-tip:hover),
.automation-board:has(.help-tip:focus) {
  z-index:300000 !important;
}
.reference-settings .settings-card:has(.help-tip),
.reference-settings .settings-reset:has(.help-tip) {
  overflow:visible;
}
.operation-feedback,
.state-banner {
  margin-block:10px 14px;
}
.screen-actions {
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.profile-play-button,
.icon-button,
.compact-icon-button {
  position:relative;
}
.profile-play-button .spinner,
.icon-button .spinner,
.compact-icon-button .spinner {
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  margin:0;
}

.reference-screen,
.reference-content,
.screen-body,
#screenHost,
.automation-layout,
.reports-grid {
  overflow:visible;
}

.help-popover {
  z-index:999999 !important;
  transform:translateY(8px);
}

.profile-play-button.action-running > :not(.spinner),
.profile-play-button.action-running .play-icon {
  opacity:0;
}

.profile-play-button.action-running .spinner {
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
}

.reference-reports .operation-feedback {
  margin:14px 0 18px;
}

.reference-reports .reports-grid {
  gap:16px;
}

.reference-reports .report-hidden-note {
  margin:12px 0 18px;
}
