/* v2.6.0 — audit fixes: energy modal, safer mobile stacking, checkout company fields */
.vlg-card-image-wrap .vlg-energy-badge,
.vlg-energy-badge[data-vlg-energy-label] {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.vlg-energy-badge[data-vlg-energy-label]:focus-visible {
  outline: 3px solid rgba(0, 51, 153, .45) !important;
  outline-offset: 3px !important;
}

.vlg-energy-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.vlg-energy-modal[hidden] { display: none !important; }

.vlg-energy-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 18, 36, .62);
  backdrop-filter: blur(3px);
}

.vlg-energy-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7, 18, 36, .28);
  padding: 18px;
}

.vlg-energy-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.vlg-energy-modal__eyebrow {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}

.vlg-energy-modal__title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.08;
}

.vlg-energy-modal__close {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #dbe5f1;
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.vlg-energy-modal__label {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #f8fafc;
}

.vlg-energy-modal__row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) 66px;
  align-items: center;
  gap: 10px;
}

.vlg-energy-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  font-weight: 950;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%);
}

.vlg-energy-modal__row:nth-child(1) .vlg-energy-modal__bar { background: #00a651; width: 68%; }
.vlg-energy-modal__row:nth-child(2) .vlg-energy-modal__bar { background: #50b848; width: 73%; }
.vlg-energy-modal__row:nth-child(3) .vlg-energy-modal__bar { background: #aed136; width: 78%; }
.vlg-energy-modal__row:nth-child(4) .vlg-energy-modal__bar { background: #fff200; color: #172033; width: 83%; }
.vlg-energy-modal__row:nth-child(5) .vlg-energy-modal__bar { background: #fdb813; width: 88%; }
.vlg-energy-modal__row:nth-child(6) .vlg-energy-modal__bar { background: #f37021; width: 93%; }
.vlg-energy-modal__row:nth-child(7) .vlg-energy-modal__bar { background: #ed1c24; width: 98%; }

.vlg-energy-modal__active {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 950;
  visibility: hidden;
}

.vlg-energy-modal__row.is-active .vlg-energy-modal__active {
  visibility: visible;
}

.vlg-energy-modal__meta {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: #475569;
  font-size: 14px;
}

.vlg-energy-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.vlg-energy-modal__actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 850;
  font-size: 13px;
}

.vlg-energy-modal__actions a.is-secondary {
  background: #f1f5f9;
  color: #0f172a !important;
}

.woocommerce-checkout .vlg-company-invoice-hidden {
  display: none !important;
}

@media (max-width: 782px) {
  body.vlg-theme .vlg-site-header,
  body.vlg-theme .vlg-main-header,
  body.vlg-theme .vlg-nav {
    position: relative !important;
    z-index: 30 !important;
  }

  body.vlg-theme .vlg-home .vlg-hero,
  body.vlg-theme .vlg-hero {
    position: relative !important;
    z-index: 1 !important;
    overflow: visible !important;
  }

  body.vlg-theme .vlg-home-categories,
  body.vlg-theme #kategooriad,
  body.vlg-theme .vlg-category-section,
  body.vlg-theme .vlg-product-categories,
  body.vlg-theme .vlg-shop-page {
    position: relative !important;
    z-index: 2 !important;
    clear: both !important;
  }

  .vlg-energy-modal {
    padding: 12px;
    align-items: end;
  }

  .vlg-energy-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 22px 22px 14px 14px;
  }
}
