/* Grid layout */
.lpd-grid {
  display: grid;
  grid-template-columns: repeat(var(--lpd-cols, 5), minmax(100px, 1fr));
  gap: 20px;
}
.lpd-grid[data-columns="2"] { --lpd-cols: 2; }
.lpd-grid[data-columns="3"] { --lpd-cols: 3; }
.lpd-grid[data-columns="4"] { --lpd-cols: 4; }
.lpd-grid[data-columns="5"] { --lpd-cols: 5; }
.lpd-grid[data-columns="6"] { --lpd-cols: 6; }

/* Logo button + hover zoom */
.lpd-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: center;
}
.lpd-logo .lpd-thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}
.lpd-logo:hover .lpd-thumb img,
.lpd-logo:focus-visible .lpd-thumb img {
  transform: scale(1.1);
  background-color: none !important;
}
.lpd-grid button:hover, .lpd-grid button:focus {
  background: transparent !important;
  border: none;
}

/* Title under logo */
.lpd-title-under {
  margin-top: 6px;
  font-size: 16px;
  color: #333;
  text-align: center;
}
.lpd-placeholder {
  display: inline-block;
  padding: 12px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}
span.lpd-thumb {
  display: flex;
  align-items: center;
  min-height: 130px;
  justify-content: center;
}
.lpd-thumb img {
  max-height: 80px;
}

/* List layout */
ul.lpd-label-list {
  list-style: none !important;
  margin: 0;
  padding: 0;
}
ul.lpd-label-list li.lpd-label-item {
  padding: 0;
  margin: 0;

}
ul.lpd-label-list,
ul.lpd-label-list li.lpd-label-item {
  list-style: none !important;
}
ul.lpd-label-list li.lpd-label-item a.lpd-label-trigger {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 6px 0 !important;
  color: #333 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  font-size:16px !important;

}
ul.lpd-label-list li.lpd-label-item a.lpd-label-trigger::before {
  content: '→';
  flex-shrink: 0;
}
ul.lpd-label-list li.lpd-label-item a.lpd-label-trigger:hover {
  text-decoration: underline !important;
  background: none !important;
  color: #333 !important;
}

/* Modal */
.lpd-popup {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  background: rgba(0,0,0,0.6);
  padding: 24px;
}
.lpd-dialog {
  position: relative;
  max-width: 780px;
  margin: 5% auto;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.lpd-close {
  position: absolute;
  right: 18px;
  top: 12px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

/* Popup logo */
.lpd-popup-logo {
  display: flex;
  justify-content: center;
  margin: 0 0 14px 0;
}
.lpd-popup-logo img {
  max-width: 180px;
  height: auto;
  display: block;
}
.lpd-popup-logo--text {
  font-size: 18px;
  font-weight: 600;
}

/* Loader overlay */
.lpd-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
  background: rgba(255,255,255,0.9);
}
.lpd-loading.is-active { display: flex; }
.lpd-dialog[aria-busy="true"] .lpd-content {
  visibility: hidden;
}
.lpd-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0,0,0,0.15);
  border-top-color: rgba(0,0,0,0.6);
  border-radius: 50%;
  animation: lpd-spin 0.8s linear infinite;
}
@keyframes lpd-spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .lpd-dialog { max-width: 95vw; }
}
