/* Rayco coating visualiser */

.visualiser-hero {
  background: linear-gradient(135deg, var(--rayco-primary, #1a3a5c) 0%, var(--rayco-secondary, #2d5a80) 100%);
  color: #fff;
  padding: 3rem 0 2.5rem;
}

/* Theme stylesheets set explicit colours on h1..h6/p, which would win over
   the inherited white on the dark hero gradient — restate them here. */
.visualiser-hero h1,
.visualiser-hero p,
.visualiser-hero .lead {
  color: #fff;
}

.vis-step {
  background: #fff;
  border: 1px solid #e3e8ee;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: opacity 0.25s ease;
}

.vis-step.vis-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.vis-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--rayco-primary, #1a3a5c);
  color: #fff;
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

.vis-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #b8c4d0;
  border-radius: 12px;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  color: #4a5a6a;
  width: 100%;
}

.vis-dropzone:hover, .vis-dropzone.vis-drag {
  border-color: var(--rayco-primary, #1a3a5c);
  background: #f4f8fb;
}

.vis-photo-preview img {
  max-width: 100%;
  max-height: 320px;
  border-radius: 12px;
  border: 1px solid #e3e8ee;
}

.vis-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vis-samples img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
}

.vis-samples img:hover { border-color: var(--rayco-primary, #1a3a5c); }

.vis-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 0.75rem;
  max-height: 340px;
  overflow-y: auto;
  padding: 0.5rem;
}

.vis-swatch {
  /* theme CSS gives bare <button> display:flex; row; center — force a
     vertical card layout so the name sits below the swatch image */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: visible;
  text-align: center;
  cursor: pointer;
  border: 1px solid #e3e8ee;
  border-radius: 12px;
  background: #fff;
  padding: 6px 6px 8px;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.vis-swatch:hover {
  border-color: #b8c4d0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* The site theme gives bare <button> a ::before "shine" strip parked at
   left:-100% — it paints over each swatch's LEFT NEIGHBOUR and swallows its
   clicks (only the right-most swatch in each row was reliably clickable).
   Kill the pseudo on swatches. !important: the theme rules use !important. */
.vis-swatch::before {
  display: none !important;
  content: none !important;
}

.vis-swatch-img {
  width: 100%;
  height: 72px;
  border-radius: 8px;
  border: 1px solid #e3e8ee;
  object-fit: cover;
  display: block;
}

.vis-swatch-hex {
  width: 100%;
  height: 72px;
  border-radius: 8px;
  border: 1px solid #e3e8ee;
  display: block;
}

.vis-swatch.vis-selected {
  background: #f4f8fb;
  border-color: var(--rayco-primary, #1a3a5c);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.25);
}

.vis-swatch.vis-selected .vis-swatch-img,
.vis-swatch.vis-selected .vis-swatch-hex {
  border-color: var(--rayco-primary, #1a3a5c);
  border-width: 2px;
}

.vis-swatch.vis-selected::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: -7px;
  right: -7px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--rayco-primary, #1a3a5c);
  color: #fff;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

.vis-swatch.vis-selected .vis-swatch-name {
  color: var(--rayco-primary, #1a3a5c);
  font-weight: 700;
}

/* Upload progress state */
.vis-dropzone.vis-uploading {
  pointer-events: none;
  border-style: solid;
  border-color: var(--rayco-primary, #1a3a5c);
  background: #f4f8fb;
}

.vis-upload-pulse {
  animation: vis-pulse 1.2s ease-in-out infinite;
}

@keyframes vis-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Result variation thumbnails */
.vis-variant {
  width: 92px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #e3e8ee;
  cursor: pointer;
}

.vis-variant.vis-selected {
  border-color: var(--rayco-primary, #1a3a5c);
  border-width: 3px;
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.4);
}

.vis-swatch-name {
  font-size: 0.72rem;
  line-height: 1.15;
  margin-top: 0.25rem;
  color: #4a5a6a;
  display: block;
  word-break: break-word;
}

.vis-loading { text-align: center; padding: 2rem 0; }

/* Before / after slider */
.ba-slider {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e3e8ee;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  user-select: none;
  touch-action: none;
}

.ba-img { display: block; width: 100%; height: auto; }

.ba-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: 50%;
}

.ba-clip .ba-img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #fff;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--rayco-primary, #1a3a5c);
}

.ba-handle::after {
  content: "";
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  z-index: -1;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.ba-tag {
  position: absolute;
  top: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 20px;
}

.ba-tag-before { left: 10px; }
.ba-tag-after { right: 10px; }

/* Honeypot must not occupy layout space — the theme stylesheet forces
   position:relative + min-height on bare inputs, which turned this into an
   ~84px invisible gap above the quote form on mobile. */
.vis-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.vis-disclaimer {
  font-size: 0.85rem;
  color: #6a7a8a;
  text-align: center;
  margin: 1.5rem 0 2.5rem;
}
