/* ============================================================
   PER-FREDRIKZ – TYPSNITT
   Google Fonts: Playfair Display (rubriker) + Inter (brödtext)
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* Behåll Monsal Gothic som reservtypsnitt */
@font-face {
  font-family: "Monsal Gothic";
  src: url('assets/fonts/Monsal-gothic-light/Monsal-gothic-light.woff2') format('woff2'),
       url('assets/fonts/Monsal-gothic-light/Monsal-gothic-light.woff')  format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Monsal Gothic";
  src: url('assets/fonts/Monsal-gothic-regular/Monsal-gothic-regular.woff2') format('woff2'),
       url('assets/fonts/Monsal-gothic-regular/Monsal-gothic-regular.woff')  format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Monsal Gothic";
  src: url('assets/fonts/Monsal-gothic-medium/Monsal-gothic-medium.woff2') format('woff2'),
       url('assets/fonts/Monsal-gothic-medium/Monsal-gothic-medium.woff')  format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Monsal Gothic";
  src: url('assets/fonts/Monsal-gothic-bold/Monsal-gothic-bold.woff2') format('woff2'),
       url('assets/fonts/Monsal-gothic-bold/Monsal-gothic-bold.woff')  format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Monsal Gothic";
  src: url('assets/fonts/Monsal-gothic-extraBold/Monsal-gothic-extraBold.woff2') format('woff2'),
       url('assets/fonts/Monsal-gothic-extraBold/Monsal-gothic-extraBold.woff')  format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Monsal Gothic";
  src: url('assets/fonts/Monsal-gothic-heavy/Monsal-gothic-heavy.woff2') format('woff2'),
       url('assets/fonts/Monsal-gothic-heavy/Monsal-gothic-heavy.woff')  format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   PER-FREDRIKZ BRAND VARIABLER
   Baserade på perfredrikz.se designsystem
============================================================ */
:root {
  /* Primärfärger */
  --brand-blue:        #4B86AF; /* Brand Blue – primär accentfärg */
  --brand-blue-dark:   #3a6d93; /* Mörkare hover-ton */
  --brand-blue-light:  #d0e4f0; /* Ljus blå ton */
  --brand-sand:        #BD9862; /* Brand Sand – varm accent */
  --brand-gold:        #C98C24; /* Brand Gold – highlight */
  --brand-ivory:       #E8DCCA; /* Brand Ivory – bakgrundston */

  /* Bakgrunder */
  --brand-bg:          #F4EDE3; /* Varm elfenbensbakgrund */
  --brand-bg-alt:      #EDE5D8; /* Alternativ bakgrund */
  --brand-bg-deep:     #E2D9CC; /* Djupare ton */

  /* Text */
  --brand-text:        #1A1612; /* Mörk varm text */
  --brand-muted:       #7A6C60; /* Dämpad text */

  /* Skuggor */
  --shadow-soft:       0 4px 24px rgba(26, 22, 18, 0.12);
  --shadow-glow-blue:  0 8px 32px rgba(75, 134, 175, 0.22);
  --shadow-glow-sand:  0 8px 32px rgba(189, 152, 98, 0.20);

  /* Dynamiska variabler (overridas av dark-mode) */
  --bg:           var(--brand-bg);
  --toolbar-bg:   var(--brand-bg-alt);
  --card-bg:      #ffffff;
  --text:         var(--brand-text);
  --text-muted:   var(--brand-muted);
  --border:       rgba(26, 22, 18, 0.12);
  --bg-input:     #fdfaf6;
  --bg-card:      #ffffff;
  --text-primary: var(--brand-text);
  --border-color: rgba(26, 22, 18, 0.15);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Monsal Gothic", sans-serif;
}

body {
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, h5 {
  font-family: "Playfair Display", "Monsal Gothic", Georgia, serif;
}

/* ========================
   TOOLBAR
======================== */
.toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--toolbar-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 1px 0 var(--border), var(--shadow-soft);
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.toolbar .logo {
  height: 36px;
  padding: 4px 0;
  opacity: 0.92;
  transition: opacity 0.2s;
}

.toolbar .logo:hover {
  opacity: 1;
}

.navigation-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.utility-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

.nav-button {
  background: none;
  border: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s, color 0.2s;
  color: var(--text);
}

.nav-button:hover {
  background-color: rgba(75, 134, 175, 0.12);
}

.nav-button svg {
  width: 22px;
  height: 22px;
  fill: var(--text);
  transition: fill 0.2s;
}

.nav-button:hover svg {
  fill: var(--brand-blue);
}

.nav-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.nav-button:disabled:hover {
  background: none;
}

.nav-button:disabled:hover svg {
  fill: var(--text);
}

.page-indicator {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  min-width: 100px;
  text-align: center;
}

/* ========================
   PROGRESS BAR
======================== */
#progress-bar {
  position: fixed;
  top: 64px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--brand-blue);
  transition: width 0.3s ease;
  z-index: 999;
}

/* ========================
   FLIPBOOK CONTAINER
======================== */
.flipbook-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: calc(100vh - 64px);
  margin-top: 64px;
  padding: 24px;
  box-sizing: border-box;
  background: var(--bg, var(--brand-bg));
  background-image: radial-gradient(ellipse at 60% 40%, rgba(75,134,175,0.05) 0%, transparent 70%),
                    radial-gradient(ellipse at 20% 80%, rgba(189,152,98,0.05) 0%, transparent 60%);
}

#flipbook {
  margin: 0 auto;
  max-width: 100%;
}

#flipbook .page {
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

#flipbook .hard {
  box-shadow: var(--shadow-glow-blue), 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 6px;
}

#flipbook .page-wrapper.turn-page {
  box-shadow: var(--shadow-glow-sand), 0 4px 16px rgba(0,0,0,0.2);
}

#flipbook .page canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* ========================
   PLACEHOLDER / SPINNER
======================== */
#flipbook .page.placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--brand-bg-alt);
}

#flipbook .page.placeholder .loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--brand-ivory);
  border-top: 3px solid var(--brand-blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================
   PRELOADER
======================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--brand-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.4s ease;
}

.preloader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.preloader-content img {
  max-width: 180px;
  opacity: 0.9;
}

.preloader-content h3 {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--brand-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--brand-ivory);
  border-top: 3px solid var(--brand-blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

/* ========================
   LANDSCAPE WARNING
======================== */
#landscape-warning {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--brand-bg);
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 32px;
  box-sizing: border-box;
  z-index: 10000;
}

#landscape-warning .warning-content img {
  max-width: 160px;
  margin-bottom: 24px;
  opacity: 0.85;
}

#landscape-warning .warning-content h1 {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--brand-text);
  margin-bottom: 12px;
}

#landscape-warning .warning-content p {
  font-size: 0.95rem;
  color: var(--brand-muted);
  line-height: 1.6;
  max-width: 320px;
}

/* ========================
   FELMEDDELANDE
======================== */
.error-message {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 2rem;
}

.error-message p {
  color: var(--brand-blue-dark);
  font-size: 1rem;
  text-align: center;
  padding: 2rem 2.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  border-left: 3px solid var(--brand-blue);
}

/* ========================
   RESPONSIVITET
======================== */
@media (max-width: 768px) {
  #fullscreen-button {
    display: none;
  }
}

@media (max-width: 768px) and (orientation: portrait) {
  .toolbar {
    height: 54px;
    padding: 0 12px;
  }

  .toolbar .logo {
    height: 28px;
  }

  .nav-button {
    width: 34px;
    height: 34px;
  }

  .navigation-controls {
    gap: 8px;
  }

  .utility-controls {
    gap: 4px;
  }

  .flipbook-container {
    margin-top: 54px;
    height: calc(100vh - 54px);
    padding: 12px;
  }

  #progress-bar {
    top: 54px;
  }
}

/* ===================================================
   KATALOGVÄLJARE
=================================================== */
#catalog-chooser {
  min-height: 100vh;
  background: var(--bg, var(--brand-bg));
  background-image: radial-gradient(ellipse at 70% 20%, rgba(75,134,175,0.07) 0%, transparent 55%),
                    radial-gradient(ellipse at 10% 90%, rgba(189,152,98,0.06) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
}

.chooser-toolbar {
  height: 64px;
  background-color: var(--toolbar-bg, var(--brand-bg-alt));
  display: flex;
  align-items: center;
  padding: 0 24px;
  box-shadow: 0 1px 0 var(--border, rgba(26,22,18,0.12));
  position: sticky;
  top: 0;
  z-index: 100;
}

.chooser-toolbar .logo {
  height: 34px;
  opacity: 0.9;
}

.chooser-content {
  flex: 1;
  padding: 56px 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.chooser-heading {
  font-family: "Playfair Display", serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text, var(--brand-text));
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.chooser-subtitle {
  font-size: 1rem;
  color: var(--text-muted, var(--brand-muted));
  margin-bottom: 48px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
}

.catalog-card {
  background: var(--card-bg, #fff);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border, rgba(26,22,18,0.08));
}

.catalog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow-blue);
}

.catalog-card-cover {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--brand-bg-deep, #E2D9CC);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.catalog-card-cover canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-card-cover .cover-placeholder {
  font-size: 3rem;
  color: var(--brand-sand);
  opacity: 0.5;
}

.catalog-card-info {
  padding: 16px 18px;
  flex: 1;
  border-top: 1px solid var(--border, rgba(26,22,18,0.07));
}

.catalog-card-title {
  font-family: "Playfair Display", serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, var(--brand-text));
  margin-bottom: 4px;
  line-height: 1.3;
}

.catalog-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted, var(--brand-muted));
  letter-spacing: 0.01em;
}

/* ===================================================
   DARK MODE
=================================================== */
body.dark-mode {
  --bg:           #0F0D0B;
  --toolbar-bg:   #1A1612;
  --card-bg:      #26201A;
  --text:         #F0E8DC;
  --text-muted:   #9A8878;
  --border:       rgba(240, 232, 220, 0.09);
  --bg-input:     #1E1914;
  --bg-card:      #26201A;
  --text-primary: #F0E8DC;
  --border-color: rgba(240, 232, 220, 0.14);
  background: var(--bg);
}

body.dark-mode .toolbar,
body.dark-mode .chooser-toolbar {
  background-color: var(--toolbar-bg);
  box-shadow: 0 1px 0 rgba(240,232,220,0.07);
}

body.dark-mode .nav-button svg {
  fill: #D0C4B4;
}

body.dark-mode .nav-button:hover {
  background-color: rgba(75, 134, 175, 0.15);
}

body.dark-mode .nav-button:hover svg {
  fill: #7AADCF;
}

body.dark-mode .page-indicator {
  color: #D0C4B4;
}

body.dark-mode #preloader,
body.dark-mode #landscape-warning {
  background: var(--bg);
}

body.dark-mode .preloader-content h3 {
  color: #9A8878;
}

body.dark-mode .spinner {
  border-color: rgba(240,232,220,0.15);
  border-top-color: #7AADCF;
}

body.dark-mode .chooser-heading {
  color: var(--text);
}

body.dark-mode .chooser-subtitle {
  color: var(--text-muted);
}

body.dark-mode #flipbook .page {
  background: #1E2A38;
}

body.dark-mode .catalog-card {
  border-color: rgba(240,232,220,0.07);
}

body.dark-mode .catalog-card:hover {
  box-shadow: 0 8px 32px rgba(75, 134, 175, 0.3);
}

body.dark-mode .error-message p {
  background: var(--card-bg);
  color: #7AADCF;
  border-left-color: #4B86AF;
}

/* ===================================================
   THUMBNAIL SIDEBAR
=================================================== */
.thumbnail-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  width: 190px;
  height: calc(100vh - 64px);
  background: var(--toolbar-bg, var(--brand-bg-alt));
  border-right: 1px solid var(--border, rgba(26,22,18,0.1));
  display: flex;
  flex-direction: column;
  z-index: 900;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(26, 22, 18, 0.1);
}

.thumbnail-sidebar.open {
  transform: translateX(0);
}

.thumbnail-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, var(--brand-muted));
  border-bottom: 1px solid var(--border, rgba(26,22,18,0.1));
  flex-shrink: 0;
}

.thumbnail-list {
  overflow-y: auto;
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.thumbnail-item {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.thumbnail-item:hover {
  border-color: var(--brand-sand);
  box-shadow: 0 2px 8px rgba(189,152,98,0.2);
}

.thumbnail-item.active {
  border-color: var(--brand-blue);
  box-shadow: 0 2px 8px rgba(75,134,175,0.25);
}

.thumbnail-item canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.thumbnail-item .thumb-page-num {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(26, 22, 18, 0.55);
  color: #fff;
  font-size: 0.62rem;
  text-align: center;
  padding: 3px 0;
  letter-spacing: 0.03em;
}

.thumbnail-item .thumb-bookmark-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  background: var(--brand-gold);
  border-radius: 50%;
  display: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.thumbnail-item.bookmarked .thumb-bookmark-dot {
  display: block;
}

.flipbook-container.sidebar-open {
  margin-left: 190px;
  width: calc(100% - 190px);
}

/* ===================================================
   BOKMÄRKEN
=================================================== */
#bookmark-button {
  position: relative;
}

#bookmark-button.bookmarked svg {
  fill: var(--brand-gold);
}

/* ===================================================
   SÖKPANEL
=================================================== */
.search-panel {
  position: fixed;
  top: 64px;
  right: 0;
  width: 320px;
  max-height: calc(100vh - 64px);
  background: var(--toolbar-bg, var(--brand-bg-alt));
  border-left: 1px solid var(--border, rgba(26,22,18,0.1));
  box-shadow: -4px 0 20px rgba(26, 22, 18, 0.1);
  z-index: 900;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.search-panel.open {
  transform: translateX(0);
}

.search-panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.search-input-row {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, rgba(26,22,18,0.1));
  gap: 8px;
  flex-shrink: 0;
}

#search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: var(--text, var(--brand-text));
  outline: none;
}

#search-input::placeholder {
  color: var(--text-muted, var(--brand-muted));
}

.search-results {
  overflow-y: auto;
  flex: 1;
  padding: 10px;
}

.search-result-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
}

.search-result-item:hover {
  background: rgba(75, 134, 175, 0.08);
}

.search-result-page {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-blue);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.search-result-snippet {
  font-size: 0.82rem;
  color: var(--text, var(--brand-text));
  line-height: 1.45;
}

.search-result-snippet mark {
  background: rgba(201, 140, 36, 0.3);
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
}

.search-status {
  font-size: 0.8rem;
  color: var(--text-muted, var(--brand-muted));
  padding: 16px;
  text-align: center;
  letter-spacing: 0.01em;
}

#bookmark-button {
  display: none;
}

/* ============================================================
   LEADS-MODAL
============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 22, 18, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.modal-overlay[hidden] { display: none; }

.modal-dialog {
  background: var(--bg-card, #fff);
  color: var(--text-primary, var(--brand-text));
  border-radius: 16px;
  padding: 32px 36px;
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 32px 80px rgba(26, 22, 18, 0.3);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(26,22,18,0.06);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted, var(--brand-muted));
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: rgba(75, 134, 175, 0.1);
  color: var(--brand-blue);
}

.modal-title {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text-primary, var(--brand-text));
}

.modal-subtitle {
  color: var(--text-muted, var(--brand-muted));
  font-size: 0.9rem;
  margin: 0 0 24px;
  line-height: 1.5;
}

.required { color: var(--brand-blue); }

#lead-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}

#lead-form label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-primary, var(--brand-text));
  letter-spacing: 0.02em;
}

#lead-form input,
#lead-form textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border-color, rgba(26,22,18,0.15));
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: "Inter", sans-serif;
  background: var(--bg-input, #fdfaf6);
  color: var(--text-primary, var(--brand-text));
  transition: border-color 0.15s, box-shadow 0.15s;
}

#lead-form input:focus,
#lead-form textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(75, 134, 175, 0.12);
}

.lead-form-error {
  background: rgba(75, 134, 175, 0.08);
  color: var(--brand-blue-dark);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 14px;
  border-left: 3px solid var(--brand-blue);
}

.btn-lead-submit {
  width: 100%;
  padding: 13px;
  background: var(--brand-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  letter-spacing: 0.02em;
}

.btn-lead-submit:hover {
  background: var(--brand-blue-dark);
  box-shadow: var(--shadow-glow-blue);
}

.btn-lead-submit:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

.lead-success {
  text-align: center;
  padding: 32px 0;
}

.lead-success-icon {
  font-size: 3rem;
  color: var(--brand-blue);
  margin-bottom: 12px;
}

/* ============================================================
   HOTSPOT-OVERLAY
============================================================ */
.hotspot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.hotspot-zone {
  position: absolute;
  pointer-events: all;
  cursor: pointer;
  border: 2px solid rgba(75, 134, 175, 0.65);
  border-radius: 6px;
  background: rgba(75, 134, 175, 0.08);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: hotspot-pulse 2.5s ease-in-out infinite;
}

.hotspot-zone:hover,
.hotspot-zone:focus {
  background: rgba(75, 134, 175, 0.22);
  outline: none;
}

@keyframes hotspot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(75, 134, 175, 0.45); }
  50%       { box-shadow: 0 0 0 7px rgba(75, 134, 175, 0); }
}

.hotspot-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 22, 18, 0.88);
  color: #fff;
  font-size: 0.74rem;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 20;
}

.hotspot-zone:hover .hotspot-tooltip,
.hotspot-zone:focus .hotspot-tooltip {
  opacity: 1;
}

.page { position: relative; }

/* ============================================================
   HOTSPOT-EDITOR (admin)
============================================================ */
.hotspot-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hotspot-editor-wrap {
  overflow: auto;
  border: 1px solid var(--brand-bg-deep, #ddd);
  border-radius: 10px;
  background: var(--brand-bg-alt, #f0f0f0);
  padding: 16px;
  margin-bottom: 20px;
}

.hotspot-stage {
  position: relative;
  display: inline-block;
  cursor: crosshair;
  max-width: 100%;
}

.hs-canvas { display: block; max-width: 100%; height: auto; }
.hs-overlay { position: absolute; inset: 0; }

.hs-zone {
  position: absolute;
  border: 2px solid rgba(75, 134, 175, 0.7);
  background: rgba(75, 134, 175, 0.12);
  border-radius: 4px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s;
}

.hs-zone:hover { background: rgba(75, 134, 175, 0.25); }
.hs-zone.selected { border-color: var(--brand-sand); background: rgba(189, 152, 98, 0.2); }

.hs-props-panel {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #ddd);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.hs-props-panel h4 { margin: 0 0 12px; font-family: "Playfair Display", serif; }
.hs-status-msg { font-size: 0.85rem; color: var(--brand-blue); min-width: 120px; }

.hs-instructions {
  background: var(--brand-bg-alt, #f8f9fa);
  border-left: 3px solid var(--brand-blue);
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 0.85rem;
}

.hs-instructions ol { margin: 8px 0 0 16px; padding: 0; }
.hs-instructions li { margin-bottom: 4px; }
