/* Noid WPD Designer — Add to More Products */

.noid-amp-trigger-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  border: none;
  background: #E5342A;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 7px;
  cursor: pointer;
  margin-left: 8px;
  white-space: nowrap;
}
.noid-amp-trigger-btn:hover { background: #C92A21; }
.noid-amp-trigger-btn svg { flex-shrink: 0; }

#noid-amp-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(20, 22, 26, 0.6);
  align-items: center;
  justify-content: center;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.noid-amp-modal-inner {
  width: min(920px, 92vw);
  max-height: 86vh;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.noid-amp-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #E3E6EB;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.noid-amp-modal-title { font-size: 18px; font-weight: 700; color: #1F2430; margin-bottom: 4px; }
.noid-amp-modal-sub { font-size: 13px; color: #6B7280; }
.noid-amp-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: #F3F4F6; color: #4B5563;
  font-size: 18px; line-height: 1; cursor: pointer; flex-shrink: 0;
}
.noid-amp-modal-body { flex: 1; overflow-y: auto; padding: 20px 24px; min-height: 200px; }
.noid-amp-loading, .noid-amp-empty { color: #6B7280; font-size: 14px; text-align: center; padding: 40px 0; }

.noid-amp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.noid-amp-tile {
  display: block;
  text-align: left;
  border: 2px solid #E3E6EB;
  border-radius: 12px;
  padding: 10px;
  background: #FFFFFF;
  cursor: pointer;
}
.noid-amp-tile.is-selected { border-color: #E5342A; }
.noid-amp-tile-img-wrap { position: relative; width: 100%; height: 110px; margin-bottom: 8px; }
.noid-amp-tile-img-wrap img { width: 100%; height: 100%; object-fit: contain; background: #F8F9FA; border-radius: 8px; }
.noid-amp-tile-check {
  position: absolute; top: 6px; right: 6px; width: 20px; height: 20px;
  border-radius: 50%; background: #FFFFFF; border: 1.5px solid #D1D5DB;
}
.noid-amp-tile.is-selected .noid-amp-tile-check {
  background: #E5342A; border-color: #E5342A;
}
.noid-amp-tile.is-selected .noid-amp-tile-check::after {
  content: ''; display: block; width: 5px; height: 9px;
  border: solid #FFFFFF; border-width: 0 2px 2px 0;
  transform: rotate(45deg); margin: 3px auto 0 7px;
}
.noid-amp-tile-name { font-size: 12.5px; font-weight: 700; color: #1F2430; margin-bottom: 2px; }
.noid-amp-tile-price { font-size: 12px; color: #9CA3AF; }

.noid-amp-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #E3E6EB;
  background: #FAFAFA;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.noid-amp-summary { font-size: 13px; color: #4B5563; font-weight: 500; }
.noid-amp-summary.is-error { color: #B91C1C; }
.noid-amp-add-btn {
  border: none; background: #2A4FD3; color: #FFFFFF;
  font-size: 14px; font-weight: 700; padding: 11px 22px; border-radius: 8px;
  cursor: pointer; flex-shrink: 0;
}
.noid-amp-add-btn:disabled { background: #D1D5DB; cursor: not-allowed; }
