/* =========================================================
   NØSEN – IKON-SYSTEM FOR VERN
   ppe2-master-v6.0-clean-premium-safe
   ---------------------------------------------------------
   Bygget for noesen-ppe-v8.5.2-frontend-polish-safe
   Formål:
   - Renere master-CSS for frontend / WooCommerce
   - Premium uttrykk med litt sprekere fargeforskjeller
   - Beholde eksisterende HTML-struktur og tooltip-adferd
   - Dekke aktive badge-klasser i v8.5.2
   ========================================================= */

:root{
  --pd-gap:6px;
  --pd-radius-pill:999px;
  --pd-radius-tip:12px;
  --pd-height:38px;
  --pd-pill-height:24px;
  --pd-code-size:11px;
  --pd-label-size:12px;
  --pd-tip-size:11px;
  --pd-surface:#fff;
  --pd-surface-soft:rgba(0,0,0,.035);
  --pd-border:rgba(15,23,42,.12);
  --pd-border-strong:rgba(15,23,42,.18);
  --pd-text:rgba(15,23,42,.82);
  --pd-muted:#64748b;
  --pd-heading:#334155;
  --pd-shadow:0 1px 0 rgba(15,23,42,.04);
  --pd-shadow-hover:0 8px 22px rgba(15,23,42,.10);
  --pd-shadow-active:0 4px 14px rgba(15,23,42,.08);
  --pd-focus:rgba(77,172,80,.45);
  --pd-tip-bg:#111827;
  --pd-tip-fg:#fff;
  --pd-code-weight:900;
  --pd-label-weight:750;
}

/* 1) BASE LAYOUT */
.pd-icons,
.pd-standards{
  display:flex;
  flex-wrap:wrap;
  gap:var(--pd-gap);
  margin:10px 0 0;
}
.pd-ico,
.pd-std{
  display:inline-flex;
  align-items:center;
  gap:var(--pd-gap);
  height:var(--pd-height);
  padding:0 10px;
  border:1px solid var(--pd-border);
  border-radius:var(--pd-radius-pill);
  background:var(--pd-surface);
  background-clip:padding-box;
  box-shadow:var(--pd-shadow);
  line-height:1;
  position:relative;
  transition:transform .1s ease, box-shadow .1s ease, border-color .1s ease, background .1s ease;
}
.pd-std{ background:var(--pd-surface-soft); }
.pd-ico:hover,
.pd-std:hover{
  transform:translateY(-1px);
  box-shadow:var(--pd-shadow-hover);
}
.pd-ico:active,
.pd-std:active{
  transform:translateY(0);
  box-shadow:var(--pd-shadow-active);
}
.pd-ico-btn,
.pd-std-btn{
  appearance:none;
  -webkit-appearance:none;
  border:0;
  background:transparent !important;
  color:inherit;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:var(--pd-gap);
  font:inherit;
  line-height:1;
  margin:0;
  padding:0;
}
.pd-ico-btn{ border-radius:var(--pd-radius-pill); }
.pd-ico-btn:focus,
.pd-std-btn:focus{
  outline:2px solid var(--pd-focus);
  outline-offset:2px;
  border-radius:var(--pd-radius-pill);
}
.pd-ico *{ background-color:transparent; }

.pd-ico-abb,
.pd-std-pill,
.pd-std b{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:var(--pd-pill-height);
  min-width:42px;
  padding:0 9px;
  border-radius:var(--pd-radius-pill);
  color:#fff;
  font-weight:var(--pd-code-weight, 900);
  font-size:var(--pd-code-size);
  letter-spacing:.35px;
  line-height:1;
  box-shadow:inset 0 -1px 0 rgba(0,0,0,.18);
}
.pd-ico-abb.is-short{ min-width:38px; padding:0 10px; }
.pd-std-pill,
.pd-std b{ min-width:56px; background:rgba(15,23,42,.86); }
.pd-ico-txt,
.pd-std-label,
.pd-std span{
  font-size:var(--pd-label-size);
  font-weight:var(--pd-label-weight, 750);
  color:var(--pd-text);
  letter-spacing:.1px;
  line-height:1;
  white-space:nowrap;
}
.preview-mobile .pd-ico-txt,
.preview-mobile .pd-std-label{ display:none !important; }
.preview-mobile .pd-std .pd-std-tip{ display:none !important; }

/* 2) TOOLTIPS */
.pd-ico .pd-ico-tip,
.pd-std .pd-std-tip{
  position:absolute !important;
  left:50% !important;
  right:auto !important;
  bottom:115% !important;
  transform:translateX(-50%) !important;
  display:inline-block !important;
  width:auto !important;
  max-width:calc(100vw - 24px) !important;
  white-space:normal !important;
  overflow-wrap:break-word !important;
  word-break:normal !important;
  text-align:left !important;
  background:var(--pd-tip-bg) !important;
  color:var(--pd-tip-fg) !important;
  padding:9px 10px !important;
  border-radius:var(--pd-radius-tip) !important;
  font-size:var(--pd-tip-size) !important;
  font-weight:650 !important;
  line-height:1.25 !important;
  box-shadow:0 14px 36px rgba(15,23,42,.22) !important;
  opacity:0;
  pointer-events:none;
  transition:opacity .12s ease;
  z-index:9999 !important;
}
.pd-ico .pd-ico-tip::after,
.pd-std .pd-std-tip::after{
  content:"" !important;
  position:absolute !important;
  left:50% !important;
  top:100% !important;
  transform:translateX(-50%) !important;
  border:7px solid transparent !important;
  border-top-color:var(--pd-tip-bg) !important;
}
.pd-ico:hover .pd-ico-tip,
.pd-ico:focus-within .pd-ico-tip,
.pd-ico[data-open="1"] .pd-ico-tip,
.pd-std:hover .pd-std-tip,
.pd-std:focus-within .pd-std-tip,
.pd-std[data-open="1"] .pd-std-tip{
  opacity:1 !important;
  pointer-events:auto;
}
.pd-icons .pd-ico:first-child .pd-ico-tip,
.pd-standards .pd-std:first-child .pd-std-tip{ left:12px !important; transform:none !important; }
.pd-icons .pd-ico:last-child .pd-ico-tip,
.pd-standards .pd-std:last-child .pd-std-tip{ left:auto !important; right:12px !important; transform:none !important; }
.pd-icons .pd-ico:first-child .pd-ico-tip::after,
.pd-standards .pd-std:first-child .pd-std-tip::after{ left:24px !important; transform:none !important; }
.pd-icons .pd-ico:last-child .pd-ico-tip::after,
.pd-standards .pd-std:last-child .pd-std-tip::after{ left:auto !important; right:24px !important; transform:none !important; }

/* 3) FRONTEND POLISH (v8.5.2) */
.pd-front-section{ margin-top:12px; }
.pd-front-summary{
  cursor:pointer;
  list-style:none;
  font-size:13px;
  font-weight:700;
  letter-spacing:.06em;
  color:var(--pd-heading);
  margin:0;
  padding:0 16px 8px 0;
  text-transform:uppercase;
  border-bottom:1px solid #e5e7eb;
}
.pd-front-summary::-webkit-details-marker{ display:none; }
.pd-front-summary::before{
  content:"▾";
  display:inline-block;
  margin-right:8px;
  color:var(--pd-muted);
}
.pd-front-section:not([open]) .pd-front-summary::before{ content:"▸"; }
.pd-front-section .pd-icons{ margin-top:8px; }
.pd-std-title{
  margin-top:10px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.06em;
  color:var(--pd-muted);
  text-transform:uppercase;
}
.pd-front-section .pd-standards{ margin-top:4px; }

/* 4) DEFAULT TYPE COLORS (safe fallback) */
.pd-ico[data-badge-type="protection"]{ background:rgba(34,117,76,.08); border-color:rgba(34,117,76,.18); }
.pd-ico[data-badge-type="protection"]:hover{ background:rgba(34,117,76,.12); border-color:rgba(34,117,76,.28); }
.pd-ico-abb[data-badge-type="protection"],
.pd-ico-abb.ico-protection{ background:#22754c !important; color:#fff !important; }

.pd-ico[data-badge-type="feature"],
.pd-ico[data-badge-type="detail"]{ background:rgba(71,85,105,.08); border-color:rgba(71,85,105,.18); }
.pd-ico[data-badge-type="feature"]:hover,
.pd-ico[data-badge-type="detail"]:hover{ background:rgba(71,85,105,.12); border-color:rgba(71,85,105,.28); }
.pd-ico-abb[data-badge-type="feature"],
.pd-ico-abb[data-badge-type="detail"],
.pd-ico-abb.ico-feature,
.pd-ico-abb.ico-detail{ background:#475569 !important; color:#fff !important; }

.pd-ico[data-badge-type="environment"]{ background:rgba(2,132,199,.08); border-color:rgba(2,132,199,.18); }
.pd-ico[data-badge-type="environment"]:hover{ background:rgba(2,132,199,.12); border-color:rgba(2,132,199,.28); }
.pd-ico-abb[data-badge-type="environment"],
.pd-ico-abb.ico-environment{ background:#0284c7 !important; color:#fff !important; }

.pd-ico[data-badge-type="hearing"]{ background:rgba(124,58,237,.08); border-color:rgba(124,58,237,.18); }
.pd-ico[data-badge-type="hearing"]:hover{ background:rgba(124,58,237,.12); border-color:rgba(124,58,237,.28); }
.pd-ico-abb[data-badge-type="hearing"],
.pd-ico-abb.ico-hearing{ background:#7c3aed !important; color:#fff !important; }

.pd-ico[data-badge-type="vision"]{ background:rgba(8,145,178,.08); border-color:rgba(8,145,178,.18); }
.pd-ico[data-badge-type="vision"]:hover{ background:rgba(8,145,178,.12); border-color:rgba(8,145,178,.28); }
.pd-ico-abb[data-badge-type="vision"],
.pd-ico-abb.ico-vision{ background:#0891b2 !important; color:#fff !important; }

.pd-ico[data-badge-type="composition"]{ background:rgba(124,58,237,.08); border-color:rgba(124,58,237,.18); }
.pd-ico[data-badge-type="composition"]:hover{ background:rgba(124,58,237,.12); border-color:rgba(124,58,237,.28); }
.pd-ico-abb[data-badge-type="composition"],
.pd-ico-abb.ico-composition{ background:#7c3aed !important; color:#fff !important; }

/* 5) PREMIUM ACCENTS FOR ACTIVE LEGACY CLASSES IN v8.5.2 */
/* Protection accents */
.pd-ico-abb.ico-class{ background:#2f7d32 !important; color:#fff !important; }
.pd-ico:has(.ico-class){ background:rgba(47,125,50,.08); border-color:rgba(47,125,50,.18); }
.pd-ico:has(.ico-class):hover{ background:rgba(47,125,50,.12); border-color:rgba(47,125,50,.28); }

.pd-ico-abb.ico-saw{ background:#1f6b34 !important; color:#fff !important; }
.pd-ico:has(.ico-saw){ background:rgba(31,107,52,.08); border-color:rgba(31,107,52,.18); }
.pd-ico:has(.ico-saw):hover{ background:rgba(31,107,52,.12); border-color:rgba(31,107,52,.28); }

.pd-ico-abb.ico-cut{ background:#2e7d4f !important; color:#fff !important; }
.pd-ico:has(.ico-cut){ background:rgba(46,125,79,.08); border-color:rgba(46,125,79,.18); }
.pd-ico:has(.ico-cut):hover{ background:rgba(46,125,79,.12); border-color:rgba(46,125,79,.28); }

.pd-ico-abb.ico-puncture.ico-protection,
.pd-ico-abb.ico-puncture{ background:#d97706 !important; color:#fff !important; }
.pd-ico:has(.ico-puncture){ background:rgba(217,119,6,.10); border-color:rgba(217,119,6,.24); }
.pd-ico:has(.ico-puncture):hover{ background:rgba(217,119,6,.15); border-color:rgba(217,119,6,.34); }

.pd-ico-abb.ico-grip{ background:#475569 !important; color:#fff !important; }
.pd-ico:has(.ico-grip){ background:rgba(71,85,105,.08); border-color:rgba(71,85,105,.18); }
.pd-ico:has(.ico-grip):hover{ background:rgba(71,85,105,.12); border-color:rgba(71,85,105,.28); }

.pd-ico-abb.ico-water{ background:#0891b2 !important; color:#fff !important; }
.pd-ico:has(.ico-water){ background:rgba(8,145,178,.08); border-color:rgba(8,145,178,.18); }
.pd-ico:has(.ico-water):hover{ background:rgba(8,145,178,.12); border-color:rgba(8,145,178,.28); }

.pd-ico-abb.ico-anti-static{ background:#7c3aed !important; color:#fff !important; }
.pd-ico:has(.ico-anti-static){ background:rgba(124,58,237,.08); border-color:rgba(124,58,237,.18); }
.pd-ico:has(.ico-anti-static):hover{ background:rgba(124,58,237,.12); border-color:rgba(124,58,237,.28); }

.pd-ico-abb.ico-heat{ background:#c2410c !important; color:#fff !important; }
.pd-ico:has(.ico-heat){ background:rgba(194,65,12,.08); border-color:rgba(194,65,12,.18); }
.pd-ico:has(.ico-heat):hover{ background:rgba(194,65,12,.12); border-color:rgba(194,65,12,.28); }

.pd-ico-abb.ico-cold,
.pd-ico-abb.ico-coldwear{ background:#0f766e !important; color:#fff !important; }
.pd-ico:has(.ico-cold),
.pd-ico:has(.ico-coldwear){ background:rgba(15,118,110,.08); border-color:rgba(15,118,110,.18); }
.pd-ico:has(.ico-cold):hover,
.pd-ico:has(.ico-coldwear):hover{ background:rgba(15,118,110,.12); border-color:rgba(15,118,110,.28); }

.pd-ico-abb.ico-protection{ background:#22754c !important; color:#fff !important; }
.pd-ico:has(.ico-protection){ background:rgba(34,117,76,.08); border-color:rgba(34,117,76,.18); }
.pd-ico:has(.ico-protection):hover{ background:rgba(34,117,76,.12); border-color:rgba(34,117,76,.28); }

/* Vision / visibility / composition accents */
.pd-ico-abb.ico-eye{ background:#f59e0b !important; color:#1f2937 !important; text-shadow:none !important; }
.pd-ico:has(.ico-eye){ background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.28); }
.pd-ico:has(.ico-eye):hover{ background:rgba(245,158,11,.18); border-color:rgba(245,158,11,.38); }

.pd-ico-abb.ico-hi-vis,
.pd-ico-abb.ico-forestvis{ background:#f59e0b !important; color:#1f2937 !important; text-shadow:none !important; }
.pd-ico:has(.ico-hi-vis),
.pd-ico:has(.ico-forestvis){ background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.28); }
.pd-ico:has(.ico-hi-vis):hover,
.pd-ico:has(.ico-forestvis):hover{ background:rgba(245,158,11,.18); border-color:rgba(245,158,11,.38); }

.pd-ico-abb.ico-face{ background:#0f766e !important; color:#fff !important; }
.pd-ico:has(.ico-face){ background:rgba(15,118,110,.08); border-color:rgba(15,118,110,.18); }
.pd-ico:has(.ico-face):hover{ background:rgba(15,118,110,.12); border-color:rgba(15,118,110,.28); }

.pd-ico-abb.ico-vision{ background:#0284c7 !important; color:#fff !important; }
.pd-ico:has(.ico-vision){ background:rgba(2,132,199,.08); border-color:rgba(2,132,199,.18); }
.pd-ico:has(.ico-vision):hover{ background:rgba(2,132,199,.12); border-color:rgba(2,132,199,.28); }

.pd-ico-abb.ico-composition,
.pd-ico-abb.ico-composition.ico-head{ background:#7c3aed !important; color:#fff !important; }
.pd-ico:has(.ico-composition){ background:rgba(124,58,237,.08); border-color:rgba(124,58,237,.18); }
.pd-ico:has(.ico-composition):hover{ background:rgba(124,58,237,.12); border-color:rgba(124,58,237,.28); }

.pd-ico-abb.ico-head{ background:#475569 !important; color:#fff !important; }
.pd-ico:has(.ico-head){ background:rgba(71,85,105,.08); border-color:rgba(71,85,105,.18); }
.pd-ico:has(.ico-head):hover{ background:rgba(71,85,105,.12); border-color:rgba(71,85,105,.28); }

/* Workwear / gloves / misc accents */
.pd-ico-abb.ico-chem{ background:#8b5cf6 !important; color:#fff !important; }
.pd-ico:has(.ico-chem){ background:rgba(139,92,246,.08); border-color:rgba(139,92,246,.18); }
.pd-ico:has(.ico-chem):hover{ background:rgba(139,92,246,.12); border-color:rgba(139,92,246,.28); }

.pd-ico-abb.ico-impact{ background:#8b5e3c !important; color:#fff !important; }
.pd-ico:has(.ico-impact){ background:rgba(139,94,60,.08); border-color:rgba(139,94,60,.18); }
.pd-ico:has(.ico-impact):hover{ background:rgba(139,94,60,.12); border-color:rgba(139,94,60,.28); }

.pd-ico-abb.ico-food{ background:#0f766e !important; color:#fff !important; }
.pd-ico:has(.ico-food){ background:rgba(15,118,110,.08); border-color:rgba(15,118,110,.18); }
.pd-ico:has(.ico-food):hover{ background:rgba(15,118,110,.12); border-color:rgba(15,118,110,.28); }

.pd-ico-abb.ico-disposable{ background:#64748b !important; color:#fff !important; }
.pd-ico:has(.ico-disposable){ background:rgba(100,116,139,.08); border-color:rgba(100,116,139,.18); }
.pd-ico:has(.ico-disposable):hover{ background:rgba(100,116,139,.12); border-color:rgba(100,116,139,.28); }

.pd-ico-abb.ico-oil{ background:#b45309 !important; color:#fff !important; }
.pd-ico:has(.ico-oil){ background:rgba(180,83,9,.08); border-color:rgba(180,83,9,.18); }
.pd-ico:has(.ico-oil):hover{ background:rgba(180,83,9,.12); border-color:rgba(180,83,9,.28); }

.pd-ico-abb.ico-flame{ background:#dc2626 !important; color:#fff !important; }
.pd-ico:has(.ico-flame){ background:rgba(220,38,38,.08); border-color:rgba(220,38,38,.18); }
.pd-ico:has(.ico-flame):hover{ background:rgba(220,38,38,.12); border-color:rgba(220,38,38,.28); }

.pd-ico-abb.ico-weld{ background:#7f1d1d !important; color:#fff !important; }
.pd-ico:has(.ico-weld){ background:rgba(127,29,29,.08); border-color:rgba(127,29,29,.18); }
.pd-ico:has(.ico-weld):hover{ background:rgba(127,29,29,.12); border-color:rgba(127,29,29,.28); }

.pd-ico-abb.ico-rain,
.pd-ico-abb.ico-wind{ background:#2563eb !important; color:#fff !important; }
.pd-ico:has(.ico-rain),
.pd-ico:has(.ico-wind){ background:rgba(37,99,235,.08); border-color:rgba(37,99,235,.18); }
.pd-ico:has(.ico-rain):hover,
.pd-ico:has(.ico-wind):hover{ background:rgba(37,99,235,.12); border-color:rgba(37,99,235,.28); }

/* Standards remain intentionally neutral */

/* 6) COMPATIBILITY / LEGACY SAFETY */
.pd-ico-abb.ico-std{ background:#222 !important; color:#fff !important; text-shadow:none !important; }
.pd-std-pill,
.pd-std b{ color:#fff !important; }

/* 7) MOBILE */
@media (max-width:480px){
  .pd-ico,
  .pd-std{ height:38px; padding:0 8px; gap:6px; }
  .pd-ico-abb,
  .pd-std-pill,
  .pd-std b{ height:22px; min-width:38px; padding:0 8px; font-size:10px; }
  .pd-ico-txt,
  .pd-std-label{ display:none !important; }
  .pd-std .pd-std-tip{ display:none !important; }
}

/* =========================================================
   NØSEN PPE Display Manager v0.1.0
   Global plugin controls
   ========================================================= */
body.noesen-ppe-hide-standards .pd-std-title,
body.noesen-ppe-hide-standards .pd-standards{
  display:none !important;
}

body.noesen-ppe-hide-tooltips .pd-ico .pd-ico-tip,
body.noesen-ppe-hide-tooltips .pd-std .pd-std-tip{
  display:none !important;
}

@media (max-width:767px){
  body.noesen-ppe-compact-mobile .pd-icons,
  body.noesen-ppe-compact-mobile .pd-standards{
    gap:6px;
  }
  body.noesen-ppe-compact-mobile .pd-ico,
  body.noesen-ppe-compact-mobile .pd-std{
    height:38px;
    padding:0 8px;
    gap:6px;
  }
  body.noesen-ppe-compact-mobile .pd-ico-abb,
  body.noesen-ppe-compact-mobile .pd-std-pill,
  body.noesen-ppe-compact-mobile .pd-std b{
    height:24px;
    min-width:36px;
    padding:0 9px;
    font-size:11px;
  }
  body.noesen-ppe-compact-mobile .pd-ico-txt{
    display:none !important;
  }
}


/* 8) META RENDER MODE */
body.noesen-ppe-render-from-meta .product .pd-front-section.pd-front-section-icons:not(.noesen-ppe-rendered),
body.noesen-ppe-render-from-meta .woocommerce-product-details__short-description .pd-front-section.pd-front-section-icons:not(.noesen-ppe-rendered),
body.noesen-ppe-render-from-meta .entry-summary .pd-front-section.pd-front-section-icons:not(.noesen-ppe-rendered),
body.noesen-ppe-render-from-meta .woocommerce-Tabs-panel .pd-front-section.pd-front-section-icons:not(.noesen-ppe-rendered){
  display:none !important;
}


.pd-version-tag{
  margin-top:6px;
  font-size:10px;
  color:#999;
  text-align:right;
  line-height:1;
  opacity:0.8;
}


/* 9) LOCAL SHORTCODE COMPACT VARIANT */
.pd-front-section.pd-compact .pd-icons,
.pd-front-section.pd-compact .pd-standards{
  gap:6px;
}
.pd-front-section.pd-compact .pd-ico,
.pd-front-section.pd-compact .pd-std{
  height:40px;
  padding:0 10px;
  gap:6px;
}
.pd-front-section.pd-compact .pd-ico-abb,
.pd-front-section.pd-compact .pd-std-pill,
.pd-front-section.pd-compact .pd-std b{
  height:24px;
  min-width:38px;
  padding:0 9px;
  font-size:11px;
}
.pd-front-section.pd-compact .pd-ico-txt,
.pd-front-section.pd-compact .pd-std-label,
.pd-front-section.pd-compact .pd-std span:not(.pd-std-pill){
  font-size:12px;
}
@media (max-width: 767px){
  .pd-front-section.pd-compact .pd-ico,
  .pd-front-section.pd-compact .pd-std{
    height:36px;
    padding:0 7px;
    gap:4px;
  }
  .pd-front-section.pd-compact .pd-ico-abb,
  .pd-front-section.pd-compact .pd-std-pill,
  .pd-front-section.pd-compact .pd-std b{
    height:21px;
    min-width:34px;
    padding:0 7px;
    font-size:10px;
  }
}
