/* ==========================================================================
   Internal Guide — Made To Fit
   Employee guide styling. Dark, elegant, functional.
   ========================================================================== */

/* ---------- Google Font Import ---------- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ---------- Design Tokens (custom properties) ---------- */
:root {
  --ig-primary-dark: #061C1C;
  --ig-secondary-dark: #112626;
  --ig-accent-dark: #0a2020;
  --ig-accent-sage: #8fa29a;
  --ig-light-cream: #FFEAD5;
  --ig-gray-bg: #F3F4F6;
  --ig-text-white: #ffffff;
  --ig-text-muted: #b0b8b5;
  --ig-text-body: #e0e0e0;
  --ig-shadow: rgba(17, 17, 26, 0.05) 0px 1px 0px, rgba(17, 17, 26, 0.1) 0px 0px 8px;
  --ig-radius: 10px;
  --ig-font: 'Plus Jakarta Sans', sans-serif;
  --ig-border-subtle: #8fa29a33;
  --ig-hover-dark: #1a3333;
  --ig-stripe-dark: #0d2828;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--ig-primary-dark);
}

::-webkit-scrollbar-thumb {
  background: #8fa29a44;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ig-accent-sage);
}

/* ---------- 1. ig-wrapper ---------- */
.ig-wrapper {
  min-height: 100vh;
  background: var(--ig-primary-dark);
  color: var(--ig-text-white);
  font-family: var(--ig-font);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 2. ig-login (PIN login screen) ---------- */
.ig-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.ig-login-box {
  max-width: 400px;
  width: 100%;
  padding: 40px;
  background: var(--ig-secondary-dark);
  border-radius: var(--ig-radius);
  box-shadow: var(--ig-shadow);
  text-align: center;
}

.ig-logo {
  max-width: 200px;
  margin-bottom: 30px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.ig-login-box h1 {
  font-size: 1.8rem;
  color: var(--ig-light-cream);
  margin-bottom: 10px;
  font-weight: 700;
}

.ig-login-box p {
  color: var(--ig-text-muted);
  margin-bottom: 24px;
}

.ig-login-box input[type="password"],
.ig-login-box input[type="text"] {
  width: 100%;
  padding: 14px 18px;
  background: var(--ig-accent-dark);
  border: 1px solid var(--ig-border-subtle);
  color: var(--ig-text-white);
  border-radius: 8px;
  font-size: 1.1rem;
  font-family: var(--ig-font);
  margin-bottom: 16px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.ig-login-box input[type="password"]:focus,
.ig-login-box input[type="text"]:focus {
  border-color: var(--ig-accent-sage);
  outline: none;
}

.ig-btn {
  width: 100%;
  padding: 14px;
  background: var(--ig-accent-sage);
  color: var(--ig-primary-dark);
  font-weight: 600;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-family: var(--ig-font);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ig-btn:hover {
  background: #a3b5ad;
  transform: translateY(-1px);
}

.ig-btn:active {
  transform: translateY(0);
}

.ig-error {
  color: #e74c3c;
  margin-top: 12px;
  font-size: 0.9rem;
}

/* ---------- 3. ig-topbar (fixed top navigation) ---------- */
.ig-topbar {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: var(--ig-primary-dark);
  border-bottom: 1px solid var(--ig-border-subtle);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-sizing: border-box;
}

.ig-topbar-logo {
  height: 36px;
  flex-shrink: 0;
}

.ig-search-wrap {
  flex: 1;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.ig-search-wrap input,
#ig-search {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--ig-secondary-dark);
  border: 1px solid var(--ig-border-subtle);
  color: var(--ig-text-white);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--ig-font);
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.ig-search-wrap input:focus,
#ig-search:focus {
  border-color: var(--ig-accent-sage);
  outline: none;
}

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

.ig-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ig-accent-sage);
  font-size: 1.1rem;
  pointer-events: none;
}

.ig-admin-badge {
  background: var(--ig-accent-sage);
  color: var(--ig-primary-dark);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- 4. ig-quicknav ---------- */
.ig-quicknav {
  position: sticky;
  top: 61px;
  z-index: 9999;
  background: var(--ig-secondary-dark);
  padding: 8px 24px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #8fa29a44 var(--ig-secondary-dark);
}

.ig-quicknav::-webkit-scrollbar {
  height: 4px;
}

.ig-quicknav::-webkit-scrollbar-track {
  background: var(--ig-secondary-dark);
}

.ig-quicknav::-webkit-scrollbar-thumb {
  background: #8fa29a44;
  border-radius: 2px;
}

.ig-quicknav-link {
  padding: 6px 16px;
  background: var(--ig-accent-dark);
  color: var(--ig-text-muted);
  border-radius: 20px;
  font-size: 0.85rem;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-family: var(--ig-font);
}

.ig-quicknav-link:hover {
  background: #8fa29a33;
  color: var(--ig-light-cream);
}

/* ---------- 5. ig-content (main content area) ---------- */
.ig-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}

/* ---------- 6. ig-section (accordion sections) ---------- */
.ig-section {
  margin-bottom: 12px;
  border-radius: var(--ig-radius);
}

.ig-accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: var(--ig-secondary-dark);
  border: none;
  color: var(--ig-light-cream);
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--ig-font);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  box-sizing: border-box;
  position: sticky;
  top: 100px;
  z-index: 98;
  border-radius: var(--ig-radius) var(--ig-radius) 0 0;
}

.ig-accordion-header:hover {
  background: var(--ig-hover-dark);
}

.ig-accordion-chevron {
  transition: transform 0.3s ease;
  font-size: 0.8rem;
  color: var(--ig-accent-sage);
  flex-shrink: 0;
  margin-left: 12px;
}

.ig-section--open .ig-accordion-chevron {
  transform: rotate(180deg);
}

.ig-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: var(--ig-accent-dark);
  padding: 0 24px;
}

.ig-section--open .ig-accordion-body {
  padding: 24px;
}

/* ---------- 7. ig-text (text content inside accordion) ---------- */
.ig-text h2 {
  font-size: 1.4rem;
  color: var(--ig-light-cream);
  margin: 24px 0 12px;
  font-weight: 700;
}

.ig-text h2:first-child {
  margin-top: 0;
}

.ig-text h3 {
  font-size: 1.15rem;
  color: var(--ig-accent-sage);
  margin: 20px 0 10px;
  font-weight: 600;
}

.ig-text h4 {
  font-size: 1rem;
  color: var(--ig-light-cream);
  margin: 16px 0 8px;
  font-weight: 600;
}

.ig-text p {
  margin: 8px 0;
  color: var(--ig-text-body);
  line-height: 1.7;
}

.ig-text ul,
.ig-text ol {
  margin: 8px 0 8px 20px;
  color: var(--ig-text-body);
}

.ig-text li {
  margin: 4px 0;
}

.ig-text strong {
  color: var(--ig-light-cream);
}

.ig-text em {
  color: var(--ig-accent-sage);
}

.ig-text a {
  color: var(--ig-accent-sage);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.ig-text a:hover {
  color: var(--ig-light-cream);
}

/* ---------- 8. ig-table-wrap + ig-table ---------- */
.ig-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: 8px;
}

.ig-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ig-table thead th {
  background: var(--ig-secondary-dark);
  color: var(--ig-light-cream);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.ig-table tbody td {
  padding: 10px 16px;
  color: var(--ig-text-body);
  border-bottom: 1px solid #8fa29a1a;
  vertical-align: top;
}

.ig-table tbody tr:nth-child(even) {
  background: var(--ig-stripe-dark);
}

.ig-table tbody tr:hover {
  background: var(--ig-secondary-dark);
}

.ig-table td:first-child,
.ig-table th:first-child {
  font-weight: 600;
  color: var(--ig-light-cream);
}

/* ---------- 9. ig-figure (images) ---------- */
.ig-figure {
  margin: 16px 0;
  text-align: center;
}

.ig-figure img {
  max-width: 100%;
  border-radius: 8px;
  display: inline-block;
}

.ig-figure figcaption {
  color: var(--ig-text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

/* ---------- 10. ig-highlight (search highlight) ---------- */
.ig-highlight {
  background: #8fa29a44;
  color: var(--ig-light-cream);
  padding: 1px 3px;
  border-radius: 3px;
}

/* ---------- 11. ig-empty ---------- */
.ig-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ig-text-muted);
}

/* ---------- 12. Responsive (max-width: 750px) ---------- */
@media (max-width: 750px) {
  .ig-topbar {
    padding: 10px 16px;
    flex-wrap: wrap;
  }

  .ig-topbar-logo {
    height: 28px;
  }

  .ig-search-wrap {
    order: 3;
    max-width: 100%;
    width: 100%;
    margin-top: 8px;
  }

  .ig-quicknav {
    padding: 6px 16px;
  }

  .ig-content {
    padding-top: 16px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .ig-accordion-header {
    padding: 14px 16px;
    font-size: 1.05rem;
  }

  .ig-accordion-body {
    padding: 0 16px;
  }

  .ig-section--open .ig-accordion-body {
    padding: 16px;
  }

  .ig-table {
    font-size: 0.8rem;
  }

  .ig-table th,
  .ig-table td {
    padding: 8px 10px;
  }
}

/* ---------- 13. Print styles ---------- */
@media print {
  .ig-topbar,
  .ig-quicknav,
  .ig-search-wrap {
    display: none !important;
  }

  .ig-accordion-body {
    max-height: none !important;
    padding: 16px !important;
    overflow: visible !important;
  }

  .ig-section {
    break-inside: avoid;
  }

  .ig-wrapper {
    background: #ffffff;
    color: #000000;
  }

  .ig-accordion-header {
    background: #eeeeee;
    color: #000000;
  }

  .ig-text p,
  .ig-text ul,
  .ig-text ol,
  .ig-text li,
  .ig-table tbody td {
    color: #000000;
  }

  .ig-text h2,
  .ig-text h3,
  .ig-text h4,
  .ig-text strong,
  .ig-table thead th,
  .ig-table td:first-child,
  .ig-table th:first-child {
    color: #000000;
  }

  .ig-content {
    padding-top: 0;
    max-width: 100%;
  }

  .ig-section {
    margin-bottom: 16px;
    border: 1px solid #cccccc;
  }
}

/* ---------- 14. Utility: Transitions & Animations ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Smooth scroll for anchor links */
.ig-wrapper {
  scroll-behavior: smooth;
}

/* ---------- Gallery / Fabric swatches ---------- */
.ig-gallery {
  margin: 16px 0;
}

.ig-gallery-hero {
  position: relative;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
  max-width: 300px;
}

.ig-gallery-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.ig-gallery-hero-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(6, 28, 28, 0.8);
  color: var(--ig-light-cream);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.ig-swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ig-swatch {
  position: relative;
  width: 80px;
  text-align: center;
  cursor: pointer;
}

.ig-swatch-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--ig-accent);
  transition: border-color 0.2s, transform 0.2s;
}

.ig-swatch:hover .ig-swatch-thumb {
  border-color: var(--ig-accent-sage);
  transform: scale(1.05);
}

.ig-swatch-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ig-swatch-name {
  display: block;
  font-size: 0.7rem;
  color: var(--ig-text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hover zoom popup */
.ig-swatch-zoom {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--ig-secondary-dark);
  border: 1px solid var(--ig-accent-sage);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  width: 220px;
  margin-bottom: 8px;
  pointer-events: none;
}

.ig-swatch:hover .ig-swatch-zoom {
  display: block;
}

.ig-swatch-zoom img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.ig-swatch-zoom span {
  display: block;
  text-align: center;
  color: var(--ig-light-cream);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 4px;
}

@media (max-width: 750px) {
  .ig-swatch {
    width: 65px;
  }
  .ig-swatch-thumb {
    width: 65px;
    height: 65px;
  }
  .ig-swatch-zoom {
    width: 160px;
  }
}

/* ---------- Details / "Vis mere" expandable ---------- */
.ig-details {
  margin: 20px 0 8px;
  border: 1px solid var(--ig-accent);
  border-radius: 8px;
  overflow: hidden;
}

.ig-details-summary {
  padding: 12px 20px;
  background: var(--ig-secondary);
  color: var(--ig-sage);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.ig-details-summary::-webkit-details-marker {
  display: none;
}

.ig-details-summary::before {
  content: "\25B6";
  font-size: 0.7rem;
  transition: transform 0.3s ease;
  color: var(--ig-sage);
}

.ig-details[open] > .ig-details-summary::before {
  transform: rotate(90deg);
}

.ig-details-summary:hover {
  background: var(--ig-hover);
}

.ig-details-content {
  padding: 16px 20px;
  background: rgba(6, 28, 28, 0.5);
  border-top: 1px solid var(--ig-accent);
}

.ig-details-content .ig-text {
  font-size: 0.9rem;
  opacity: 0.9;
}

.ig-details-content .ig-table {
  font-size: 0.85rem;
}

@media (max-width: 750px) {
  .ig-details-summary {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  .ig-details-content {
    padding: 12px 14px;
  }
}
