/* ==========================================================================
   ScamAdvisory UI Component Styles
   Extracted from templates so browsers cache this file across page loads.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Layout: embed mode & validator state
   -------------------------------------------------------------------------- */
.result-state-hide {
  display: none;
}

@media (max-width: 640px) {
  #validator-container-window {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }

  #validator-container {
    width: 100% !important;
  }

  #validator-container > div {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Hero background image overlay opacity */
.opacity-hero {
  opacity: 0.15;
}

/* Safe area bottom for mobile CTAs */
@supports (padding: max(0px)) {
  .safe-bottom {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
  }
}

/* --------------------------------------------------------------------------
   Embed mode: force light colours so the tool works on any background
   -------------------------------------------------------------------------- */
body[data-sa-is-embed="true"],
body[data-sa-is-embed="true"] *:not(img) {
  color: #111827 !important;
}

body[data-sa-is-embed="true"] a,
body[data-sa-is-embed="true"] a:visited,
body[data-sa-is-embed="true"] a:hover,
body[data-sa-is-embed="true"] a:focus,
body[data-sa-is-embed="true"] button,
body[data-sa-is-embed="true"] input,
body[data-sa-is-embed="true"] select,
body[data-sa-is-embed="true"] textarea,
body[data-sa-is-embed="true"] label,
body[data-sa-is-embed="true"] span,
body[data-sa-is-embed="true"] p,
body[data-sa-is-embed="true"] div,
body[data-sa-is-embed="true"] h1,
body[data-sa-is-embed="true"] h2,
body[data-sa-is-embed="true"] h3,
body[data-sa-is-embed="true"] h4,
body[data-sa-is-embed="true"] h5,
body[data-sa-is-embed="true"] h6,
body[data-sa-is-embed="true"] li,
body[data-sa-is-embed="true"] td,
body[data-sa-is-embed="true"] th,
body[data-sa-is-embed="true"] strong,
body[data-sa-is-embed="true"] small,
body[data-sa-is-embed="true"] svg {
  color: #111827 !important;
}

/* --------------------------------------------------------------------------
   Snapshot thumbnail overlay
   -------------------------------------------------------------------------- */
.sa-snap-wrap {
  left: auto;
  right: 0.5rem;
  top: calc(var(--spacing, 0.25rem) * 24);
  position: absolute;
}

.sa-snap-thumb {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
}

@media (min-width: 768px) {
  .sa-snap-wrap {
    right: calc(var(--spacing, 0.25rem) * 35);
  }

  .sa-snap-thumb {
    width: 200px;
    height: 200px;
    max-width: 200px;
    max-height: 200px;
  }
}

/* --------------------------------------------------------------------------
   Smartbox / quick-report component
   -------------------------------------------------------------------------- */

/* Kind shortcut grid */
#quick-report .kind-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

@media (min-width: 640px) {
  #quick-report .kind-shortcut-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Glass kind shortcuts (default: on coloured hero) */
#quick-report .kind-shortcut {
  width: 100%;
  min-width: 0;
  min-height: 2.9rem;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.16) !important;
  color: #f8fafc !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}

#quick-report .kind-shortcut:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
}

/* Kind-specific tints */
#quick-report .kind-shortcut[data-kind=""] {
  background: rgba(219, 234, 254, 0.20) !important;
  border-color: rgba(191, 219, 254, 0.50) !important;
  color: #eff6ff !important;
}

#quick-report .kind-shortcut[data-kind="qr"] {
  background: rgba(233, 213, 255, 0.18) !important;
  border-color: rgba(216, 180, 254, 0.48) !important;
  color: #f5f3ff !important;
}

#quick-report .kind-shortcut[data-kind="vehicle_check"] {
  background: rgba(220, 252, 231, 0.17) !important;
  border-color: rgba(187, 247, 208, 0.46) !important;
  color: #f0fdf4 !important;
}

#quick-report .kind-shortcut[data-kind="company"] {
  background: rgba(254, 243, 199, 0.18) !important;
  border-color: rgba(253, 230, 138, 0.46) !important;
  color: #fffbeb !important;
}

/* Selected state */
#quick-report .kind-shortcut[data-kind=""].is-selected {
  background: rgba(191, 219, 254, 0.30) !important;
  border-color: rgba(219, 234, 254, 0.72) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(96, 165, 250, 0.18);
}

#quick-report .kind-shortcut[data-kind="qr"].is-selected {
  background: rgba(221, 214, 254, 0.28) !important;
  border-color: rgba(233, 213, 255, 0.70) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(168, 85, 247, 0.18);
}

#quick-report .kind-shortcut[data-kind="vehicle_check"].is-selected {
  background: rgba(187, 247, 208, 0.28) !important;
  border-color: rgba(220, 252, 231, 0.70) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.16);
}

#quick-report .kind-shortcut[data-kind="company"].is-selected {
  background: rgba(253, 230, 138, 0.30) !important;
  border-color: rgba(254, 243, 199, 0.72) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.16);
}

/* --------------------------------------------------------------------------
   Mobile overrides: glass palette kept but contrast raised
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  #quick-report .mb-5.rounded-xl {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18) !important;
    backdrop-filter: blur(14px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  }

  #quick-report label[for="smartbox"],
  #quick-report #kindInfoLine,
  #quick-report #status,
  #quick-report h1,
  #quick-report h2,
  #quick-report h3,
  #quick-report p,
  #quick-report span {
    color: #f8fafc !important;
  }

  #quick-report #kindBtn {
    border: 1px solid rgba(255, 255, 255, 0.32) !important;
    background: rgba(255, 255, 255, 0.10) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16) !important;
    backdrop-filter: blur(14px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  }

  #quick-report .kind-shortcut,
  #quick-report .kind-shortcut[data-kind=""],
  #quick-report .kind-shortcut[data-kind="qr"],
  #quick-report .kind-shortcut[data-kind="vehicle_check"],
  #quick-report .kind-shortcut[data-kind="company"] {
    color: #ffffff !important;
    text-shadow: none !important;
  }

  #quick-report #fieldWrap {
    border: 2px dashed rgba(255, 255, 255, 0.72) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14) !important;
  }

  #quick-report #smartbox {
    background: transparent !important;
    color: #f8fafc !important;
  }

  #quick-report #smartbox:empty::before {
    color: rgba(250, 204, 21, 0.92) !important;
    opacity: 1 !important;
    display: block !important;
  }

  #quick-report #chooseBtn,
  #quick-report #chooseBtnMobile,
  #quick-report #clearBtn {
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    background: rgba(255, 255, 255, 0.10) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14) !important;
    backdrop-filter: blur(14px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  }

  #quick-report #submitBtn {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #163d76 !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16) !important;
  }

  #quick-report #submitBtn:disabled {
    background: rgba(255, 255, 255, 0.18) !important;
    color: rgba(15, 23, 42, 0.80) !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10) !important;
  }

  body:not([data-sa-is-embed="true"]) #quick-report #smartbox:empty::before {
    content: attr(data-placeholder);
    color: rgba(250, 204, 21, 0.92) !important;
    opacity: 1 !important;
    display: block !important;
  }
}

/* --------------------------------------------------------------------------
   Embed mode: same glass treatment
   -------------------------------------------------------------------------- */
body[data-sa-is-embed="true"] #quick-report {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

body[data-sa-is-embed="true"] #quick-report .mb-5.rounded-xl {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
}

body[data-sa-is-embed="true"] #quick-report,
body[data-sa-is-embed="true"] #quick-report h1,
body[data-sa-is-embed="true"] #quick-report h2,
body[data-sa-is-embed="true"] #quick-report h3,
body[data-sa-is-embed="true"] #quick-report p,
body[data-sa-is-embed="true"] #quick-report label,
body[data-sa-is-embed="true"] #quick-report span,
body[data-sa-is-embed="true"] #quick-report #kindInfoLine,
body[data-sa-is-embed="true"] #quick-report #status {
  color: #f8fafc !important;
}

body[data-sa-is-embed="true"] #quick-report #kindBtn {
  border: 1px solid rgba(255, 255, 255, 0.32) !important;
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
}

body[data-sa-is-embed="true"] #quick-report .kind-shortcut,
body[data-sa-is-embed="true"] #quick-report .kind-shortcut[data-kind=""],
body[data-sa-is-embed="true"] #quick-report .kind-shortcut[data-kind="qr"],
body[data-sa-is-embed="true"] #quick-report .kind-shortcut[data-kind="vehicle_check"],
body[data-sa-is-embed="true"] #quick-report .kind-shortcut[data-kind="company"] {
  color: #ffffff !important;
  text-shadow: none !important;
}

body[data-sa-is-embed="true"] #quick-report #fieldWrap {
  border: 2px dashed rgba(255, 255, 255, 0.72) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14) !important;
}

body[data-sa-is-embed="true"] #quick-report #smartbox {
  background: transparent !important;
  color: #f8fafc !important;
}

body[data-sa-is-embed="true"] #quick-report #smartbox:empty::before {
  content: attr(data-placeholder);
  color: rgba(250, 204, 21, 0.92) !important;
  opacity: 1 !important;
  display: block !important;
}

body[data-sa-is-embed="true"] #quick-report #chooseBtn,
body[data-sa-is-embed="true"] #quick-report #chooseBtnMobile,
body[data-sa-is-embed="true"] #quick-report #clearBtn {
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
}

body[data-sa-is-embed="true"] #quick-report #submitBtn {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #163d76 !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16) !important;
}

body[data-sa-is-embed="true"] #quick-report #submitBtn:disabled {
  background: rgba(255, 255, 255, 0.18) !important;
  color: rgba(15, 23, 42, 0.80) !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10) !important;
}

body[data-sa-is-embed="true"] #quick-report button svg,
body[data-sa-is-embed="true"] #quick-report button svg path {
  color: currentColor !important;
  stroke: currentColor !important;
}

body[data-sa-is-embed="true"] #quick-report #kindBtnLabel,
body[data-sa-is-embed="true"] #quick-report #submitBtn:not(:disabled),
body[data-sa-is-embed="true"] #quick-report #submitBtn:not(:disabled) span,
body[data-sa-is-embed="true"] #quick-report #submitBtn:not(:disabled) svg,
body[data-sa-is-embed="true"] #quick-report #submitBtn:not(:disabled) svg path {
  color: inherit !important;
}

/* Placeholder text on non-embed, non-mobile */
body:not([data-sa-is-embed="true"]) #quick-report #smartbox:empty::before {
  content: attr(data-placeholder);
  color: #eae58ef0 !important;
  opacity: 1 !important;
  display: block;
}

/* --------------------------------------------------------------------------
   Sidebar menu
   -------------------------------------------------------------------------- */
#sa-sidebar {
  will-change: transform;
}

#sa-sidebar .sa-sidebar-section-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 260ms ease, opacity 220ms ease;
}

#sa-sidebar .sa-sidebar-section-panel.sa-sidebar-section-open {
  opacity: 1;
}

#sa-sidebar .sa-sidebar-chevron {
  transition: transform 220ms ease;
}

#sa-sidebar .sa-sidebar-section-button[aria-expanded="true"] .sa-sidebar-chevron {
  transform: rotate(90deg);
}

/* --------------------------------------------------------------------------
   Feedback button pulse animation
   -------------------------------------------------------------------------- */
@keyframes sa-feedback-pulse-grow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 10px 15px -3px rgba(127, 29, 29, 0.30), 0 0 0 0 rgba(239, 68, 68, 0.45);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 18px 24px -6px rgba(127, 29, 29, 0.40), 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #sa-feedback-open.sa-feedback-pulse-grow {
    animation: none;
  }
}

#sa-feedback-open.sa-feedback-pulse-grow {
  animation: sa-feedback-pulse-grow 1.8s ease-in-out infinite;
  transform-origin: center;
  will-change: transform, box-shadow;
}

/* --------------------------------------------------------------------------
   Theme selector panel background
   -------------------------------------------------------------------------- */
#theme-panel {
  background-color: hsl(var(--popover)) !important;
}

/* --------------------------------------------------------------------------
   Homepage layout
   -------------------------------------------------------------------------- */
#homepage_outer_wrap {
  overflow-x: visible;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#homepage_top_wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#homepage_columns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

#homepage_center_panel,
#homepage_right_panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#homepage_center_panel > div,
#homepage_right_panel > div {
  width: 100% !important;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

#homepage_center_panel img,
#homepage_right_panel img,
#homepage_center_panel video,
#homepage_right_panel video,
#homepage_center_panel canvas,
#homepage_right_panel canvas,
#homepage_center_panel svg,
#homepage_right_panel svg,
#homepage_center_panel iframe,
#homepage_right_panel iframe {
  display: block;
  max-width: 100% !important;
  height: auto;
}

#homepage_center_panel table,
#homepage_right_panel table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  #homepage_outer_wrap {
    padding: 0.75rem;
  }

  #homepage_center_panel { order: 1; }
  #homepage_right_panel  { order: 2; }
}

@media (min-width: 768px) {
  #homepage_columns {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  #homepage_center_panel {
    flex: 0 0 calc(70% - 0.375rem);
    max-width: calc(70% - 0.375rem);
    order: 1;
  }

  #homepage_right_panel {
    flex: 0 0 calc(30% - 0.375rem);
    max-width: calc(30% - 0.375rem);
    order: 2;
  }
}

/* Word cloud panels */
.wc-panel.wc-panel-top.wc-panel-empty {
  min-height: 0 !important;
  height: auto !important;
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
  align-items: flex-start !important;
}

.wc-panel.wc-panel-top.wc-panel-empty,
.wc-panel.wc-panel-top.wc-panel-empty * {
  line-height: 1.2 !important;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}
